Get One-time Binding To Work For Ng-if
This question has been asked before, but I can't get that solution working, so I'm wondering if there's something different in my specifics. The code is really, really simple: <
Solution 1:
Well, In here you're checking one-time data binding vm.building.name
value with undefined
and since it is one-time data binding this condition will always be false.
modify your ng-if
and make it more simpler
<h1 ng-if="::vm.building.name">update {{::vm.building.name}}</h1>
Please find working plunker : https://plnkr.co/edit/QA6ZA7e0zHnN45oQWzQH?p=preview
This will work!
Cheers!
Post a Comment for "Get One-time Binding To Work For Ng-if"