test(angular): update test app to account for standalone components - #27867
Merged
Conversation
|
|
liamdebeasi
marked this pull request as ready for review
July 27, 2023 14:21
liamdebeasi
requested review from
a team,
averyrousseau and
sean-perkins
and removed request for
a team
July 27, 2023 14:21
liamdebeasi
commented
Jul 27, 2023
| }) | ||
| export class TestComponent { | ||
| constructor() { | ||
| console.log('This should be undefined:', customElements.get('ion-app')); |
Contributor
Author
There was a problem hiding this comment.
This is a placeholder for now to verify that the IonicModule is not being defined
sean-perkins
approved these changes
Jul 27, 2023
| path: 'form-controls/range', | ||
| loadChildren: () => import('./form-controls/range/range.module').then(m => m.RangeModule) | ||
| } | ||
| { path: 'lazy', loadChildren: () => import('./app-lazy/app.module').then(m => m.AppModule) }, |
Contributor
There was a problem hiding this comment.
~ Should we add a default match path to redirect to a known route? Otherwise when serving the app you need to know to go to /lazy/something or /standalone/something?
e.g.:
{
path: '',
pathMatch: 'full',
redirectTo: '/lazy'
}
2 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue number: N/A
What is the current behavior?
We do not have a way of testing Ionic UI standalone components isolated from the regular lazy loaded bundle
What is the new behavior?
In order to test standalone components isolated from the lazy loaded components, we need to and environment where the lazy loaded components never get initialized. As a result, I made the following changes:
/lazyand/standalone. Any/lazy/*routes will haveIonicModuleinitialized at the root: https://github.com/ionic-team/ionic-framework/pull/27867/files#diff-174033d040c9d2279d515398002826936441e7892b50ecde6a815fb719c48b9eR9-R18. Any/standalone/*routes will not haveIonicModuleinitialized./lazyprefix is added. For example,/accordionsis now/lazy/accordions.app-lazycomponent. This renders IonApp and IonRouterOutlet using the lazy components. All lazy routes are rendered as children of this component.app-standalonecomponent. This renders a regularrouter-outletfor now as a placeholder (since we don't have any Ionic UI components as standalone at the moment). But the idea here is that team members will be able to create routes here to test standalone UI components.Does this introduce a breaking change?
Other information