File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 * $rootScope.$digest();
2828 * });
2929 * </pre>
30- *
30+ *
3131 * Sometimes you want to get access to the injector of a currently running Angular app
3232 * from outside Angular. Perhaps, you want to inject and compile some markup after the
3333 * application has been bootstrapped. You can do this using extra `injector()` added
3434 * to JQuery/jqLite elements. See {@link angular.element}.
35- *
35+ *
3636 * *This is fairly rare but could be the case if a third party library is injecting the
3737 * markup.*
38- *
38+ *
3939 * In the following example a new block of HTML containing a `ng-controller`
4040 * directive is added to the end of the document body by JQuery. We then compile and link
4141 * it into the current AngularJS scope.
42- *
42+ *
4343 * <pre>
4444 * var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
4545 * $(document.body).append($div);
46- *
46+ *
4747 * angular.element(document).injector().invoke(function($compile) {
4848 * var scope = angular.element($div).scope();
4949 * $compile($div)(scope);
You can’t perform that action at this time.
0 commit comments