195
rated 0 times
[
200]
[
5]
/ answers: 1 / hits: 48261
/ 11 Years ago, tue, july 9, 2013, 12:00:00
I've created a fiddle here: http://jsfiddle.net/nicktest2222/W4VaA/
I just want to be able to hit the reset button and put my original values back. Does anyone know the best way to go about doing this?
Thanks in advance
function TodoCtrl($scope) {
$scope.data = [
{text:'learn angular', done:true},
{text:'build an angular app', done:false}];
$scope.orig = [$scope.data];
$scope.reset = function() {
$scope.data = $scope.orig;
};
}
More From » angularjs