Last active
March 30, 2016 11:14
-
-
Save MacKentoch/0d2d307c06cee456f8d06329d892a8cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Angular2 | |
import {Component, Input} from 'angular2/core'; | |
import {$service1} from './service1'; | |
import {$service2} from './service1'; | |
@Component({ | |
selector : 'demo-directive', | |
providers : [$service1, $service2], | |
template : ` | |
<div> | |
<h1> | |
{{title}} | |
</h1> | |
<p> | |
{{demoAttr1}} | |
</p> | |
<p> | |
{{demoAttr2}} | |
</p> | |
</div> | |
`, | |
styles : [``] | |
}) | |
export class AppQuizEnd { | |
@Input() demoAttr1: string; | |
@Input() demoAttr2: string; | |
public myData: any; | |
constructor(service1: $service1, service2: $service2) { | |
this.init(); | |
} | |
public init(): void { | |
this.title = this.service1.getTitle(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment