繁体   English   中英

在离子中从一个角度应用重定向到另一个

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM