X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=afb-client%2Fapp%2FFrontend%2Fapp.js;h=6360b7597fca3181cd14a50b785a841862c0bf7a;hb=662c8409cd101fa168727e4a10f7e49d9a85e5f6;hp=5e99d77d3c322d9e7237e2be788b842475520724;hpb=4136c1506e0c894e604ec069339313987a7e05e7;p=src%2Fapp-framework-demo.git diff --git a/afb-client/app/Frontend/app.js b/afb-client/app/Frontend/app.js index 5e99d77..6360b75 100644 --- a/afb-client/app/Frontend/app.js +++ b/afb-client/app/Frontend/app.js @@ -1,5 +1,15 @@ (function() { 'use strict'; + + function ParseQueryString () { + var qd = {}; + location.search.substr(1).split("&").forEach(function(item) { + var k = item.split("=")[0]; + var 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 +34,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');