[英]ionic routing issue with ionic framwork, it is sowing blank page?
I started building ionic app, and I want to change the views, I am not using tag, I have separate file for every view. 我开始构建离子应用程序,我想更改视图,我没有使用标签,每个视图都有单独的文件。
The states look like this: 状态看起来像这样:
var route = angular.module('route', []);
route.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url: '/home',
abstract: true,
templateUrl: 'home.html',
})
.state('login', {
url: '/login',
templateUrl: 'login.html'
})
.state('register', {
url: '/register',
templateUrl: 'register.html'
})
.state('manage-booking', {
url: '/manage-booking',
templateUrl: 'manage_booking.html'
})
.state('clinic-list', {
url: '/clinic-list',
templateUrl: 'clinic_list.html'
})
$urlRouterProvider.otherwise('/home');
});
When I run the app, the url defaults to '/#/home' 当我运行应用程序时,URL默认为“ /#/ home”
I am not able to figure out why is it not loading the home page. 我无法弄清楚为什么不加载主页。 When I change the otherwise to point to '/#/login', everything works. 当我将else更改为指向'/#/ login'时,一切正常。
删除abstract: true
属性( source )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.