![](/img/trans.png)
[英]Redirecting from one route to another in my laravel 4 and angularjs app
[英]Redirecting from one angular app to another in ionic
我目前正在將angularjs應用程序轉換為ionic,angularjs項目包含兩個應用程序:1.登錄應用程序和2.實際應用程序。
在運行離子服務時,首先將加載登錄應用程序(localhost / login),一旦用戶輸入了憑據,便會將用戶重定向到具有不同url(localhost / app)的實際應用程序。
在離子技術中是否可能出現相同的情況?
您可以使用$stateProvider
和$urlRouterProvider
來實現
查看此https://scotch.io/tutorials/angular-routing-using-ui-router教程
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
// HOME STATES AND NESTED VIEWS ========================================
.state('home', {
url: '/home',
templateUrl: 'partial-home.html'
})
// ABOUT PAGE AND MULTIPLE NAMED VIEWS =================================
.state('about', {
// we'll get to this in a bit
});
});
https://www.thepolyglotdeveloper.com/2014/11/using-ui-router-navigate-ionicframework/
重新整理以上教程
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.