Promiseã¨ã¯ éåæå¦çã«ä½¿ç¨ãããªãã¸ã§ã¯ã 使ãæ¹ ã¾ã$qãµã¼ãã¹ã使ç¨ãããã以ä¸ã®å½¢ãä½ã var app = angular.module('app', []); app.controller('Ctrl', function($q) { }); ããã¦éåæå¦çç¨ã®é¢æ°ãä½æãvar deferred = $q.defer();ã§éåæå¦çã«å¿ è¦ãªDeferredãªãã¸ã§ã¯ããä½æãã¦å¦çã®æå¾ã«return deferred.promiseã§è¿ã function async() { var deferred = $q.defer(); // ãã®ä¸ã«å¦çãè¨è¿° return deferred.promise; } ååãåãåã£ã¦Helloä»ãã¦è¿ãå¦çã®å ´åã¯ãã®ããã«ãªã function asyncHello(name) { var deferred = $q
{{#tags}}- {{label}}
{{/tags}}