-
Notifications
You must be signed in to change notification settings - Fork 248
Conversation
@rkirov tests do not pass, the PR needs to be updated. For the next time it would be better to keep the original commits and the updated separated to ease the review (and squash once after the review). |
d049f72
to
600bd19
Compare
All tests pass except G3 ones which have an unrelated merge conflict. |
90eb785
to
b981052
Compare
_mode = _MODE_MAP_FIELD_; | ||
_getter = null; | ||
} else { | ||
while (_object is ContextLocals) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be add a comment explaining why we work with _object
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using _object
instead of object
everywhere ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good. Added a warning to use _object throughout setter to avoid bugs.
@rkirov I've added some comments and the tests still do not pass (not related to g3) |
b981052
to
8df0052
Compare
NgElement only uses scope to access rootScope, so now we directly inject RootScope. This is needed for future change dart-archive#1429 which disallows Scope injection into controllers. Since NgElement depends on scope it would also be disallowed, unless we change it to directly use RootScope.
8df0052
to
f556b1a
Compare
I added PrototypeMap back into exported symbols as we have clients that use it. |
f556b1a
to
aae2e83
Compare
09d6e90
to
3f87448
Compare
NgElement only uses scope to access rootScope, so now we directly inject RootScope. This is needed for future change dart-archive#1429 which disallows Scope injection into controllers. Since NgElement depends on scope it would also be disallowed, unless we change it to directly use RootScope.
NgElement only uses scope to access rootScope, so now we directly inject RootScope. This is needed for future change #1429 which disallows Scope injection into controllers. Since NgElement depends on scope it would also be disallowed, unless we change it to directly use RootScope.
NgElement only uses scope to access rootScope, so now we directly inject RootScope. This is needed for future change #1429 which disallows Scope injection into controllers. Since NgElement depends on scope it would also be disallowed, unless we change it to directly use RootScope.
3f87448
to
89fe8f2
Compare
@vicb I had to move the |
I think that the issue is that my original PR is not fully merged.
The issue is that the meaning of the expressions is different according When the PR will be fully merged you will say "foo" for both 1 & 2 and Cheers, On 09/25/2014 07:01 AM, Rado Kirov wrote:
|
5e1a70f
to
e2c5d16
Compare
e2c5d16
to
2681820
Compare
BREAKING CHANGE: Scope context is set to the component instance that trigged the creation of the scope (previously it was of a PrototypeMap.) Repercussions: 1) You can not inject a scope in a component or in the root context any more. As the Scope context is set to the Component instance, the scope could not be injected any more. Components should implements the "ScopeAware" interface and declare a "scope" setter in order to get a reference to the scope. before: @component(...) class MyComponent { Watch watch; Scope scope; MyComponent(Dependency myDep, Scope scope) { watch = scope.rootScope.watch("expression", (v, p) => ...); } } after: @component(...) class MyComponent implements ScopeAware { Watch watch; MyComponent(Dependency myDep) { // It is an error to add a Scope argument to the // ctor and will result in a DI circular dependency error // The scope is never accessible in the class constructor } void set scope(Scope scope) { // This setter gets called to initialize the scope watch = scope.watch("expression", (v, p) => ...); } } or: @component(...) class MyComponent implements ScopeAware { Scope scope; MyComponent(Dependency myDep) { // It is an error to add a Scope argument to the // ctor and will result in a DI circular dependency error // The scope is never accessible in the class constructor } } 2) The parent component to an NgForm must have a "$name" field to store the form instance. closes dart-archive#919 closes dart-archive#917
2681820
to
cc294d8
Compare
LGTM |
This consists of the first two commits from #1269, rebased and slightly modified.