我正在使用RestAngular来进行Rest Call
_getMerchantData : function() {
var deferred = $q.defer();
var service = Restangular
.all('UrbanLife');
service
.one('service')
.one('api')
.one('v1')
.one('businessowner')
.one('getUserInfo')
.get()
.then(
function(response) {
countrylist = response;
deferred.resolve(response);
},
function(response) {
deferred.reject(response);
}
);
return deferred.promise;
}
Run Code Online (Sandbox Code Playgroud)
控制器开启md-select的更改功能
$scope.onActionChange= function(){
if($scope.welcome.action==="editProfile"){
$scope.getUserProfile();
}
};
$scope.getUserProfile=function(){
merchantService.merchantManager.UpdateUserProfileFlag=true;
merchantService.merchantManager.emailValidate = false;
window.location = "#/signup?EditParam="+true;
};
Run Code Online (Sandbox Code Playgroud)
给出此错误的第二页控制器.它获取并显示数据._____________________________________________________________________________
/*------registrationCtrl------------*/
app.controller(
'registrationCtrl',
[
'$scope',
'merchantService',
'tokenService',
'photoService',
'$http',
'$modal',
'$location',
function($scope, merchantService, tokenService, photoService, $http, $modal, $location) {
$scope.checkIfUpdateProfile=function(){
var params=$location.search();
console.log("params.EditParam "+params.EditParam);
if(params.EditParam){ …Run Code Online (Sandbox Code Playgroud) 我需要制作相同元素的多个对象。我无法弄清楚我应该在 [] 和 {} 之间使用哪个来制作我的数据结构。
我不清楚 [] 和 {} 之间的区别。我正在使用 Angularjs