mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-09 07:14:44 +00:00
style($injector): remove ws
This commit is contained in:
parent
05e4fd3488
commit
a0ed371389
1 changed files with 5 additions and 5 deletions
|
|
@ -27,23 +27,23 @@
|
||||||
* $rootScope.$digest();
|
* $rootScope.$digest();
|
||||||
* });
|
* });
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Sometimes you want to get access to the injector of a currently running Angular app
|
* Sometimes you want to get access to the injector of a currently running Angular app
|
||||||
* from outside Angular. Perhaps, you want to inject and compile some markup after the
|
* from outside Angular. Perhaps, you want to inject and compile some markup after the
|
||||||
* application has been bootstrapped. You can do this using extra `injector()` added
|
* application has been bootstrapped. You can do this using extra `injector()` added
|
||||||
* to JQuery/jqLite elements. See {@link angular.element}.
|
* to JQuery/jqLite elements. See {@link angular.element}.
|
||||||
*
|
*
|
||||||
* *This is fairly rare but could be the case if a third party library is injecting the
|
* *This is fairly rare but could be the case if a third party library is injecting the
|
||||||
* markup.*
|
* markup.*
|
||||||
*
|
*
|
||||||
* In the following example a new block of HTML containing a `ng-controller`
|
* In the following example a new block of HTML containing a `ng-controller`
|
||||||
* directive is added to the end of the document body by JQuery. We then compile and link
|
* directive is added to the end of the document body by JQuery. We then compile and link
|
||||||
* it into the current AngularJS scope.
|
* it into the current AngularJS scope.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
|
* var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
|
||||||
* $(document.body).append($div);
|
* $(document.body).append($div);
|
||||||
*
|
*
|
||||||
* angular.element(document).injector().invoke(function($compile) {
|
* angular.element(document).injector().invoke(function($compile) {
|
||||||
* var scope = angular.element($div).scope();
|
* var scope = angular.element($div).scope();
|
||||||
* $compile($div)(scope);
|
* $compile($div)(scope);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue