I'm not able to figure out how to use two way binding in angular 4 directive.
In AngularJs I used to do it like this:
<random-directive binded='name' binded2="xyz"></random-directive>
And in directive definition add =
after name. And now I can change name
from the directive controller or link
.
But in Angular 2-6
tutorial I'm not able to find out how to do that.
Doing this:
<random-directive [binded]='name' [binded2]='name2'></random-directive>
Leads to one way binding to name only. But I want to change the variable from directive itself so is it possible?