0
I’m making the mistake of
Referenceerror: $locationProvider is not defined.
I’m using angular-ui-router. Can you help me?
Obs: I removed the #.
var app = angular.module("app", ['ui.router', 'angularUtils.directives.dirPagination']);
app.config([$locationProvider, function ($stateProvider, $urlRouterProvider) {
$locationProvider.html5Mode(true);
$urlRouterProvider.when("", "/Index");
$stateProvider
.state('/Empresas',
{ templateUrl: $("#linkBase").attr("href") + 'templates/Empresa/empresas.html',
controller: 'EmpresaController' })
.state('/Usuarios',
{ templateUrl: $("#linkBase").attr("href") + 'templates/Usuario/usuarios.html',
controller: 'UsuarioController' })
}]);
I changed the config and gave no more error however the routes do not work. . config(Function ($stateProvider, $urlRouterProvider, $locationProvider)
– Andersson OS