Created
March 23, 2018 09:29
-
-
Save debugmodedotnet/e97a09a3109e623904b1d082377097a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-root', | |
template: ` | |
<ul *ngFor='let n of names'> | |
<li>{{n.name}}</li> | |
</ul> | |
` | |
}) | |
export class AppComponent { | |
names = []; | |
constructor() { | |
this.names = this.getNames(); | |
} | |
getNames() { | |
return [ | |
{ 'name': 'dhananjay Kumar' }, | |
{ 'name': 'jason beres' }, | |
{ 'name': 'adam jafe' } | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment