summaryrefslogtreecommitdiffstats
path: root/afb-client/bower_components/angular-ui-router/src/view.js
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2016-02-09 18:40:49 +0100
committerFulup Ar Foll <fulup@iot.bzh>2016-02-09 18:40:49 +0100
commit3d2fda7dd39e2363682f1fa353c951ab0d44ddfa (patch)
treeaf968a8ac5d4fde1f3cebcec5fb0973eb2bfb2cb /afb-client/bower_components/angular-ui-router/src/view.js
parent12a3520ba440316c76b95d92a684666f03f7b47d (diff)
Implemented URL query parsing for initial token /opa/?token=abcde
Diffstat (limited to 'afb-client/bower_components/angular-ui-router/src/view.js')
-rw-r--r--afb-client/bower_components/angular-ui-router/src/view.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/afb-client/bower_components/angular-ui-router/src/view.js b/afb-client/bower_components/angular-ui-router/src/view.js
new file mode 100644
index 0000000..94334d3
--- /dev/null
+++ b/afb-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);