简体   繁体   中英

Angular provider and $http

如果在提供者$get注入$http并执行sam AJAX(用于配置),我确定在请求结束后是否将对此service进行任何操作?

$http returns a promise. If you want to execute some code on receiving a response please put it inside the then method callback of said promise.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM