2 $ViewProvider.$inject = [];
3 function $ViewProvider() {
8 * @name ui.router.state.$view
10 * @requires ui.router.util.$templateFactory
11 * @requires $rootScope
16 $get.$inject = ['$rootScope', '$templateFactory'];
17 function $get( $rootScope, $templateFactory) {
19 // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })
22 * @name ui.router.state.$view#load
23 * @methodOf ui.router.state.$view
27 * @param {string} name name
28 * @param {object} options option object.
30 load: function load(name, options) {
31 var result, defaults = {
32 template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}
34 options = extend(defaults, options);
37 result = $templateFactory.fromConfig(options.view, options.params, options.locals);
45 angular.module('ui.router.state').provider('$view', $ViewProvider);