From be83a8f382cf2fea98161bfd6d51719aacbf9aa9 Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Thu, 28 Jan 2016 16:30:12 +0100 Subject: Update JSON API --- .../bower_components/angular-ui-router/src/view.js | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 afm-client/bower_components/angular-ui-router/src/view.js (limited to 'afm-client/bower_components/angular-ui-router/src/view.js') diff --git a/afm-client/bower_components/angular-ui-router/src/view.js b/afm-client/bower_components/angular-ui-router/src/view.js new file mode 100644 index 0000000..94334d3 --- /dev/null +++ b/afm-client/bower_components/angular-ui-router/src/view.js @@ -0,0 +1,45 @@ + +$ViewProvider.$inject = []; +function $ViewProvider() { + + this.$get = $get; + /** + * @ngdoc object + * @name ui.router.state.$view + * + * @requires ui.router.util.$templateFactory + * @requires $rootScope + * + * @description + * + */ + $get.$inject = ['$rootScope', '$templateFactory']; + function $get( $rootScope, $templateFactory) { + return { + // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... }) + /** + * @ngdoc function + * @name ui.router.state.$view#load + * @methodOf ui.router.state.$view + * + * @description + * + * @param {string} name name + * @param {object} options option object. + */ + load: function load(name, options) { + var result, defaults = { + template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {} + }; + options = extend(defaults, options); + + if (options.view) { + result = $templateFactory.fromConfig(options.view, options.params, options.locals); + } + return result; + } + }; + } +} + +angular.module('ui.router.state').provider('$view', $ViewProvider); -- cgit 1.2.3-korg