-
-
Save ksakae1216/925539a3e7d7b8bb225ebd3a152df8be 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
doAfunc() { | |
this.$http({ | |
method: 'GET', | |
url: '/Afunc', | |
}).success((resul: any, status, headers, config) => { | |
//HTTP通信の成功 | |
this.$scope.$emit('wait1', result); | |
}).error((result: any, status, headers, config) => { | |
//HTTP通信の失敗 | |
}); | |
this.$scope.$on('wait1', () => { | |
this.doBfunc(); | |
}); | |
} | |
doBfunc() { | |
this.$http({ | |
method: 'GET', | |
url: '/Bfunc', | |
}).success((result: any, status, headers, config) => { | |
//HTTP通信の成功 | |
this.$scope.$emit('wait2', result); | |
}).error((result: any, status, headers, config) => { | |
//HTTP通信の失敗 | |
}); | |
this.$scope.$on('wait2', () => { | |
//次に呼びたい関数を記載する | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment