You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
I really like the controllerAs syntax, and like knowing for sure which scope a variable is defined on. It seems like a step backwards to not be able to do so.
The text was updated successfully, but these errors were encountered:
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Aug 1, 2014
Parse aliasAs as an expression, and assert that the expression is assignable.
BREAKING CHANGE
Previously, any name passed as an expression would make up a single property name, including constant
values such as 1, NaN, null, undefined, or even expressions such as function calls or boolean expressions.
Now, more complex expressions are possible, allowing the collection alias to be assigned as a property
of an object --- however, if the expression is not determined to be assignable, it will throw.
Fixesangular#8438
Parse aliasAs as an expression, and assert that the expression is assignable.
BREAKING CHANGE
Previously, any name passed as an expression would make up a single property name, including constant
values such as 1, NaN, null, undefined, or even expressions such as function calls or boolean expressions.
Now, more complex expressions are possible, allowing the collection alias to be assigned as a property
of an object --- however, if the expression is not determined to be assignable, it will throw.
Fixesangular#8438
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Aug 1, 2014
Parse aliasAs as an expression, and assert that the expression is assignable.
BREAKING CHANGE
Previously, any name passed as an expression would make up a single property name, including constant
values such as 1, NaN, null, undefined, or even expressions such as function calls or boolean expressions.
Now, more complex expressions are possible, allowing the collection alias to be assigned as a property
of an object --- however, if the expression is not determined to be assignable, it will throw.
Fixesangular#8438
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Aug 1, 2014
Parse aliasAs as an expression, and assert that the expression is assignable.
BREAKING CHANGE
Previously, any name passed as an expression would make up a single property name, including constant
values such as 1, NaN, null, undefined, or even expressions such as function calls or boolean expressions.
Now, more complex expressions are possible, allowing the collection alias to be assigned as a property
of an object --- however, if the expression is not determined to be assignable, it will throw.
Fixesangular#8438
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Aug 20, 2014
Ensure that aliasAs expressions are valid simple identifiers. These are still assigned to $scope in the same way
that they were previously, however now you won't accidentally create a property named "filtered.collection".
This change additionally restricts identifiers to prevent the use of certain ECMAScript reserved words ("null",
"undefined", "this" --- should probably add "super", "try", "catch" and "finally" there too), as well as certain
properties used by $scope or ngRepeat, including $parent, $index, $even, $odd, $first, $middle, or $last.
Fixesangular#8438
I would like to be able to place the new ngRepeat 'AS' object on my controllerAs variable.
That way, I could either write
item in items | filter:x as results
oritem in items | filter:x as myCtrl.results
Plunk demonstrating that this isn't currently possible:
http://plnkr.co/edit/295zNjJ6wLlKtYTXL9wA?p=preview
I really like the controllerAs syntax, and like knowing for sure which scope a variable is defined on. It seems like a step backwards to not be able to do so.
The text was updated successfully, but these errors were encountered: