> I'm hoping for either an angular method to apply a controller to an element like:
>
> angular.init( $('<div ng-controller="someClass") );
>
> or some direction on how to go about dynamically loading child views with angular.
>
Not sure if this is what you are looking for - but you can use 'angular.bootstrap(element, []);' - and use the array to pass in modules needed to bootstrap a specific dom element. We do this for apps that are pulled in via xhr loading and bootstrap them when they are done loading inside of an existing page.
Works great. Hope that helps in what you were asking.
--
Robert B. Weeks
Do you know of a way to reference the controller instantiated by the bootstrap method?var myController = angular.bootstrap( element ) ?
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/VzY5Wovd91EJ.--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
This is VERY HELPFUL info, thank you Vojta. Searching the docs for "scope()" also led me to the "controller()" method here: http://docs-next.angularjs.org/api/angular.element
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/ZP7xu5zcZ2MJ.