我想說明一個DOM從工廠微調圖像的DOM,我使用jQuery嘗試,$ rootScope展現DOM沒有成功,如何顯示從角工廠
下面是我的工廠代碼,
.factory('api', function($q, $http, $state, $timeout, $rootScope, $window) {
var request = function(callback, timeout) {
var deferred = $q.defer();
$timeout(function() {
deferred.resolve(null);
}, typeof timeout !== 'undefined' ? timeout : 800);
callback(deferred);
return deferred.promise;
};
return {
postData: postData
};
function postData(data) {
var $ = angular.element;
$.sg= true;
return $http.post('/a/', data).then(function(response) {
$timeout(function() {window.location.href = "/bdc";}, 10000)
}
})
}
})
我仍然在等待之前在你的問題的迴應:https://stackoverflow.com/questions/44085782/show-image- md-select-md-options-on-hover-in-angularjs-1-6 ..你能否在我的回答中提供一些反饋?我解決了這個問題中的問題,並花了我1個多小時。如果你能提供一些反饋意見,這將是很高興的 – lin