Angular Tutorial 0/55 lessons ~6 min read Lesson 55

    Angular Modern CLI & Schematics Defaults

    Modern Angular CLI defaults generate standalone components, the application builder, and stricter TypeScript settings.

    Course progress0%
    Focus
    6 guided sections
    Practice signal
    Examples included
    Career prep
    Interview Q&A included

    Introduction

    Modern Angular CLI defaults generate standalone components, the application builder, and stricter TypeScript settings. Knowing the defaults prevents fighting the tooling when you add features or migrate older workspaces.

    Purpose of this lesson

    You will recognize current schematic defaults and the flags that still matter.

    Understanding the topic

    Defaults to expect on new apps:

    • Standalone components and bootstrapApplication.
    • Application builder (esbuild) rather than the legacy browser builder.
    • Routing and HttpClient provided via provideRouter / provideHttpClient.
    • Styles as CSS/SCSS per schematic options; Vitest/Jest depends on workspace setup.

    Informative example

    Generate a standalone feature component:

    bash
    ng generate component courses/course-card
    # Modern CLI: standalone by default
    ng generate route learn/:slug --project=web
    # Prefer functional routes + loadComponent patterns in app.routes.ts

    Best practices

    • Run ng update migrations instead of hand-editing angular.json builder names.
    • Keep schematic defaults in a team style guide so PRs do not reintroduce NgModules casually.

    Advanced interview questions

    Interview Prep

    Practice concise answers, then expand each card for the explanation.

    1 questions
    1BeginnerQuestionWhat changed in Angular CLI defaults in recent majors?+

    Answer

    Standalone-first components, application/esbuild builder, and provider functions in bootstrap instead of AppModule-centric scaffolding.
    Ready to mark this lesson complete?Track your journey across the entire course.