Promise
$q.defer()
参考
[AngularJS] $q サービスで覚える Promise
https://dev.classmethod.jp/articles/angularjs-q-promise/