mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
@ -24,7 +24,7 @@ export function configFromURL() {
|
|||||||
.split('&')
|
.split('&')
|
||||||
.map(entry => entry.split('='))
|
.map(entry => entry.split('='))
|
||||||
.map(([key, value]) => [decodeURIComponent(key), decodeURIComponent(value)])
|
.map(([key, value]) => [decodeURIComponent(key), decodeURIComponent(value)])
|
||||||
.filter(([key]) => key.startsWith(IONIC_PREFIX))
|
.filter(([key]) => startsWith(key, IONIC_PREFIX))
|
||||||
.map(([key, value]) => [key.slice(IONIC_PREFIX.length), value])
|
.map(([key, value]) => [key.slice(IONIC_PREFIX.length), value])
|
||||||
.forEach(([key, value]) => {
|
.forEach(([key, value]) => {
|
||||||
config[key] = value;
|
config[key] = value;
|
||||||
@ -32,3 +32,7 @@ export function configFromURL() {
|
|||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function startsWith(input: string, search: string): boolean {
|
||||||
|
return input.substr(0, search.length) === search;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user