Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 离子-如何正确路由到目标模板?_Angularjs_Ionic Framework - Fatal编程技术网

Angularjs 离子-如何正确路由到目标模板?

Angularjs 离子-如何正确路由到目标模板?,angularjs,ionic-framework,Angularjs,Ionic Framework,我正在尝试使用来自的模板构建应用程序。我试图创建一个登录页面,但不知怎么的,呈现的模板不是我想要的 这是我根据 下面是app.module.js (function() { 'use strict'; angular .module('starter', [ /* Shared modules */ 'ionic', 'starter.core', 'starter

我正在尝试使用来自的模板构建应用程序。我试图创建一个登录页面,但不知怎么的,呈现的模板不是我想要的

这是我根据

下面是app.module.js

(function() {

    'use strict';

    angular
        .module('starter', [
            /* Shared modules */
            'ionic',
            'starter.core',
            'starter.login',
            'starter.layout',
            /* Feature areas */
            'starter.account',
            'starter.chat',
            'starter.dash'
        ]);
})();
为此渲染的显示是选项卡布局。当我移除其他模块时,只留下
离子、starter.core、starter.login
,呈现的显示是一个空白页面。但是,当我在
layout.route.js
中更改
templateUrl
时,它呈现了我想要的页面

function getStates() {
        return [
            {
                state: 'tab',
                config: {
                    url: '/tab',
                    abstract: true,                 
                    templateUrl: 'login/login.html'
                }
            }
        ];
    }
如何从
login.route.js
路由到
login/login.html

function getStates() {
        return [
            {
                state: 'tab',
                config: {
                    url: '/tab',
                    abstract: true,                 
                    templateUrl: 'login/login.html'
                }
            }
        ];
    }