0
我想從ng路由到ui.router,但我似乎無法得到它的工作。它不斷給我一個錯誤,我的應用程序不斷崩潰。從ng路由到Ui.Router的角度
這是我已經設置我的app.js:
var app = angular.module("loodgietersApp", ["ui.router"]);
app.config(function($stateProvider, $urlRouterProvider, $locationProvider,$animateProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home', {
url: '/home',
templateUrl: 'partials/home.html'
})
.state('24-uur-loodgieter-service', {
url: '/24-uur-loodgieter-service',
templateUrl: 'partials/24-hour-service.html'
});
$locationProvider.html5Mode(true);
});
這是玉索引文件:
script(type="application/javascript" src="//unpkg.com/angular-ui-router/release/angular-ui-router.min.js")
body
div(class="nav-bar")
ul
li
a(href="/24-uur-loodgieter-service")
div(class="box")
div(class="animate-box page" ui-view my-scroll)
div(ng-include="'partials/includes/brands.html'")
div(ng-include="'partials/includes/specialisations.html'")
div(ng-include="'partials/includes/footer.html'")