Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ git_override(
bazel_dep(name = "rules_angular")
git_override(
module_name = "rules_angular",
commit = "af626f77ad610d1a9c47ee317af88e2c8edd66a4",
commit = "32ce54318d9ec5d84269d4acecbc39944cd8b5e7",
remote = "https://github.com/angular/rules_angular.git",
)

Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion docs/src/app/material-docs-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, OnDestroy, ViewEncapsulation, inject} from '@angular/core';
import {
ChangeDetectionStrategy,
Component,
OnDestroy,
ViewEncapsulation,
inject,
} from '@angular/core';

import {AnalyticsService} from './shared/analytics/analytics';
import {NavigationFocusService} from './shared/navigation-focus/navigation-focus.service';
Expand All @@ -27,6 +33,7 @@ import {HeaderTagManager} from './shared/header-tag-manager';
styleUrls: ['./material-docs-app.scss'],
encapsulation: ViewEncapsulation.None,
imports: [NavBar, RouterOutlet, CookiePopup],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class MaterialDocsApp implements OnDestroy {
private _subscriptions = new Subscription();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, OnDestroy, OnInit, inject} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnDestroy, OnInit, inject} from '@angular/core';
import {ActivatedRoute, RouterLink} from '@angular/router';
import {MatRipple} from '@angular/material/core';
import {NgTemplateOutlet} from '@angular/common';
Expand All @@ -26,6 +26,7 @@ import {ComponentPageTitle} from '../page-title/page-title';
templateUrl: './component-category-list.html',
styleUrls: ['./component-category-list.scss'],
imports: [NavigationFocus, RouterLink, MatRipple, NgTemplateOutlet],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class ComponentCategoryList implements OnInit, OnDestroy {
private readonly _docItems = inject(DocumentationItems);
Expand Down
11 changes: 10 additions & 1 deletion docs/src/app/pages/component-sidenav/component-sidenav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, ViewEncapsulation, forwardRef, inject, viewChild} from '@angular/core';
import {
ChangeDetectionStrategy,
Component,
ViewEncapsulation,
forwardRef,
inject,
viewChild,
} from '@angular/core';
import {BreakpointObserver} from '@angular/cdk/layout';
import {AsyncPipe} from '@angular/common';
import {MatListItem, MatNavList} from '@angular/material/list';
Expand Down Expand Up @@ -46,6 +53,7 @@ const SMALL_WIDTH_BREAKPOINT = 959;
templateUrl: './component-sidenav.html',
styleUrls: ['./component-sidenav.scss'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.Eager,
imports: [
MatSidenav,
MatSidenavContainer,
Expand Down Expand Up @@ -97,6 +105,7 @@ export class ComponentSidenav {
selector: 'app-component-nav',
templateUrl: './component-nav.html',
imports: [MatNavList, MatListItem, RouterLinkActive, RouterLink, AsyncPipe],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class ComponentNav {
private _docItems = inject(DocumentationItems);
Expand Down
3 changes: 2 additions & 1 deletion docs/src/app/pages/component-viewer/component-styling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, inject, Injectable} from '@angular/core';
import {ChangeDetectionStrategy, Component, inject, Injectable} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
import {HttpClient} from '@angular/common/http';
import {AsyncPipe} from '@angular/common';
Expand Down Expand Up @@ -52,6 +52,7 @@ class TokenService {
selector: 'component-styling',
templateUrl: './component-styling.html',
imports: [AsyncPipe, TokenTable],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class ComponentStyling {
private _componentViewer = inject(ComponentViewer);
Expand Down
3 changes: 1 addition & 2 deletions docs/src/app/pages/component-viewer/token-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ChangeDetectionStrategy, Component, computed, input, signal} from '@angular/core';
import {Component, computed, input, signal} from '@angular/core';
import {TitleCasePipe} from '@angular/common';
import {MatButton, MatIconButton} from '@angular/material/button';
import {MatFormField, MatLabel, MatSuffix} from '@angular/material/form-field';
Expand All @@ -31,7 +31,6 @@ export interface Token {
selector: 'token-table',
templateUrl: './token-table.html',
styleUrl: './token-table.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
MatButton,
MatIconButton,
Expand Down
3 changes: 2 additions & 1 deletion docs/src/app/pages/guide-list/guide-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, OnInit, inject} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit, inject} from '@angular/core';
import {GuideItems} from '../../shared/guide-items/guide-items';
import {RouterLink} from '@angular/router';
import {Footer} from '../../shared/footer/footer';
Expand All @@ -20,6 +20,7 @@ import {MatRipple} from '@angular/material/core';
templateUrl: './guide-list.html',
styleUrls: ['./guide-list.scss'],
imports: [NavigationFocus, RouterLink, MatCard, MatCardTitle, MatCardContent, Footer, MatRipple],
changeDetection: ChangeDetectionStrategy.Eager,
host: {
'class': 'docs-main-content',
},
Expand Down
3 changes: 2 additions & 1 deletion docs/src/app/pages/guide-viewer/guide-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, OnInit, inject, signal} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit, inject, signal} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {GuideItem, GuideItems} from '../../shared/guide-items/guide-items';
import {Footer} from '../../shared/footer/footer';
Expand All @@ -21,6 +21,7 @@ import {DocViewer} from '../../shared/doc-viewer/doc-viewer';
templateUrl: './guide-viewer.html',
styleUrls: ['./guide-viewer.scss'],
imports: [DocViewer, NavigationFocus, TableOfContents, Footer],
changeDetection: ChangeDetectionStrategy.Eager,
host: {
'class': 'docs-main-content',
},
Expand Down
8 changes: 7 additions & 1 deletion docs/src/app/shared/carousel/carousel.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import {Component, provideZoneChangeDetection, ViewChild} from '@angular/core';
import {
ChangeDetectionStrategy,
Component,
provideZoneChangeDetection,
ViewChild,
} from '@angular/core';
import {ComponentFixture, fakeAsync, flush, TestBed} from '@angular/core/testing';
import {provideRouter} from '@angular/router';
import {Carousel, CarouselItem} from './carousel';
Expand Down Expand Up @@ -61,6 +66,7 @@ describe('HorizontalCarousel', () => {
`,
],
imports: [Carousel, CarouselItem],
changeDetection: ChangeDetectionStrategy.Eager,
})
class CarouselTestComponent {
@ViewChild(Carousel) carousel!: Carousel;
Expand Down
2 changes: 2 additions & 0 deletions docs/src/app/shared/carousel/carousel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
contentChildren,
viewChild,
inject,
ChangeDetectionStrategy,
} from '@angular/core';
import {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y';
import {LEFT_ARROW, RIGHT_ARROW, TAB} from '@angular/cdk/keycodes';
Expand Down Expand Up @@ -45,6 +46,7 @@ export class CarouselItem implements FocusableOption {
styleUrls: ['./carousel.scss'],
encapsulation: ViewEncapsulation.None,
imports: [MatIconButton, MatIcon],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class Carousel implements AfterContentInit {
readonly ariaLabel = input<string | undefined>(undefined, {alias: 'aria-label'});
Expand Down
3 changes: 1 addition & 2 deletions docs/src/app/shared/cookie-popup/cookie-popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ChangeDetectionStrategy, Component} from '@angular/core';
import {Component} from '@angular/core';
import {MatAnchor, MatButton} from '@angular/material/button';

const STORAGE_KEY = 'docs-cookies';
Expand All @@ -15,7 +15,6 @@ const STORAGE_KEY = 'docs-cookies';
selector: 'app-cookie-popup',
templateUrl: './cookie-popup.html',
styleUrls: ['./cookie-popup.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [MatButton, MatAnchor],
})
export class CookiePopup {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, Input} from '@angular/core';
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
import {MatIcon} from '@angular/material/icon';

/**
Expand All @@ -28,6 +28,7 @@ const ANGULAR_ARIA_LINKS: Record<string, string> = {
templateUrl: 'angular-aria-banner.html',
styleUrl: 'angular-aria-banner.css',
imports: [MatIcon],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class AngularAriaBanner {
@Input() componentName: string = '';
Expand Down
3 changes: 2 additions & 1 deletion docs/src/app/shared/doc-viewer/deprecated-tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component} from '@angular/core';
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {MatTooltip} from '@angular/material/tooltip';

/** Shows the deprecation message for a specific field as a tooltip. */
@Component({
selector: 'deprecated-field',
template: `<div class="docs-deprecated-content" [matTooltip]="message"></div>`,
imports: [MatTooltip],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class DeprecatedFieldComponent {
/** Message regarding the deprecation */
Expand Down
4 changes: 3 additions & 1 deletion docs/src/app/shared/doc-viewer/doc-viewer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Clipboard} from '@angular/cdk/clipboard';
import {HttpTestingController, provideHttpClientTesting} from '@angular/common/http/testing';
import {Component, provideZoneChangeDetection} from '@angular/core';
import {ChangeDetectionStrategy, Component, provideZoneChangeDetection} from '@angular/core';
import {TestBed} from '@angular/core/testing';
import {MatIconButton} from '@angular/material/button';
import {MatTooltip} from '@angular/material/tooltip';
Expand Down Expand Up @@ -216,6 +216,7 @@ describe('DocViewer', () => {
selector: 'test',
template: `<doc-viewer [document]="documentUrl" />`,
imports: [DocViewer],
changeDetection: ChangeDetectionStrategy.Eager,
})
class DocViewerTestComponent {
documentUrl = 'http://material.angular.dev/simple-doc.html';
Expand Down Expand Up @@ -271,6 +272,7 @@ class TestComponent {}
selector: 'test',
template: `<doc-viewer [document]="component" />`,
imports: [DocViewer, TestComponent],
changeDetection: ChangeDetectionStrategy.Eager,
})
class DocViewerWithCompTestComponent {
component = TestComponent;
Expand Down
2 changes: 2 additions & 0 deletions docs/src/app/shared/doc-viewer/doc-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
input,
inject,
Type,
ChangeDetectionStrategy,
} from '@angular/core';
import {Observable, Subscription} from 'rxjs';
import {shareReplay, take, tap} from 'rxjs/operators';
Expand Down Expand Up @@ -66,6 +67,7 @@ class DocFetcher {
}
`,
imports: [CdkPortalOutlet],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class DocViewer implements OnDestroy {
private _appRef = inject(ApplicationRef);
Expand Down
3 changes: 1 addition & 2 deletions docs/src/app/shared/example-viewer/code-snippet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ChangeDetectionStrategy, Component, forwardRef, input, viewChild} from '@angular/core';
import {Component, forwardRef, input, viewChild} from '@angular/core';
import {DocViewer} from '../doc-viewer/doc-viewer';

@Component({
selector: 'code-snippet',
templateUrl: './code-snippet.html',
styleUrls: ['./example-viewer.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [forwardRef(() => DocViewer)],
})
export class CodeSnippet {
Expand Down
2 changes: 2 additions & 0 deletions docs/src/app/shared/example-viewer/example-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

import {
ChangeDetectionStrategy,
Component,
computed,
ElementRef,
Expand Down Expand Up @@ -43,6 +44,7 @@ const preferredExampleFileOrder = ['HTML', 'TS', 'CSS'];
selector: 'example-viewer',
templateUrl: './example-viewer.html',
styleUrls: ['./example-viewer.scss'],
changeDetection: ChangeDetectionStrategy.Eager,
imports: [
MatIconButton,
MatTooltip,
Expand Down
3 changes: 2 additions & 1 deletion docs/src/app/shared/navbar/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, OnDestroy, inject} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnDestroy, inject} from '@angular/core';
import {NgTemplateOutlet} from '@angular/common';
import {MatButton, MatIconButton} from '@angular/material/button';
import {RouterLink, RouterLinkActive} from '@angular/router';
Expand All @@ -24,6 +24,7 @@ const SECTIONS_KEYS = Object.keys(SECTIONS);
selector: 'app-navbar',
templateUrl: './navbar.html',
styleUrls: ['./navbar.scss'],
changeDetection: ChangeDetectionStrategy.Eager,
imports: [
MatButton,
MatIconButton,
Expand Down
3 changes: 2 additions & 1 deletion docs/src/app/shared/stackblitz/stackblitz-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, Input, NgZone, inject} from '@angular/core';
import {ChangeDetectionStrategy, Component, Input, NgZone, inject} from '@angular/core';
import {ExampleData} from '@angular/components-examples';
import {MatIconButton} from '@angular/material/button';
import {MatIcon} from '@angular/material/icon';
Expand All @@ -18,6 +18,7 @@ import {MatSnackBar} from '@angular/material/snack-bar';
selector: 'stackblitz-button',
templateUrl: './stackblitz-button.html',
imports: [MatIconButton, MatTooltip, MatIcon],
changeDetection: ChangeDetectionStrategy.Eager,
})
export class StackblitzButton {
private _stackBlitzWriter = inject(StackBlitzWriter);
Expand Down
2 changes: 2 additions & 0 deletions docs/src/app/shared/table-of-contents/table-of-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
ChangeDetectorRef,
input,
inject,
ChangeDetectionStrategy,
} from '@angular/core';
import {DOCUMENT} from '@angular/common';
import {ActivatedRoute, Router} from '@angular/router';
Expand Down Expand Up @@ -49,6 +50,7 @@ interface Link {
selector: 'table-of-contents',
styleUrls: ['./table-of-contents.scss'],
templateUrl: './table-of-contents.html',
changeDetection: ChangeDetectionStrategy.Eager,
})
export class TableOfContents implements OnInit, AfterViewInit, OnDestroy {
private _router = inject(Router);
Expand Down
3 changes: 1 addition & 2 deletions docs/src/app/shared/theme-picker/theme-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ChangeDetectionStrategy, Component, ViewEncapsulation, inject} from '@angular/core';
import {Component, ViewEncapsulation, inject} from '@angular/core';
import {StyleManager} from '../style-manager';
import {DocsSiteTheme, ThemeStorage} from './theme-storage/theme-storage';
import {MatIconButton} from '@angular/material/button';
Expand All @@ -22,7 +22,6 @@ import {LiveAnnouncer} from '@angular/cdk/a11y';
selector: 'theme-picker',
templateUrl: 'theme-picker.html',
styleUrls: ['theme-picker.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
imports: [MatIconButton, MatTooltip, MatMenu, MatMenuItem, MatMenuTrigger, MatIcon],
})
Expand Down
3 changes: 2 additions & 1 deletion docs/src/app/shared/version-picker/version-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {Component, ViewEncapsulation, inject} from '@angular/core';
import {ChangeDetectionStrategy, Component, ViewEncapsulation, inject} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {AsyncPipe} from '@angular/common';
import {MatButton} from '@angular/material/button';
Expand All @@ -29,6 +29,7 @@ interface VersionInfo {
styleUrls: ['./version-picker.scss'],
imports: [MatButton, MatTooltip, MatMenu, MatMenuItem, MatIcon, MatMenuTrigger, AsyncPipe],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.Eager,
})
export class VersionPicker {
private _http = inject(HttpClient);
Expand Down
Loading
Loading