2016-12-22 6 views

答えて

2

最も短い答えは、アプリケーションテンプレートを削除できないため、共通の親ルートの下でレイアウトを共有するすべてのルートをネストする必要があることです。これは、目的に応じていくつかの異なる方法で行うことができます。

彼らはすべての共有URLセグメントの場合は、共通の親の下で、その後に置くことができます。

Router.map(function() { 
    this.route('pretty-layout', function() { 
    this.route('page-1'); // http://localhost:4200/pretty-layout/page-1 
    this.route('page-2'); // http://localhost:4200/pretty-layout/page-2 
    }); 
}); 

あなたはトップレベルのインデックスルートを上書きすることができます。現在のapplication.indexapplication.index.indexに移動する必要があります。

Router.map(function() { 
    this.route('index', { path: '/' }, function() { 
    this.route('page-1'); // http://localhost:4200/page-1 
    this.route('page-2'); // http://localhost:4200/page-2 
    }); 
}); 
関連する問題