Bits and Pieces

Insightful articles, step-by-step tutorials, and the latest news on full-stack composable software development

Follow publication

How I’ve Shifted My Angular App to a Standalone Components Approach

Kamil Konopka
Bits and Pieces
Published in
4 min readMay 17, 2023

--

Photo by Kevin Ku on Unsplash
Initial Standalone HomeComponent Class
ng g c test --standalone
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
selector: 'app-test',
standalone: true,
imports: [CommonModule],
templateUrl: './test.component.html',
styleUrls: ['./test.component.scss'],
})
export class TestComponent {}

Learn more here:

Module Based main.ts file
Initial Standalone main.ts file example implementation
Module Based App Routing Module Example
Root Routes replacement for App Routing Module
Standalone main.ts file with router

Read more of my articles here!:

Build Angular Apps with reusable components, just like Lego

Micro-Frontends

Design System

Code-Sharing and reuse

Monorepo

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in Bits and Pieces

Insightful articles, step-by-step tutorials, and the latest news on full-stack composable software development

Written by Kamil Konopka

JavaScript/Typescript experience with biggest corporates and scalable software, with focus on reactive / performance programming approach / high code quality.