Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

custom ngmodel

<app-my-control [(myProp)]="value"></app-my-control>


@Input()
myProp: string;

// Output prop name must be Input prop name + 'Change'
// Use in your component to write an updated value back out to the parent
@Output()
myPropChange = new EventEmitter<string>();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #custom #ngmodel
ADD COMMENT
Topic
Name
5+3 =