aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
authorMisko Hevery2012-01-12 11:06:10 -0800
committerMisko Hevery2012-01-12 13:40:07 -0800
commitd648d709f3edcac56132e9e2a84a0fc65f5b48ac (patch)
treeac0ba5763838a4f4b880dc72f0cbcedc1b7abc05 /src/Angular.js
parent9a8dbfef5151e8e92dc010a597b670e7687ebe9b (diff)
downloadangular.js-d648d709f3edcac56132e9e2a84a0fc65f5b48ac.tar.bz2
refactor(module): strict separation between module-config / app-runtime
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 74443bd1..0f79d363 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -128,7 +128,7 @@ var $$scope = '$scope',
</pre>
*
* @param {Object|Array} obj Object to iterate over.
- * @param {function()} iterator Iterator function.
+ * @param {Function} iterator Iterator function.
* @param {Object=} context Object to become context (`this`) for the iterator function.
* @returns {Object|Array} Reference to `obj`.
*/
@@ -897,12 +897,14 @@ function angularInit(element, bootstrap) {
*
* @param {Element} element DOM element which is the root of angular application.
* @param {Array<String,function>=} modules an array of module declarations. See: {@link angular.module modules}
+ * @param {angular.module.auta.$injector} the injector;
*/
function bootstrap(element, modules) {
element = jqLite(element);
modules = modules || [];
modules.unshift('ng');
- createInjector(modules).invoke(null,
+ var injector = createInjector(modules);
+ injector.invoke(
['$rootScope', '$compile', '$injector', function(scope, compile, injector){
scope.$apply(function() {
element.data('$injector', injector);
@@ -910,6 +912,7 @@ function bootstrap(element, modules) {
});
}]
);
+ return injector;
}
function bindJQuery() {