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
feat: Removing implicit map dereference in expressions
Closesdart-archive#915
1) Now "a.b" return a.b and "a['b']" return a['b']
Before this change a.b would have match either a.b or a['b']. The reason
is that the context was a Map (before dart-archive#914) and we don't want to write
ctrl['foo'] but ctrl.foo. It was also not possible to access Map
properties, ie map.length would have returned map['length'].
2) Accessing probes
The probes are no more accessible directly in the rootScope context but
in a $probes map on the rootScope context.
Before:
<p probe="prb"></p>
var probe = rootScope.context['prb'];
After:
<p probe="prb"></p>
var probe = rootScope.context.$probes['prb'];
3) Forms
As a side effect of this change, the forms are now available in the
context field named after the form:
@component(
selector: 'my-component',
template: '''
<form name="myForm">
<input type="text" ng-model="model">
</form>
'''
)
class Component {
// myForm is automatically initialized to the NgForm instance
NgForm myForm;
}
When the field named after the form is not present, an exception is
thrown.
0 commit comments