I'm trying to go from ng-Route to ui.router, but I can't seem to get it working. It keeps giving me an error and my app keeps crashing.
This is how I've setup my 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); }); This is the jade index file:
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'")