mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
30 lines
856 B
JavaScript
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 = {};
|
|
};
|
|
});
|