0
做我有角回調函數時,函數的角度
$rootScope.openMobileUpdateModal = function() {
......something.......
var modalInstance = $modal.open({
templateUrl: 'mobileModal.html',
controller: ModalInstanceCtrl
});
};
這個功能,我需要的功能(模式打開時並創建元素)當此功能完成後,將被調用。如何在這個函數上創建回調?
什麼是承諾對象? –
@ user3433459請查看AngularJS文檔http://docs.angularjs.org/api/ng/service/$q http://www.promisejs.org/ –