You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generating Blueprints in directory other than src/app #5995
hi.. If I change the name of the folder src/app to say src/lib how do i ensure that if I do things like ng generate component foo, angular-cli will know to place the FooComponent in src/lib? Is there something in .angular-cli.json I'm supposed to update? Thanks
@somombo no way right now unfortunately. We’re working on removing the hard coded app directories, in favor of looking at the bootstrapping code.
@hansl that's nice for apps that are bootstrapped. But if someone is working on let's say a library that's bootstrapped only in unit tests, then that will be problematic, unless you are incorporating that into your plans somehow?
I think its not a bad idea to just have an extra configuration in .angular-cli.json to simply change the default name from "app".
Another alternative resolution for the meantime, is to allow the following to command to work ng generate directive mydirname --export --module="../lib/mylib.module"
It current results in the error: Invalid path: "../lib/quill.module.ts" cannot be above the "src/app" directory
Ultimately I could see having multiple sibling source directories at "src/*" level such some subset of :
Activity
filipesilva commentedon May 5, 2017
There's a couple of things in this issue:
somombo commentedon Oct 5, 2017
looks like #6079 fixes this
angular-automatic-lock-bot commentedon Sep 7, 2019
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.