This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
"Model did not stabilize" error for not changing variable #678
Comments
Take a look at this SO Q/A http://stackoverflow.com/questions/21763136 |
How is this related? It's different error and I don't have duplicates in my example. |
I thought I read somewhere that items in collections repeated over should not be primitive values. I thought it might be worth a try. Have you tried it? |
Yes, this occured for me at first with instances of a complex class with different attributes in ng-if. This is just minimal example that I was able to to extract. Also when you remove one of the if statement it works. |
Here's the simplest repro: <div ng-if="1 == 1">
<div ng-if="1 == 1">
<div ng-if="1 == 1">
<div ng-if="1 == 1">
Oops....
</div>
</div>
</div>
</div>
|
/sub |
Similarly: <div ng-repeat="a in [1]">
<div ng-repeat="b in [1]">
<div ng-repeat="c in [1]">
<div ng-repeat="d in [1]">
Oops...
</div>
</div>
</div>
</div> |
Test case: it('should allow multiple nested watches', inject((RootScope scope) {
scope.watch('1', (_, __) {
scope.watch('1', (_, __) {
scope.watch('1', (_, __) {
scope.watch('1', (_, __) {
//...
});
});
});
});
expect(scope.apply).not.toThrow();
})); |
OK, I will take another look at this. |
The issue is this: cd4e2e3 |
side note: you can /sub with the top-right notifications menu |
(Thanks for the side-note Vic) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Create ng-component with 2 variables:
and create template for the component:
Running the code will result into following error:
Operating system: Ubuntu 12.04 LTS
Browser: Chromium (Dartium) Version 31.0.1650.48 (240209)
It looks like that the problem is in specifying the ctrl.url in the attribute of an html element. On the other this works:
Also the ng-if parts doesn't need to be the same variable, but the order of true/false values should be the same.
The text was updated successfully, but these errors were encountered: