Created
July 2, 2017 08:49
-
-
Save karthikchintala1/5dd205a0a85569bd2a207118b354a914 to your computer and use it in GitHub Desktop.
template for structural directive in angular
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, NgModule, VERSION} from '@angular/core' | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
<div> | |
<h2>Hello {{name}}</h2> | |
</div> | |
<ul *ngFor="let item of [1,2,3,4,5,6,7,8,9,10]"> | |
<li *onlyEvens="item">{{item}}</li> | |
</ul> | |
`, | |
}) | |
export class App { | |
name:string; | |
constructor() { | |
this.name = `Angular! v${VERSION.full}` | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment