Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

 

 

 

 

Notizbuch

 - Notiz1

   - Beschreibung:  "erst mal was überlegen, dann notiern.notierne"

   - Titel:  "Wie erstellt man eine Notiz"

 

1.             Code for output in the .html page

 

In the app.component.html

With | Async and ?. Element 

Meaning of ? Question mark behind (firebase-node | async)?. subnote

Important: that ? means that the asynchronous value is waited until it can be output.

 

{{ (notiz1 |async )?.Titel }}

 

 

App.component.html Code

 

<h1>{{title}}</h1>

<ul>

    <li *ngFor="let item of aufgaben | async">

        {{ item }}

    </li>

</ul>

{{ (notiz1 |async )?.Titel }}

 

 

1.             Code for output in the .html page

 

Here the variable is declared as Observable

 

public notiz1 :Observable<any>;

 

 

And picked up with .list(node).valueschanges()

 

this.notiz1=this.afDb.object("/Notizbuch/Notiz1").valueChanges();

 

 

 

App.component.ts Code

 

import { Component } from '@angular/core';

import { AngularFireDatabase,AngularFireList }  from 'angularfire2/database';

import { Observable } from 'rxjs';

 

@Component({

  selector: 'app-root',

  templateUrl: './app.component.html',

  styleUrls: ['./app.component.css']

})

export class AppComponent {

  //--< Daten >--

  title = 'dailycheck';

  public aufgaben : Observable<any>;

  public notiz1 :Observable<any>;

  constructorprivate afDb:AngularFireDatabase ) {

  }

 

  ngOnInit()

  {

    this.aufgaben = this.afDb.list('Aufgaben').valueChanges();

    this.notiz1=this.afDb.object("/Notizbuch/Notiz1").valueChanges();

  }

}

 

 

 

Mobile
»
Angular Firebase Example 2021 AngularFireDatabase
»
Angular Firebase output single node
»
Exampel Code Connect data from Firebase in Angular
»
Angular Firebase Error: permission_denied Client doesn t have permission to access the desired data.
»
Firebase into Angular in 2021
»
Setting Firebase for easy reading of data
»
Firebase: Allow reading and writing
»
Firebase: Edit data manually
»
Install Firebase in Angular Project
»
How much does Firebase cost?

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de