Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

One-time binding fail due to Angular Batarang 0.8.6 #255

Closed
doggy8088 opened this issue Aug 28, 2015 · 8 comments
Closed

One-time binding fail due to Angular Batarang 0.8.6 #255

doggy8088 opened this issue Aug 28, 2015 · 8 comments
Assignees

Comments

@doggy8088
Copy link

When I enabled the Angular Batarang 0.8.6, the "One-time binding" feature will be disabled. I'm using AngularJS 1.4. You can reproduce this problem at this page. Please try to enter something in the first input field. ( default value is T-Shirt and there is a angular expression below the form fields )

@SomeKittens
Copy link
Member

I was not able to reproduce. Are you sure you're on Batarang 0.8.6? (and not Batarang "Stable", which is not associated with the project at all?)

@kkFelix
Copy link

kkFelix commented Aug 28, 2015

+1, definitely with Batarang 0.8.6

<p>{{::foo}}!</p>
<button ng-click="foo = 'bar'">click</button>

"foo" keeps it initial value on click if Batarang is disabled, which is the desired behavior.
When activated, foo changes to "bar".

@SomeKittens
Copy link
Member

Not just Angular 1.4, was able to repro with 1.3 here: http://output.jsbin.com/warariduci

@erwinmombay erwinmombay self-assigned this Aug 30, 2015
@erwinmombay
Copy link

ill take this.
problem exists in: https://github.com/angular/angular-hint/blob/master/src/modules/scopes.js#L85

we need to skip doing any perf watching if the interpolation functions expression is a one time binding. we previously did this with strings that where one time bindings (can be seen a couple of lines prior to line 85).

@erwinmombay
Copy link

@SomeKittens @btford i'll need to discuss the solution with you guys on thursday since it seems pretty hacky (again related to the fact we the decorate the original expressions) and it might not make sense to fix it since batarang doesn't expose the watch performance on the panels at the moment.

@SomeKittens
Copy link
Member

Fixed in angular/angular-hint@0b98cfa

@preethi29
Copy link

Am able to reproduce this 0.10.5 batarang and angular 1.3.8

@SomeKittens
Copy link
Member

@preethi29 Please include a Plunkr or JSBin with your reproduction.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants