Using Angular2 I'm trying to make a list from an array...something like:
import {Component} from 'angular2/core';
@Component({
selector: 'my-app',
template: `
<ul>
<li *ngFor="">
{{names}}
</li>
</ul>
`,
})
export class AppComponent {
names = ['name1', 'name2', 'name3'];
}
How can I get something like this to work?
#ngFor=""isn't going to work. You should show what you tried, and where you got stuck, or why you couldn't figure this out based on some documentation.