diff options
Diffstat (limited to 'afb-client/app/Frontend/app.js')
-rw-r--r-- | afb-client/app/Frontend/app.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/afb-client/app/Frontend/app.js b/afb-client/app/Frontend/app.js index 72e8123..ed4d2ea 100644 --- a/afb-client/app/Frontend/app.js +++ b/afb-client/app/Frontend/app.js @@ -1,5 +1,13 @@ (function() { 'use strict'; + + function ParseQueryString () { + var qd = {}; + location.search.substr(1).split("&").forEach(function(item) { + var k = item.split("=")[0], v = decodeURIComponent(item.split("=")[1]); (k in qd) ? qd[k].push(v) : qd[k] = [v]; + }); + return qd; + } angular.module('@@APPNAME@@', [ // Warning: Appname should fit with gulpfile.js & index.html 'ui.router', @@ -24,14 +32,13 @@ 'RangeSlider', 'ModalNotification' ]) + .value ('urlquery', ParseQueryString()) .config(config) .run(run) ; config.$inject = ['$urlRouterProvider', '$locationProvider']; - console.log ("***location=" + window.location + " search" + window.search); - function config($urlProvider, $locationProvider, ConfigApp) { $urlProvider.otherwise('/home'); |