AngularJS Passing Scope via Data Binding -
edit searching this. combined suggestions on post using binding combined expression.
<my-component data="{{data}}">{{data}}</my-component> is possible pass controller scope via data binding? processing controller should scope this:
bindings: { scope: '<' } i want pass directive data first controller, , information should shown in new component.. first controller has data, , want pass in template this:
<my-component>{{scope.data}}</my-component>
why want pass controller's entire scope?
usually pass through object component first controller below:
bindings: { somevariable: '=' } and in html of controller call component:
<my-component some-variable="scope.somevariable"></my-component> scope.somevariable object belongs first controller , have access data inside component
Comments
Post a Comment