1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-04 15:24:23 +01:00
fab-manager/vendor/assets/components/angular-unsavedChanges/demo/app.js
2015-05-05 03:10:25 +02:00

30 lines
856 B
JavaScript

angular
.module('app', ['unsavedChanges', 'ngRoute'])
.config(['$routeProvider', 'unsavedWarningsConfigProvider',
function($routeProvider, unsavedWarningsConfigProvider) {
$routeProvider
.when('/page1', {
templateUrl: 'page1.html'
})
.when('/page2', {
templateUrl: 'page2.html'
})
.otherwise({
redirectTo: '/page1'
});
unsavedWarningsConfigProvider.useTranslateService = false;
}
])
.controller('demoCtrl', function($scope) {
$scope.user = {
name: '',
email: ''
};
$scope.demoFormSubmit = function() {
$scope.message = 'Form Saved';
$scope.user = {};
};
});