stateprovider en angularjs: no representa la vista de interfaz de usuario
Bien. Estoy atrapado con esta parte durante dos días. He intentado todo lo que sé. Tengo mi enrutador ui cargado y un proveedor de estado definido. Tengo la interfaz de usuario como se muestra en varios ejemplos en el sitio web. Pero cuando corro, no muestra mi ui-view.
Index.html
<body ng-app='ngBRep'>
<div>
<div data-ng-include="'app/layout/shell.html'"></div>
</div>
<!--Angular-->
<script src="scripts/angular.js"></script>
<script src="scripts/angular-ui-router.js"></script>
</body>
Shell.html
<div data-ng-controller="shell as vm">
SHELL
<div ui-view></div>
</div>
Entry.html
<section id="entry-view" data-ng-controller="entry as vm">
ENTRY
</section>
app.js
var app = angular.module('ngBRep', [
'ui.router'
]);
routes.js
var app = angular.module('ngBRep');
app.config(['$stateProvider', '$urlRouterProvider', routeConfigurator]);
function routeConfigurator($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/");
$stateProvider
.state('/', {
url: '/',
templateUrl: 'app/views/entry.html'
})
.state('profile', {
url: '/profile',
templateUrl: 'app/views/profile.html'
});
// Send to login if the URL was not found
}
Mi expectativa es que cuando busco index.html, debería ver SHELL PROFILE
Pero solo consigo SHELL.
Y lo peor, hay un sitio web existente en nuestro proyecto que hace exactamente esto y funciona.
Cualquier ayuda será apreciada. Gracias.