May 8th, 2017
12:36 pm
Posted under Angular
Permalink
Tags Tip, Tutorial
This post discusses the alternative way of specifying input parameters for angular 2.
This can be done using either:-
@Component{( selector: "my-component", inputs: ["attr"] )} export class MyComponent { }
or alternatively:-
@Component{( selector: "my-component" )} export class MyComponent { @Input() public attr: any; }
Leave a Reply
You must be logged in to post a comment.