ionic-team / ionic-team/ionic-cli

Using 'ionic generate tabs' produces invalid ngModule with tab

オープン
#2,449 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
2k
フォーク
682
PR マージ指標
30日以内にマージされた PR はありません

説明

**Description:**
ionic generate tabs issue

When we generate tabs, the main tab module contains also dependency after the first tab. It generates Angular error because one Angular component cannot be used in two different modules with the same name.

Here is the code for tabs page with not needed reference to FirstPage component
```
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { TabyPage } from './taby';
import { FirstPage } from '../first/first';

@NgModule({
declarations: [
TabyPage,
FirstPage, // this component should NOT be here
],
imports: [
IonicPageModule.forChild(TabyPage),
]
})
export class TabyPageModule {}
```

**My `ionic info`:**

global packages:

@ionic/cli-utils : 1.4.0
Ionic CLI : 3.4.0

local packages:

@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-ionic-angular : 1.3.0
Ionic Framework : ionic-angular 3.3.0

System:

Node : v6.9.5
OS : Linux 4.4
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.10

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。