Repository navigation
Commit b7e2456
fix(@schematics/angular): include the type separator in the class spec import
class spec template imports `'./<name><type>'`, and `type` reaches it without leading dot since class schematic moved to `generateFromFiles`
so `ng g class user --type=model` writes `user.model.spec.ts` with `import { User } from './usermodel'` and generated spec does not compile
template now adds dot only when type is set, matching `__type__` file name token
(cherry picked from commit 4a59335)1 parent 18e5dc6 commit b7e2456
2 files changed
Lines changed: 9 additions & 1 deletion
File tree
- packages/schematics/angular/class
- files
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
0 commit comments