Closed vanceingalls closed 8 years ago
Great idea - though I'm just getting a single value rendering from this, if we included this it should mimic the behaviour in the 1.5 stable release.
Component polyfill + your shim: https://jsfiddle.net/toddmotto/ohrnjbn2
Stable release: https://jsfiddle.net/toddmotto/wauana12
They behave quite differently right now :) any thoughts?
ah, right. the data isnt bound in any direction.
how about setting up a watcher within the component then calling the scope value function again to get the new value?
i guess this should be done instead: https://github.com/angular/angular.js/blob/92374f9633d6121b115d77c10248e40e1f4f2aa1/src/ng/compile.js#L3061
+1 Would be amazing to backfill one way data binding to < 1.5.
thanks!
this solution causes "this" in the controller to evaluate to the window global
@mrichard @vanceingalls Can you guys help out? I've just added support for one-way data flow and $onChanges: https://github.com/toddmotto/angular-component/issues/22
This article describes a symbol to allow for one way data binding: http://angularjs.blogspot.com/2016/02/angular-150-ennoblement-facilitation.html
Trying this resulted in this issue: https://github.com/toddmotto/angular-component/issues/14
My solution shims this feature by using the '@' notation to simulate one way data binding.