docs: update import and note formatting in guides

(cherry picked from commit a8bf957086)
This commit is contained in:
SkyZeroZx
2026-03-18 14:04:15 -05:00
committed by Matthew Beck
parent 851ef77318
commit 675d4fb489
4 changed files with 8 additions and 14 deletions
@@ -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
+1 -1
View File
@@ -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
@@ -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';
@@ -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';