Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to create library called anything-routing #11961

Closed
pawelkondraciuk opened this issue Aug 21, 2018 · 4 comments · Fixed by #11994
Closed

Not possible to create library called anything-routing #11961

pawelkondraciuk opened this issue Aug 21, 2018 · 4 comments · Fixed by #11994

Comments

@pawelkondraciuk
Copy link

pawelkondraciuk commented Aug 21, 2018

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Node: v8.11.3
npm: 6.1.0
ng: 6.1.4
Mac HighSierra

Repro steps

ng g lib anything-routing

The log given by the failure

Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

Desired functionality

If you treat libraries as Feature Modules and follow Angular guidelines you should be able to create library called feature-routing

Mention any other details that might be useful

@ngbot ngbot bot added this to the needsTriage milestone Aug 22, 2018
@alan-agius4
Copy link
Collaborator

Note: at the moment anything which is -routing.module.ts is reserved for routing.

@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Aug 22, 2018
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Aug 22, 2018

This needs to be discussed further due to style guides. If we should allow non routing modules to be named with -routing.module

//cc @IgorMinar & @robwormald

@alexeagle
Copy link
Contributor

At this location, where we report the error:

throw new Error('Could not find an NgModule. Use the skip-import '

we should make it clear that we don't add to the routing module, and -routing.module.ts is special, so don't do that.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants