Created
April 16, 2018 09:10
-
-
Save goofmint/00be05a77c5f328a08b28381c42889cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ons.ready(() => { | |
resolveVariable(['Tab1Controller', 'Tab2Controller']) | |
.then(() => { | |
// 変数定義済み | |
}); | |
}); | |
const resolveVariable = (ary) => { | |
return new Promise((res, rej) => { | |
setTimeout(() => { | |
let bol = true; | |
for (let index in ary) { | |
if (!(ary[index] in window)) { | |
bol = false; | |
return resolveVariable(ary) | |
} | |
} | |
if (bol) res(); | |
}, 100); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment