8000 `$onInit` and friends by petebacondarwin · Pull Request #13763 · angular/angular.js · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$onInit and friends #13763

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
50b0c1a
feat($compile): call `$ngOnInit` on directive controllers after contr…
petebacondarwin Jan 13, 2016
cf4e7be
test($compile): check that $onInit is called correctly for ES6 classes
petebacondarwin Jan 13, 2016
452dd39
docs($compile): document the new `$onInit` controller hook
petebacondarwin Jan 13, 2016
f72ecbd
feat($compile): allow `require` to be an object
petebacondarwin Jan 13, 2016
b2c0b05
feat($compile): allow required controllers to be bound to the directi…
petebacondarwin Jan 13, 2016
37793ce
feat($compile): allow `require` to be an object
petebacondarwin Jan 14, 2016
a12ddc6
test($compile): check explicit return controllers are not broken by b…
petebacondarwin Jan 14, 2016
59feecc
feat($compile): allow required controllers to be bound to the directi…
petebacondarwin Jan 14, 2016
8040bab
feat($compile): call `$ngOnInit` on directive controllers after contr…
petebacondarwin Jan 14, 2016
9e6db1a
feat($compile): allow required controllers to be bound to the directi…
petebacondarwin Jan 14, 2016
1d18df2
fix($compile): ensure controllers with return value constructors are …
petebacondarwin Jan 15, 2016
4b304a6
docs($compile): squash me
petebacondarwin Jan 15, 2016
cae40ca
fix($compile): only bind required controllers if `bindToController` i…
petebacondarwin Jan 15, 2016
276b9ee
docs($compile): fix typo
petebacondarwin Jan 15, 2016
6d66a75
fix($compile): only bind required controllers if `bindToController` i…
petebacondarwin Jan 15, 2016
32b7da3
test($compile): check that $onInit is called correctly for ES6 classes
petebacondarwin Jan 15, 2016
cb495a5
fix($compile): only bind required controllers if `bindToController` i…
petebacondarwin Jan 15, 2016
270e230
fix($compile): ensure controllers with return value constructors are …
petebacondarwin Jan 15, 2016
281d987
fix($compile): only bind required controllers if `bindToController` i…
petebacondarwin Jan 15, 2016
9f76a11
test($compile): check that $onInit is called correctly for ES6 classes
petebacondarwin Jan 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat($compile): allow required controllers to be bound to the directi…
…ve controller

If directives are required through an object hash, rather than a string or array,
the required directives' controllers are bound to the current directive's controller
in much the same way as the properties are bound to using `bindToController`.

The binding is done after the controller has been constructed and all the bindings
are guaranteed to be complete by the time the controller's `$onInit` method
is called.

This change makes it much simpler to access require controllers without the
need for manually wiring them up in link functions. In particular this
enables support for `require` in directives defined using `mod.component()`
  • Loading branch information
petebacondarwin committed Jan 14, 2016
commit 59feecc4231c8e6385a602f37ebe650bdad3b1b9
2 changes: 1 addition & 1 deletion test/ng/compileSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9579,5 +9579,5 @@ describe('$compile', function() {
}));
});
});
});
});
});
0