From 675d4fb4893e1cb0cf27d03c3cc4787f3130e078 Mon Sep 17 00:00:00 2001 From: SkyZeroZx <73321943+SkyZeroZx@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:04:15 -0500 Subject: [PATCH] docs: update import and note formatting in guides (cherry picked from commit a8bf957086fab061f6d0898e562323da0e362ab8) --- .../guide/components/anatomy-of-components.md | 2 +- adev/src/content/guide/templates/binding.md | 2 +- adev/src/content/guide/templates/ng-content.md | 6 ++---- adev/src/content/guide/templates/two-way-binding.md | 12 ++++-------- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/adev/src/content/guide/components/anatomy-of-components.md b/adev/src/content/guide/components/anatomy-of-components.md index 1bb8e6ae962..bdf6f8703e0 100644 --- a/adev/src/content/guide/components/anatomy-of-components.md +++ b/adev/src/content/guide/components/anatomy-of-components.md @@ -76,7 +76,7 @@ export class UserProfile {} By default, Angular components are _standalone_, meaning that you can directly add them to the `imports` array of other components. Components created with an earlier version of Angular may instead specify `standalone: false` in their `@Component` decorator. For these components, you instead import the `NgModule` in which the component is defined. See the full [`NgModule` guide](guide/ngmodules/overview) for details. -Important: In Angular versions before 19.0.0, the `standalone` option defaults to `false`. +IMPORTANT: In Angular versions before 19.0.0, the `standalone` option defaults to `false`. ### Showing components in a template diff --git a/adev/src/content/guide/templates/binding.md b/adev/src/content/guide/templates/binding.md index 79dcf6e9205..3fe72f50a21 100644 --- a/adev/src/content/guide/templates/binding.md +++ b/adev/src/content/guide/templates/binding.md @@ -192,7 +192,7 @@ When binding `class` to an array or an object, Angular compares the previous val If an element has multiple bindings for the same CSS class, Angular resolves collisions by following its style precedence order. -> **Note:** Class bindings do not support space-separated class names in a single key. They also don't support mutations on objects as the reference of the binding remains the same. If you need one or the other, use the [ngClass](/api/common/NgClass) directive. +NOTE: Class bindings do not support space-separated class names in a single key. They also don't support mutations on objects as the reference of the binding remains the same. If you need one or the other, use the [ngClass](/api/common/NgClass) directive. ### CSS style properties diff --git a/adev/src/content/guide/templates/ng-content.md b/adev/src/content/guide/templates/ng-content.md index 93713abef82..9047bee9cfe 100644 --- a/adev/src/content/guide/templates/ng-content.md +++ b/adev/src/content/guide/templates/ng-content.md @@ -4,8 +4,7 @@ Here is an example of a `BaseButton` component that accepts any markup from its parent. -```angular-ts -// ./base-button/base-button.ts +```angular-ts {header:'base-button/base-button.ts'} import {Component} from '@angular/core'; @Component({ @@ -15,8 +14,7 @@ import {Component} from '@angular/core'; export class BaseButton {} ``` -```angular-ts -// ./app.ts +```angular-ts {header:'app.ts'} import {Component} from '@angular/core'; import {BaseButton} from './base-button'; diff --git a/adev/src/content/guide/templates/two-way-binding.md b/adev/src/content/guide/templates/two-way-binding.md index 45c0ddc2a76..62a6523d5e4 100644 --- a/adev/src/content/guide/templates/two-way-binding.md +++ b/adev/src/content/guide/templates/two-way-binding.md @@ -46,8 +46,7 @@ Leveraging two-way binding between a parent and child component requires more co Here is an example where the `App` is responsible for setting the initial count state, but the logic for updating and rendering the UI for the counter primarily resides inside its child `Counter`. -```angular-ts -// ./app.ts +```angular-ts {header: 'app.ts'} import {Component} from '@angular/core'; import {Counter} from './counter'; @@ -66,8 +65,7 @@ export class App { } ``` -```angular-ts -// './counter.ts'; +```angular-ts {header: 'counter.ts'} import {Component, model} from '@angular/core'; @Component({ @@ -95,8 +93,7 @@ The child component must contain a `model` property. Here is a simplified example: -```angular-ts -// './counter.ts'; +```angular-ts {header: 'counter.ts'} import {Component, model} from '@angular/core'; @Component({ @@ -118,8 +115,7 @@ The parent component must: Here is a simplified example: -```angular-ts -// ./app.ts +```angular-ts {header: 'app.ts'} import {Component} from '@angular/core'; import {Counter} from './counter';