var oldtags;
var newtags;
$scope.getModels = function () {
if ($scope.tags.length > 0) {
$http.post('../../../ProductWS.asmx/FetchModelsList', { 'make': 'MYMAKE', 'category': 'audio', 'subcategory': 'cd player', 'year': '1999' })
.success(function (data, status, headers, config) {
newtags = data.d;
}).
error(function (data, status, headers, config) {
// log error
}).then(function (results) {
var newlist = oldtags.concat(newtags);
$scope.tags = newlist;
console.log(newlist);
//});
});
}
else {
$http.post('../../../ProductWS.asmx/FetchModelsList', { 'make': 'MyMake', 'category': 'video', 'subcategory': 'Blu Ray Player', 'year': '2012' })
.success(function (data, status, headers, config) {
$scope.tags = data.d;
oldtags = $scope.tags;
console.log(oldtags);
}).
error(function (data, status, headers, config) {
// log error
});
}
};
var newlist = oldtags.concat(newtags);
var newlist = oldtags.concat(newtags.map(function(item) { return item.text; }));
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.