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

Issue with Component Generation Angular First App #54682

Closed
Barathwaja opened this issue Mar 4, 2024 · 4 comments
Closed

Issue with Component Generation Angular First App #54682

Barathwaja opened this issue Mar 4, 2024 · 4 comments

Comments

@Barathwaja
Copy link

Barathwaja commented Mar 4, 2024

Describe the problem that you experienced

In the Video Tutorial @MarkTechson uses command - ng generate component Home --standalone --inline-template to generate Folder - Home.
But in the document below uses the command - ng generate component home which fails with error - "Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule."

The command in the documentation should be updated as per video instruction.

Enter the URL of the topic with the problem

https://angular.dev/tutorials/first-app/02-HomeComponent

Describe what you were looking for in the documentation

Step 1.2: To create new components named Home we should use this command - ng generate component Home --standalone --inline-template

Add a screenshot if that helps illustrate the problem

image

If this problem caused an exception or error, please paste it here

Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule.
@Barathwaja
Copy link
Author

I can update the documentation and raise a PR.

@jnizet
Copy link
Contributor

jnizet commented Mar 4, 2024

The documentation at https://angular.dev uses Angular 17, and Angular CLI 17, with the default options. With those default options, The application and the components being created are standalone: they don't use NgModule.
The error you got shows that you probably use an older version.

Execute ng version, and you'll see which version of the Angular and the CLI you're using.

@pkozlowski-opensource
Copy link
Member

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

@pkozlowski-opensource pkozlowski-opensource closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@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 Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants