
Angular Standalone
- 187 installs
- 6 repo stars
- Updated April 4, 2026
- oguzhan18/angular-ecosystem-skills
Migrate from NgModules to standalone components, bootstrap without AppModule, and colocate imports for leaner Angular project structure.
About
Explains Angular standalone APIs: creating components that import their own dependencies, bootstrapping with bootstrapApplication, lazy-loading standalone routes, migrating existing NgModule apps step by step, and reducing indirection while keeping DI providers explicit.
- Standalone component declarations and imports
- bootstrapApplication without NgModule
- Route-level lazy loading of standalone trees
- Incremental migration off legacy modules
- Provider configuration at bootstrap and route scope
Angular Standalone by the numbers
- 187 all-time installs (skills.sh)
- +2 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #878 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oguzhan18/angular-ecosystem-skills --skill angular-standaloneAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 187 |
|---|---|
| repo stars | ★ 6 |
| Last updated | April 4, 2026 |
| Repository | oguzhan18/angular-ecosystem-skills ↗ |
What it does
Migrate from NgModules to standalone components, bootstrap without AppModule, and colocate imports for leaner Angular project structure.
Files
Angular Standalone Components
Version: Angular 21 (2025) Tags: Standalone, Components, Imports, Bootstrap
References: Standalone Guide • Migration
API Changes
This section documents recent version-specific API changes.
- NEW: Standalone by default — New components are standalone by default since Angular 17
- NEW: provideRouter for standalone — Use functional providers instead of RouterModule
- NEW: ng generate @angular/core:standalone — Migration schematic
- DEPRECATED: NgModule — Migration to standalone components recommended
Best Practices
- Create standalone components
@Component({
standalone: true,
imports: [CommonModule, MatButtonModule],
selector: 'app-my',
template: `<button>Click</button>`
})
export class MyComponent {}- Use imports array for dependencies
@Component({
standalone: true,
imports: [
CommonModule,
RouterModule,
MatCardModule,
MyChildComponent
],
template: `
<mat-card>
<app-my-child></app-my-child>
</mat-card>
`
})
export class ParentComponent {}- Bootstrap standalone component
// main.ts
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { appConfig } from './app/app.config';
bootstrapApplication(AppComponent, appConfig)
.catch(err => console.error(err));- Use functional providers
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes),
provideHttpClient(),
provideAnimations()
]
};- Use provideZoneChangeDetection
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true })
]
};- Migrate from NgModule
# Full migration
ng generate @angular/core:standalone
# Specific component
ng generate @angular/core:standalone --path=path/to/component- Use Router Outlet with standalone
@Component({
standalone: true,
imports: [RouterOutlet],
template: `<router-outlet></router-outlet>`
})
export class AppComponent {}- Lazy load standalone components
const routes: Routes = [
{
path: 'admin',
loadComponent: () => import('./admin/admin.component').then(m => m.AdminComponent)
}
];- Use forwardRef for circular imports
@Component({
standalone: true,
imports: [forwardRef(() => OtherComponent)]
})
export class MyComponent {}- Export standalone components
@Component({
standalone: true,
exports: [MyComponent],
imports: [MyComponent]
})
export class FeatureComponent {}