Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function EditCtrl($scope, $state, Restangular, project) {
- var original = project;
- $scope.project = Restangular.copy(original);
- console.log($scope);
- $scope.isClean = function() {
- return angular.equals(original, $scope.project);
- }
- $scope.destroy = function() {
- original.remove().then(function() {
- $state.go('/');
- });
- };
- $scope.save = function() {
- $scope.project.put().then(function() {
- $state.go('/');
- });
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement