[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
When invoking the Angular CLI generator for items that require importing (components/pipes/etc.), we get the error More than one module matches. Use the skip-import option to skip importing the component into the closest module or use the module option to specify a module. Manually specifying --module app.module is required.
The Angular CLI generator should work as expected. This also breaks Nx generator, which uses Angular CLI underneath.
ng new hello)cd hello && ng add @ngneat/transloco)ng g c foo)
Angular version: 10.0.6
For Tooling issues:
- Node version: 10
- Platform: Mac
@karmasakshi thanks for bringing that up...
The solution for this will be to put the transloco-root.module under a folder named /transloco in the app root module, would you like to create a PR that solves that?
@itayod Sure.
@itayod Sorry, first-time contributor here. How can I check if this fixed the issue?
Do you know why the CLI doesn't get confused with app-routing.module? If it's a naming convention or a config in angular.json I think we could leverage that.
@karmasakshi in order to test it you can run build the schematics or run schematics:watch for dev, then create a test project and run npm link transloco-schematics then you will be able to run the add command as following: ng g transloco-schematics:init
Do you know why the CLI doesn't get confused with
app-routing.module? If it's a naming convention or a config inangular.jsonI think we could leverage that.
Sure, they actually handle it hard codedly by specifically ignoring -routing.module files :)