Created
May 31, 2016 14:49
-
-
Save sinkz/48b316bc6dd73d9167591b8ef9fea154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict' | |
angular.module('CadastroAPP') | |
.config(configFunction) | |
function configFunction($stateProvider, $urlRouterProvider) { | |
$urlRouterProvider.otherwise("/"); | |
$stateProvider | |
.state('login', { | |
url: "/", | |
views: { | |
"main": { | |
controller: 'LoginController as loginVm', | |
templateUrl: "app/views/login.html", | |
} | |
} | |
}) | |
.state('home', { | |
url: "/home", | |
views: { | |
"main": { | |
templateUrl: "app/views/home.html", | |
controller: 'homeController as homeVm' | |
} | |
} | |
}) | |
.state('preenchimentoIncompleto', { | |
parent: 'home', | |
url: "/preenchimentoIncompleto", | |
views: { | |
"auth": { | |
controller: 'preenchimentoIncompletoController as preenchimentoInc', | |
templateUrl: "app/views/PreenchimentoIncompleto/PreenchimentoIncompleto.html", | |
resolve: { | |
loadPlugin: function($ocLazyLoad) { | |
return $ocLazyLoad.load([ | |
{ | |
name: 'vendors', | |
files: [ | |
'vendors/input-mask/input-mask.min.js', | |
'vendors/sparklines/jquery.sparkline.min.js', | |
'vendors/bower_components/jquery.easy-pie-chart/dist/jquery.easypiechart.min.js' | |
] | |
} | |
]) | |
} | |
} | |
} | |
} | |
}) | |
.state('detalhesPreenchimento', { | |
parent: 'home', | |
url: "/detalhesPreenchimento/:cpf", | |
views: { | |
"auth": { | |
controller: 'detalhesPreenchimentoController as detalhesPreenchimento', | |
templateUrl: "app/views/PreenchimentoIncompleto/detalhesPreenchimento.html", | |
resolve: { | |
preenchimentos: function(preenchimentoIncompletoAPI, $stateParams) { | |
return preenchimentoIncompletoAPI.findByCpf($stateParams.cpf); | |
} | |
} | |
} | |
} | |
}) | |
.state('reportI', { | |
parent: 'home', | |
url: "/reportI", | |
views: { | |
"auth": { | |
controller: 'reportIController as reportICtrl', | |
templateUrl: "app/views/Relatorios/reportI.html", | |
resolve: { | |
reportI: function(reportISercice) { | |
return reportISercice.getReport(); | |
} | |
} | |
} | |
} | |
}) | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment