id
stringlengths
6
6
text
stringlengths
20
17.2k
title
stringclasses
1 value
010894
it('should migrate if/else with let variable in wrong place with no semicolons', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgIf} from '@angular/common'; @Component({ templateUrl: './comp.html' }) class...
010895
describe('ngFor', () => { it('should migrate an inline template', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgFor} from '@angular/common'; interface Item { id: number; text: string; } @Co...
010896
it('should migrate with an old style alias', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgFor} from '@angular/common'; interface Item { id: number; text: string; } @Component({ impor...
010897
it('should migrate with multiple aliases', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgFor} from '@angular/common'; interface Item { id: number; text: string; } @Component({ imports...
010898
it('should migrate ngForTemplate when template is only used once', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgFor} from '@angular/common'; interface Item { id: number; text: string; } @Compo...
010899
describe('ngForOf', () => { it('should migrate a basic ngForOf', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgFor} from '@angular/common'; interface Item { id: number; text: string; } @Com...
010900
describe('ngSwitch', () => { it('should migrate an inline template', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {ngSwitch, ngSwitchCase} from '@angular/common'; @Component({ template: \`<div [ngSwitch]="testOpts">` ...
010901
it('should handle cases with binding', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {ngSwitch, ngSwitchCase} from '@angular/common'; @Component({ template: \`<div [ngSwitch]="testOpts">` + `<ng-template [ngSwitc...
010903
it('should migrate a simple for inside an if', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgIf} from '@angular/common'; @Component({ imports: [NgFor, NgIf], templateUrl: './comp.html' }) class...
010904
it('should migrate an inline template with if, for loops, and switches', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgIf, NgFor} from '@angular/common'; interface Item { id: number; text: string; } ...
010905
it('long file', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgIf, NgFor} from '@angular/common'; interface Item { id: number; text: string; } @Component({ imports: [NgFor, NgIf], ...
010908
it('should move templates after they were migrated to new syntax', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgIf} from '@angular/common'; @Component({ selector: 'declare-comp', templateUrl: 'comp.html', ...
010909
it('should handle OR logic in ngIf else case', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgIf} from '@angular/common'; @Component({ templateUrl: './comp.html' }) class Comp { show = false; ...
010912
ould indent multi-line attribute strings as single quotes to the right place', async () => { writeFile( '/comp.ts', ` import {Component} from '@angular/core'; import {NgIf} from '@angular/common'; @Component({ templateUrl: './comp.html' }) class C...
010991
/*! * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import ts from 'typescript'; import {ChangeTracker, PendingChange} from '../../utils/change_tracker'; import {find...
010993
# Route lazy loading migration This schematic helps developers to convert eagerly loaded component routes to lazy loaded routes. By lazy loading components we can split the production bundle into smaller chunks, to avoid big JS bundle that includes all routes, which negatively affects initial page load of an applicatio...
011002
## Inject migration Automated migration that converts classes using constructor-based injection to the `inject` function. It can be run using: ```bash ng generate @angular/core:inject-migration ``` **Before:** ```typescript import { Component, Inject, Optional } from '@angular/core'; import { MyService } from './serv...
011029
# Standalone migration `ng generate` schematic that helps users to convert an application to `standalone` components, directives and pipes. The migration can be run with `ng generate @angular/core:standalone` and it has the following options: * `mode` - Configures the mode that migration should run in. The different m...
011030
## Migration modes The migration is made up the following modes that are intended to be run in the order they are listed in: 1. Convert declarations to standalone. 2. Remove unnecessary NgModules. 3. Switch to standalone bootstrapping API. ### Convert declarations to standalone In this mode, the migration will find al...
011039
## Control Flow Syntax migration Angular v17 introduces a new control flow syntax. This migration replaces the existing usages of `*ngIf`, `*ngFor`, and `*ngSwitch` to their equivalent block syntax. Existing ng-templates are preserved in case they are used elsewhere in the template. It has the following option: * `pa...
011052
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Rule, SchematicContext, SchematicsException, Tree} from '@angular-devkit/schematics'; import {join, relative...
011065
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export {SIGNAL as ɵSIGNAL} from '@angular/core/primitives/signals'; export {isSignal, Signal, ValueEqualityFn} from...
011076
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {APP_ID, PLATFORM_ID} from './application/application_tokens'; import {inject} from './di/injector_compatibil...
011086
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {SimpleChanges} from './simple_change'; /** * @description * A lifecycle hook that is called when any data-...
011096
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Type} from '../interface/type'; import {getClosureSafeProperty} from '../util/property'; import {stringify} ...
011104
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {RuntimeError, RuntimeErrorCode} from '../errors'; import { InjectorProfilerContext, setInjectorProfilerC...
011128
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Subscription} from 'rxjs'; import {ApplicationRef} from '../../application/application_ref'; import { ENV...
011131
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {InjectionToken} from '../../di/injection_token'; export const enum NotificationSource { // Change detecti...
011134
@Injectable({providedIn: 'root'}) export class ChangeDetectionSchedulerImpl implements ChangeDetectionScheduler { private readonly appRef = inject(ApplicationRef); private readonly taskService = inject(PendingTasksInternal); private readonly ngZone = inject(NgZone); private readonly zonelessEnabled = inject(ZON...
011135
private tick(): void { // When ngZone.run below exits, onMicrotaskEmpty may emit if the zone is // stable. We want to prevent double ticking so we track whether the tick is // already running and skip it if so. if (this.runningTick || this.appRef.destroyed) { return; } // If we reach the ...
011225
export abstract class ViewContainerRef { /** * Anchor element that specifies the location of this container in the containing view. * Each view container can have only one anchor element, and each anchor element * can have only a single view container. * * Root elements of views attached to this contai...
011276
export class ViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorRefInterface { private _appRef: ApplicationRef | null = null; private _attachedToViewContainer = false; get rootNodes(): any[] { const lView = this._lView; const tView = lView[TVIEW]; return collectNativeNodes(tView, lView, tView.fi...
011418
rt function handleUnknownPropertyError( propName: string, tagName: string | null, nodeType: TNodeType, lView: LView, ): void { // Special-case a situation when a structural directive is applied to // an `<ng-template>` element, for example: `<ng-template *ngIf="true">`. // In this case the compiler genera...
011481
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {signalAsReadonlyFn, WritableSignal} from './signal'; import {Signal, ValueEqualityFn} from './api'; import { ...
011483
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {createWatch, Watch, WatchCleanupRegisterFn} from '@angular/core/primitives/signals'; import {ChangeDetector...
011484
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {SIGNAL} from '@angular/core/primitives/signals'; /** * A reactive value which notifies consumers of any ch...
011486
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { createSignal, SIGNAL, SignalGetter, SignalNode, signalSetFn, signalUpdateFn, } from '@angular/c...
011487
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {createComputed, SIGNAL} from '@angular/core/primitives/signals'; import {performanceMarkFeature} from '../....
011528
* Register callbacks to be invoked the next time the application finishes rendering, during the * specified phases. The available phases are: * - `earlyRead` * Use this phase to **read** from the DOM before a subsequent `write` callback, for example to * perform custom layout that the browser doesn't natively s...
011563
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ // This file contains types that will be published to npm in library typings files. // Formatting does horrible thi...
011571
/** * A reference to an Angular application running on a page. * * @usageNotes * {@a is-stable-examples} * ### isStable examples and caveats * * Note two important points about `isStable`, demonstrated in the examples below: * - the application will never be stable if you start any kind * of recurrent asynchro...
011575
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {InjectionToken} from '../di/injection_token'; import {getDocument} from '../render3/interfaces/document'; /...
011576
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Observable} from 'rxjs'; import { EnvironmentProviders, inject, Injectable, InjectionToken, Injec...
011603
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {EnvironmentProviders, ModuleWithProviders, Provider} from '../di/interface/provider'; import {Type} from '.....
011609
export interface Component extends Directive { /** * The change-detection strategy to use for this component. * * When a component is instantiated, Angular creates a change detector, * which is responsible for propagating the component's bindings. * The strategy is one of: * - `ChangeDetectionStrate...
011629
Supports delivery of Angular apps on a server, for use with server-side rendering. For more information, see [Server-side Rendering: An intro to Angular SSR](guide/ssr).
011647
cribe('Router', () => { it('should wait for lazy routes before serializing', async () => { const ngZone = TestBed.inject(NgZone); @Component({ standalone: true, selector: 'lazy', template: `LazyCmp content`, }) class LazyCmp {} const routes: ...
011655
escribe('ViewContainerRef', () => { it('should work with ViewContainerRef.createComponent', async () => { @Component({ standalone: true, selector: 'dynamic', template: ` <span>This is a content of a dynamic component.</span> `...
011692
t('should SSR and hydrate nested `@defer` blocks', async () => { @Component({ standalone: true, selector: 'app', template: ` <main (click)="fnA()"> @defer (on viewport; hydrate on interaction) { <div (click)="fnA()"> Main defer block rend...
011731
tes diagnostic when the library does not export the host directive', () => { const files = { // export post module and component but not the host directive. This is not valid. We won't // be able to import the host directive for template type checking. 'dist/post/index.d.ts': ` export { Post...
011736
friends', () => { it('defer', () => { expectQuickInfo({ templateOverride: `@de¦fer { } @placeholder { <input /> }`, expectedSpanText: '@defer ', expectedDisplayString: '(block) @defer', }); }); it('defer with condition', () => { ...
011904
### Disclaimer The localize tools are consumed via the Angular CLI. The programmatic APIs are not considered officially supported though and are not subject to the breaking change guarantees of SemVer.
012044
# @angular/localize schematic for `ng add` This schematic will be executed when an Angular CLI user runs `ng add @angular/localize`. It will search their `angular.json` file, and add `types: ["@angular/localize"]` in the TypeScript configuration files of the project. If the user specifies that they want to use `$loc...
012048
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {EmptyTree, Tree} from '@angular-devkit/schematics'; import {SchematicTestRunner} from '@angular-devkit/schem...
012067
Implements fundamental Angular framework functionality, including directives and pipes, location services used in routing, HTTP services, localization support, and so on. The `CommonModule` exports are re-exported by `BrowserModule`, which is included automatically in the root `AppModule` when you create a new app wit...
012211
escribe('ngIf directive', () => { let fixture: ComponentFixture<any>; function getComponent(): TestComponent { return fixture.componentInstance; } afterEach(() => { fixture = null!; }); beforeEach(() => { TestBed.configureTestingModule({ declarations: [TestComponent], imports: [Co...
012218
it('should display last item correctly', waitForAsync(() => { const template = '<span *ngFor="let item of items; let isLast=last">{{isLast.toString()}}</span>'; fixture = createTestComponent(template); getComponent().items = [0, 1, 2]; detectChangesAndExpectText('falsefalsetrue'); getCompone...
012250
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {AsyncPipe} from '@angular/common'; import {ChangeDetectorRef, Component, computed, EventEmitter, signal} fro...
012277
Implements an HTTP client API for Angular apps that relies on the `XMLHttpRequest` interface exposed by browsers. Includes testability features, typed request and response objects, request and response interception, observable APIs, and streamlined error handling. For usage information, see the [HTTP Client](guide/h...
012289
/** * @license * Copyright Google LLC All Rights Reserved.sonpCallbackContext * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {HttpHandler} from '@angular/common/http/src/backend'; import {HttpClient} from '@angular/...
012307
describe('provideHttpClient', () => { beforeEach(() => { setCookie(''); TestBed.resetTestingModule(); }); afterEach(() => { let controller: HttpTestingController; try { controller = TestBed.inject(HttpTestingController); } catch (err) { // A failure here means that TestBed wasn't ...
012316
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {HttpClientModule} from '@angular/common/http'; import {NgModule} from '@angular/core'; import {provideHttpC...
012324
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {ModuleWithProviders, NgModule} from '@angular/core'; import {HTTP_INTERCEPTORS} from './interceptor'; impor...
012328
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {XhrFactory} from '@angular/common'; import {Injectable, ɵRuntimeError as RuntimeError} from '@angular/core';...
012357
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { EnvironmentProviders, inject, InjectionToken, makeEnvironmentProviders, Provider, } from '@angula...
012369
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export const PLATFORM_BROWSER_ID = 'browser'; export const PLATFORM_SERVER_ID = 'server'; /** * Returns whether a ...
012371
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {inject, PLATFORM_ID, ɵɵdefineInjectable} from '@angular/core'; import {DOCUMENT} from './dom_tokens'; impor...
012374
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {NgModule} from '@angular/core'; import {COMMON_DIRECTIVES} from './directives/index'; import {COMMON_PIPES}...
012377
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { ComponentRef, createNgModule, Directive, DoCheck, Injector, Input, NgModuleFactory, NgModul...
012381
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDi...
012382
Directive({ selector: '[ngFor][ngForOf]', standalone: true, }) export class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck { /** * The value of the iterable expression, which can be used as a * [template input variable](guide/directives/structural-directives#shorthand). */ @Inpu...
012383
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { Directive, DoCheck, ElementRef, Input, IterableDiffers, KeyValueDiffers, Renderer2, ɵstringi...
012385
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { Directive, EmbeddedViewRef, Injector, Input, OnChanges, SimpleChange, SimpleChanges, Templa...
012396
ptimizedImage implements OnInit, OnChanges, OnDestroy { private imageLoader = inject(IMAGE_LOADER); private config: ImageConfig = processConfig(inject(IMAGE_CONFIG)); private renderer = inject(Renderer2); private imgElement: HTMLImageElement = inject(ElementRef).nativeElement; private injector = inject(Inject...
012419
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { ChangeDetectorRef, EventEmitter, OnDestroy, Pipe, PipeTransform, untracked, ɵisPromise, ɵis...
012499
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Angular Examples</title> <base href="/" /> <!-- Prevent the browser from requesting any favicon. This could throw off the console output checks. --> <link rel="icon" href="data:," /> </head> <body> <example-app>...
012541
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ /* tslint:disable:no-console */ // #docregion Component import {Component} from '@angular/core'; import {FormArray,...
012558
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {BrowserModule} from '@an...
012569
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { inject, InjectFlags, InjectionToken, InjectOptions, Injector, ProviderToken, ɵInjectorProfile...
012607
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, Component, DoCheck, I...
012617
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { Component, Injectable, Injector, Input, NgModule, OnInit, TemplateRef, ViewChild, ViewCon...
012660
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ // #docregion activated-route import {Component, NgModule} from '@angular/core'; // #enddocregion activated-route imp...
012818
# DESIGN DOC (Ivy): Separate Compilation AUTHOR: chuckj@ ## Background ### Angular 5 (Renderer2) In 5.0 and prior versions of Angular the compiler performs whole program analysis and generates template and injector definitions that use this global knowledge to flatten injector scope definitions, inline directives i...
012822
# DESIGN DOC(Ivy): Compiler Architecture AUTHOR: arick@, chuckj@ Status: Draft ## Overview This document details the new architecture of the Angular compiler in a post-Ivy world, as well as the compatibility functionality needed for the ecosystem to gradually migrate to Ivy without breaking changes. This compatibili...
012823
Detailed Design ### Ivy Compilation Model The overall architecture of `ngtsc` it is a set of transformers that adjust what is emitted by TypeScript for a TypeScript program. Angular transforms both the `.js` files and the `.d.ts` files to reflect the content of Angular decorators that are then erased. This transforma...
012826
ty compiler #### The compatibility problem Not all Angular code is compiled at the same time. Applications have dependencies on shared libraries, and those libraries are published on NPM in their compiled form and not as Typescript source code. Even if an application is built using `ngtsc`, its dependencies may not h...
012876
describe('for loop blocks', () => { it('should parse a for loop block', () => { expectFromHtml(` @for (item of items.foo.bar; track item.id) { {{ item }} } @empty { There were no items in the list. } `).toEqual([ ['ForLoopBlock', 'items.foo.bar', 'item...
012877
describe('validations', () => { it('should report if for loop does not have an expression', () => { expect(() => parse(`@for {hello}`)).toThrowError(/@for loop does not have an expression/); }); it('should report if for loop does not have a tracking expression', () => { expect(() => p...
013202
export function createSwitchBlock( ast: html.Block, visitor: html.Visitor, bindingParser: BindingParser, ): {node: t.SwitchBlock | null; errors: ParseError[]} { const errors = validateSwitchBlock(ast); const primaryExpression = ast.parameters.length > 0 ? parseBlockParameterToBinding(ast.parameters[...
013337
Implements a domain-specific language (DSL) for defining web animation sequences for HTML elements as multiple transformations over time. Use this API to define how an HTML element can move, change color, grow or shrink, fade, or slide off the page. These changes can occur simultaneously or sequentially. You can contr...
013544
/*! * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {isPlatformBrowser} from '@angular/common'; import { APP_INITIALIZER, ApplicationRef, EnvironmentProvid...
013581
### Error By default, `zone.js/plugins/zone-error` will not be loaded for performance reasons. This package provides the following functionality: 1. **Error Inheritance:** Handle the `extend Error` issue: ```ts class MyError extends Error {} const myError = new MyError(); console.log('is MyError in...
014005
Supports execution of Angular apps on different supported browsers. The `BrowserModule` is included by default in any app created through the CLI, and it re-exports the `CommonModule` and `ApplicationModule` exports, making basic Angular functionality available to the app. For more information, see [Browser Support](...
014009
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {DOCUMENT} from '@angular/common'; import {HttpClient, HttpTransferCacheOptions, provideHttpClient} from '@an...
014020
escribe('with animations', () => { @Component({ standalone: true, selector: 'hello-app', template: '<div @myAnimation (@myAnimation.start)="onStart($event)">Hello from AnimationCmp!</div>', animations: [ trigger('myAnimation', [transition('void => *', [style({op...
014023
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { Component, destroyPlatform, ErrorHandler, Inject, Injectable, InjectionToken, NgModule, NgZ...
014070
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { ModuleWithProviders, NgModule, Provider, ɵperformanceMarkFeature as performanceMarkFeature, } from '...
014073
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ /** * @module * @description * Entry point for all animation APIs of the animation browser package. */ export {A...
014079
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { CommonModule, DOCUMENT, XhrFactory, ɵPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID, } from '@angular/c...
014080
e({ providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], exports: [CommonModule, ApplicationModule], }) export class BrowserModule { constructor( @Optional() @SkipSelf() @Inject(BROWSER_MODULE_PROVIDERS_MARKER) providersAlreadyPresent: boolean | null, ) { if ((typeof ngDevMode...