Hello, I'm having a lot of trouble getting information between 2 components working with Angular 1. This is my example:
angular.module("parent",["child"]).component("parent",{
template : "<p> <child name></child> </div>",
controllerAs:"parent",
controller : {
constructor(){}
}
});
angular.module("child",[]).component("child",{
binding : {
"name" = "="
}
template : "<span>{{name}}</span>",
controllerAs : "child",
controller : {
constructor(){
this.name = name;
}
}
});
So far, if I manually enter the value at <child name="foo"></child>
the child component has its content changed. The problem is that I'm not understanding how parent I'll be able to change the contents of the child
Could anyone explain?