angular / angular/angular-cli

Support relative pathing for `ng generate` statements

オープン
#6,684 コメント 2 件 リアクション 5 件 担当者 0 名 GitHub で見る
area: @schematics/angular feature feature: insufficient votes
主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
14時間 23分
マージ済み PR(30日)
162

説明

### Bug Report or Feature Request (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [x] feature request
```

### Versions.
```@angular/cli: 1.0.4
node: 6.10.2
os: linux x64
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.0.4
@angular/compiler-cli: 4.1.3
```

### Repro steps.

From project root:
```
ng g component ./src/app/components/test
```

### The log given by the failure.
```
installing component
create src/app/src/app/components/test/test.component.scss
create src/app/src/app/components/test/test.component.html
create src/app/src/app/components/test/test.component.spec.ts
create src/app/src/app/components/test/test.component.ts
```

### Desired functionality.

Doesn't create src/app under the (already existing) src/app directory.

This is a minor change, but would then allow me to use autocomplete with the generator, even if the immediate fix is to just remove 'src/app' from the file location input before processing.

### Mention any other details that might be useful.

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

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

調査の方向性

プロジェクトルートから `ng g component ./src/app/components/test` を実行して問題を再現し、Angular CLI ジェネレーターがその相対パスをどのように解決するかを調査してください。生成されたファイルが既存の `src/app` ディレクトリ配下に配置され、重複した `src/app/src/app` パスが作成されなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
cli, tooling
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

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

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