angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Add `--standalone` option to `ng new`

Open Lonli-Lokli opened this issue 1 year ago • 5 comments

Command

new

Description

Right now ng new do not use standalone application bootstrap, but usual app instead. Nw option should change application to the standalone option, without AppModule

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Lonli-Lokli avatar Sep 28 '22 16:09 Lonli-Lokli

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Sep 29 '22 13:09 angular-robot[bot]

@alan-agius4 can you vote for this as well? :)

Lonli-Lokli avatar Sep 29 '22 15:09 Lonli-Lokli

@Lonli-Lokli, this is already in the backlog.

alan-agius4 avatar Oct 11 '22 13:10 alan-agius4

If no one else is working on this issue, can I work on it?

mounilKshah avatar Oct 12 '22 01:10 mounilKshah

@mounilKshah, thanks for offering to take this up. The new project structure is still in its design phase.

alan-agius4 avatar Oct 12 '22 05:10 alan-agius4

Any update on where this is on the roadmap?

LMFinney avatar Dec 19 '22 19:12 LMFinney

When creating an app with this option. Will the CLI generate standalone components/directives in the project by default? (not needing --standalone flag). What about generating functional guards/interceptors/resolvers by default?

Like @LMFinney said. Is there any information regarding when / how will this be implemented? . I've been using (and teaching) these last 2 months Angular 15 with standalone components and functional guards/interceptors/resolvers, and I find it simpler and cleaner. Sadly there are many libraries (including Universal) that still don't support apps without AppModule (using bootstrapApplication) and fail when executing ng add (Bootstrap module not found).

arturober avatar Dec 20 '22 21:12 arturober

@mounilKshah @alan-agius4 Any updates on this? Seems like a pretty major thing to not include with the CLI now that the standalone api has shipped in v15. This is a pretty major setback for myself and the others at my company when it comes to teaching any curriculum related to Angular with the standalone api since we generate a fresh angular app to workshop on with learned topics/patterns.

Unfortunately at this point, I will probably have to end up going with some version of a Nx workspace (or the angular-standalone preset Nx has). Nx has had this functionality for a while with their generators and this doesn't seem to have much priority for the Angular CLI.

zjkipping avatar Jan 20 '23 21:01 zjkipping

I think the CLI need to have the --standalone flag, too. Is there any update?

Flo0806 avatar Mar 11 '23 18:03 Flo0806

You guys are the best! 🎊 Thx!

Flo0806 avatar Mar 15 '23 18:03 Flo0806

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.