Is there a way how to use $compile from pure javascript? I\'m combinating basic javascript and places where I\'m using Angular and can\'t find a way how to do something like
angular.bootstrap($("#targetElmForApp")[0], ["myApp"]);
Explanation:
angular.bootstrap(rootElementForApp, arrayOfModulesForTheApp)
The first parameter sets the root element for the app, which is what you would do by using ng-app
directive otherwise.
The second parameters is a list of modules that defines the application. This is typically a single module in which the app is defined.
So what we did is the same as:
see:
http://docs.angularjs.org/api/angular.bootstrap
http://docs.angularjs.org/guide/bootstrap