Is it possible to have a screen routing configuration for each module with Angular JS ? If possible, how to route between modules?

Asked

Viewed 15 times

1

var app = angular.module("app", ['ngMaterial', 'ui.utils.masks', 'ngMessages', 'toastr', 'ngStorage', 'ui.router']);

app.config(function ($stateProvider, $urlRouterProvider) {
    $stateProvider
            .state("Servicos", {
                url: "/Servicos",
                templateUrl: 'GED-ME-Tamplates/Servicos.html'
            })
            .state("Acesso", {
                url: "/Acesso",
                templateUrl: 'GED-ME-Tamplates/Acesso.html',
                controller: 'AcessoCtrl'
            })
            .state("Cadastro", {
                url: "/Cadastro",
                templateUrl: 'GED-ME-Tamplates/Cadastro.html',
                controller: 'CadastroCtrl'
            })
            .state("VerificarDoc", {
                url: "/AutenticidadeDeDocumentos",
                templateUrl: 'GED-ME-Tamplates/VerificarDoc.html',
                controller: 'VerificarDocCtrl'
            });
    $urlRouterProvider.otherwise("/Servicos");
});

//----------------------------------------------------------------------------//

var appInterno = angular.module("appInterno", ['ngMaterial', 'ui.utils.masks', 'ngMessages', 'toastr', 'ngStorage', 'ui.router']);

appInterno.config(function ($stateProvider, $urlRouterProvider) {
    $stateProvider
            .state("AreaDoUsuario", {
                templateUrl: 'GED-ME-Tamplates/AreaDoUsuario.html',
                controller: 'AreaDoUsuarioCtrl'
            })
            .state("DocumentosAassinar", {
                url: "/DocumentosAassinar",
                parent: 'AreaDoUsuario',
                templateUrl: 'GED-ME-Tamplates/DocumentosAassinar.html',
                controller: 'DocumentosAassinarCtrl'
            })
            .state("Buscar", {
                url: "/Buscar",
                parent: 'AreaDoUsuario',
                templateUrl: 'GED-ME-Tamplates/Buscar.html',
                controller: 'BuscarCtrl'
            });
    $urlRouterProvider.otherwise("/404");
});
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.