You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$scope.copylineItem = function() {
var copylineItems = $filter('filter')($scope.panelsObj, {
isSelected: true
});
var primaryLineNo = [];
for (var i = 0; i < copylineItems.length; i++) {
primaryLineNo.push(copylineItems[i].primaryLineNo);
}
if (primaryLineNo.length > 0) {
cfpLoadingBar.start();
APTS_PanelConfigController.cloneLineItems(cartId, primaryLineNo, function(result, event) {
if (event.status) {
if (result) {
$scope.panelsObj.splice(0, $scope.panelsObj.length);
$scope.getRules();
cfpLoadingBar.complete();
}
} else if (event.type === 'exception') {
alert(event.message);
} else {
alert(event.message);
}
});
}
};
This is my controller function i wan to transfer this function to service how can i do this and how to use scope in service
The text was updated successfully, but these errors were encountered:
$scope.copylineItem = function() {
var copylineItems = $filter('filter')($scope.panelsObj, {
isSelected: true
});
var primaryLineNo = [];
for (var i = 0; i < copylineItems.length; i++) {
primaryLineNo.push(copylineItems[i].primaryLineNo);
}
if (primaryLineNo.length > 0) {
cfpLoadingBar.start();
APTS_PanelConfigController.cloneLineItems(cartId, primaryLineNo, function(result, event) {
if (event.status) {
if (result) {
$scope.panelsObj.splice(0, $scope.panelsObj.length);
$scope.getRules();
cfpLoadingBar.complete();
}
} else if (event.type === 'exception') {
alert(event.message);
} else {
alert(event.message);
}
});
}
};
This is my controller function i wan to transfer this function to service how can i do this and how to use scope in service
The text was updated successfully, but these errors were encountered: