-
Notifications
You must be signed in to change notification settings - Fork 13.3k
fix(angular): ng add @ionic/angular in standalone projects #28523
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b01d13b
fix(angular): ng add @ionic/angular in standalone projects
sean-perkins 4e18bf6
fix: return rule
sean-perkins 40f8b95
fix: add missing toolkit configuration
sean-perkins 6566960
chore: create ionic config
sean-perkins 599bb7a
chore: quote formatting
sean-perkins e7d0989
fix: set angular-standalone type in ionic config
sean-perkins 94ad0a6
chore: stricter type for schematic options
sean-perkins 8cecea2
fix: type issue with angular/cli v14
sean-perkins 925bbdb
chore: prettier
sean-perkins 2fe8951
chore: add tech debt task
sean-perkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure if this is related, but I get the following error when I try to run
ionic serve:This happens in ng16 and ng17.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe the schematic updates should impact that. This schematic's execution context is purely for the
ng addcommand. After that it has no usage.For example if I use the dev-build to run
ng addand then install the latest version of@ionic/angularI get the same exception when usingionic serve:Developers really should be using the
startcommand script with their projects:npm start.Edit: But we should probably track this problem for the Ionic CLI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok looked into this more. You cannot assume to use
ionic servein a new Angular project. If the project name is not "app" it won't work.For example my project is called
angular-blank, so the command would need to be:Our schematic could change the project name, but I think that is extremely high risk to break a lot of things in the consumers project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this problem happened before the dev build them I'm fine keeping it out of scope. I assumed you could use
ionic servebecause theionic.config.jsonfile was present, but maybe that's not the case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you can use the Ionic CLI if you provide the project name for your angular project. If a name is not provided it defaults to
app.e.g.: