How do I create an initial variable to write old data, and after editing on the form, make sure it is different?
Code:
app.controller("ModalController", ["$scope",function($scope){
var fixa = [$scope.elemento_mutavel].slice()[0];
if(fixa != $scope.elemento_mutavel) {
//exemplo
}
}]);
<input type="text" ng-model="elemento_mutavel">