If I do in a template of a component something like:
<input [(ngModel)]="myProperty"></input>
then it works, but if I do it with a function in my component it does not:
<input [(ngModel)]="getMyProperty()"></input>
Here is the plunkr. Tested on RC6. Why?
Try this construction
<input [ngModel]="getMyProperty()"></input>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With