Angular: Manage data


Where to define the data and how to display the data


The data is defined in the app.component.ts

Example: multiple tasks in a table or array such as data set =['a','b','c']




And shows them in the app.compontent.html


 <li *ngFor="let aufgabe of aufgaben">{{aufgabe}}</li>



Defining in the .ts


Ads in the .html

And in the edition app.component.html



Generated as output in html



  • Aufgabe1
  • Aufgabe2
  • Aufgabe3






Define data in app.compontent.ts

Definitions Code in app.component.ts

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

import { AngularFireModule  } from 'angularfire2';



  selector: 'app-root',

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

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


export class AppComponent {

  //--< Daten >--

  title = 'dailycheck';


  //--</ Daten >--


  constructor(af:AngularFireModule) {









Datab Ads in app.compontent. html

Issuing code in the .html




  <li *ngFor="let aufgabe of aufgaben">{{aufgabe}}</li>