-
Notifications
You must be signed in to change notification settings - Fork 136
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
Standalone applications support #994
Conversation
Hi @wawyed, I understand your time for this project is limited, I just will like to know if you have any feedback or update regarding this change. please let me know when you have time. Kind regards |
I will try to make some time. Just wondering what's the benefit of this? |
Hi @wayed, thanks for getting back to me! About this update, it is related to the new Standalone application feature released by the Angular framework a few versions ago, but that will become default for v19. This change in the Angular framework is intended to reduce the amount of boilerplate code needed for creating applications, basically by removing the need for NgModules. The change I'm proposing to uirouter/angular has 2 parts:
@Component({
standalone: true,
imports: [UIView],
selector: 'my-component',
template: `
<h1>My Title</h1>
<div ui-view></div>
`
})
export class MyComponent {}
import { bootstrapApplication } from '@angular/platform-browser';
import { provideUIRouter } from '@uirouter/angular';
import { AppComponent } from './app/app.component';
bootstrapApplication(AppComponent, {
providers: [
provideUIRouter({
otherwise: '/home',
states: [homeState, aboutState]
})
]
})
.catch((err) => console.error(err)); As you can see all this changes from the Angular team are intended to make the use of NgModules optional and at the same time reducing boilerplate code in applications. here is the official blob post where Angular Team explains how this feature will become default in v19 https://blog.angular.dev/the-future-is-standalone-475d7edbc706 I hope this explanation helps, If you have any follow up question please let me know. Thanks for your time! |
This reverts commit 2955b86.
…cing a potencial breaking change if projects use ui-view component as the bootstrap component.
Hi @wawyed, this is a proposal to implement support for standalone applications. The project v18-standalone under the test-angular-versions has an example of how it can be used.
Fixes #989