Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Replace context map with component Controller. #914

Open
mhevery opened this issue Apr 16, 2014 · 1 comment
Open

Replace context map with component Controller. #914

mhevery opened this issue Apr 16, 2014 · 1 comment

Comments

@mhevery
Copy link
Contributor

mhevery commented Apr 16, 2014

Currently the scope.context is Map or ProtoMap. This should be removed in favor of the component Controller. This means that we can remove publishAs from the Component declaration. It means that templates which say {{cntl.foo}} will become {{foo}}.

@vicb
Copy link
Contributor

vicb commented Apr 23, 2014

I have started to tackle this one

vicb added a commit to vicb/angular.dart that referenced this issue May 16, 2014
Closes dart-archive#915

Before this PR 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'].

Now "a.b" return a.b and "a['b']" return a['b']
vicb added a commit to vicb/angular.dart that referenced this issue May 19, 2014
Closes dart-archive#915

Before this PR 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'].

Now "a.b" return a.b and "a['b']" return a['b']
vicb added a commit to vicb/angular.dart that referenced this issue May 19, 2014
Closes dart-archive#915

Before this PR 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'].

Now "a.b" return a.b and "a['b']" return a['b']
vicb added a commit to vicb/angular.dart that referenced this issue May 20, 2014
Closes dart-archive#915

Before this PR 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'].

Now "a.b" return a.b and "a['b']" return a['b']
vicb added a commit to vicb/angular.dart that referenced this issue May 28, 2014
Closes dart-archive#915

Before this PR 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'].

Now "a.b" return a.b and "a['b']" return a['b']
vicb added a commit to vicb/angular.dart that referenced this issue May 28, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue May 28, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 14, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 14, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 15, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 15, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 16, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 16, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 16, 2014
Closes dart-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'];

Conflicts:
	lib/change_detection/context_locals.dart
vicb added a commit to vicb/angular.dart that referenced this issue Jul 16, 2014
Closes dart-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'];

Conflicts:
	lib/change_detection/context_locals.dart
vicb added a commit to vicb/angular.dart that referenced this issue Jul 17, 2014
Closes dart-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'];

Conflicts:
	lib/change_detection/context_locals.dart
vicb added a commit to vicb/angular.dart that referenced this issue Jul 25, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 28, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 28, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 30, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Jul 31, 2014
Closes dart-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'];
rkirov pushed a commit to rkirov/angular.dart that referenced this issue Jul 31, 2014
Closes dart-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'];
vicb added a commit to vicb/angular.dart that referenced this issue Aug 1, 2014
Closes dart-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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants