Skip to content

Commit e78b376

Browse files
petebacondarwinNarretz
authored andcommitted
feat($compile): allow required controllers to be bound to the directive 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()`
1 parent e1ee6f4 commit e78b376

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/ng/compileSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9579,5 +9579,5 @@ describe('$compile', function() {
95799579
}));
95809580
});
95819581
});
9582-
});
9582+
});
95839583
});

0 commit comments

Comments
 (0)