_id
stringlengths
21
254
text
stringlengths
1
93.7k
metadata
dict
angular/packages/core/test/acceptance/host_directives_spec.ts_61788_64341
it('should not expose an input under its host directive alias if a host directive is not applied', () => { const logs: string[] = []; @Directive({selector: '[host-dir]', standalone: true}) class HostDir implements OnChanges { @Input('colorAlias') color?: string; ngOnChanges(changes: ...
{ "end_byte": 64341, "start_byte": 61788, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/host_directives_spec.ts_64345_72157
describe('ngOnChanges', () => { it('should invoke ngOnChanges when an input is set on a host directive', () => { let firstDirChangeEvent: SimpleChanges | undefined; let secondDirChangeEvent: SimpleChanges | undefined; @Directive({standalone: true}) class FirstHostDir implements OnChanges { ...
{ "end_byte": 72157, "start_byte": 64345, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/host_directives_spec.ts_72161_76434
describe('debugging and testing utilities', () => { it('should be able to retrieve host directives using ng.getDirectives', () => { let hostDirInstance!: HostDir; let otherHostDirInstance!: OtherHostDir; let plainDirInstance!: PlainDir; @Directive({standalone: true}) class HostDir { ...
{ "end_byte": 76434, "start_byte": 72161, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/host_directives_spec.ts_76438_83437
describe('root component with host directives', () => { function createRootComponent<T>(componentType: Type<T>) { @Component({ template: '<ng-container #insertionPoint></ng-container>', standalone: false, }) class App { @ViewChild('insertionPoint', {read: ViewContainerRef})...
{ "end_byte": 83437, "start_byte": 76438, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/host_directives_spec.ts_83443_87474
describe('dependency injection', () => { it('should allow the host directive to inject the root component', () => { let hostDirInstance!: HostDir; @Directive({standalone: true}) class HostDir { host = inject(HostComp); constructor() { hostDirInstance = thi...
{ "end_byte": 87474, "start_byte": 83443, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/host_directives_spec.ts_87480_94213
describe('inputs', () => { it('should set inputs on root component and all host directive instances using `setInput`', () => { let hostDirInstance!: HostDir; let otherHostDirInstance!: OtherHostDir; @Directive({standalone: true}) class HostDir { @Input() color?: string; ...
{ "end_byte": 94213, "start_byte": 87480, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/host_directives_spec.ts_94217_102839
describe('invalid usage validations', () => { it('should throw an error if the metadata of a host directive cannot be resolved', () => { class HostDir {} @Directive({ selector: '[dir]', hostDirectives: [HostDir], standalone: false, }) class Dir {} @Component({...
{ "end_byte": 102839, "start_byte": 94217, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/host_directives_spec.ts_102845_108960
it('should throw an error if a host directive tries to alias to an existing input alias', () => { @Directive({selector: '[host-dir]', standalone: true}) class HostDir { @Input('colorAlias') color?: string; @Input('buttonColorAlias') buttonColor?: string; } @Directive({ s...
{ "end_byte": 108960, "start_byte": 102845, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts" }
angular/packages/core/test/acceptance/common_integration_spec.ts_0_6766
/** * @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, Directive} from '@angular/core'; import {TestBed} from '@angular/core/testing'; import {By} from ...
{ "end_byte": 6766, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/common_integration_spec.ts" }
angular/packages/core/test/acceptance/common_integration_spec.ts_6772_12535
it('should support multiple levels of embedded templates', () => { @Component({ selector: 'app-multi', template: `<ul> <li *ngFor="let row of items"> <span *ngFor="let cell of row.data">{{cell}} - {{ row.value }} - {{ items.length }}</span> </li> </ul>`, ...
{ "end_byte": 12535, "start_byte": 6772, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/common_integration_spec.ts" }
angular/packages/core/test/acceptance/common_integration_spec.ts_12541_21985
it('should support context for 9+ levels of embedded templates', () => { @Component({ selector: 'app-multi', template: `<div *ngFor="let item0 of items"> <span *ngFor="let item1 of item0.data"> <span *ngFor="let item2 of item1.data"> <span *ngFor="let ...
{ "end_byte": 21985, "start_byte": 12541, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/common_integration_spec.ts" }
angular/packages/core/test/acceptance/host_binding_spec.ts_0_6074
/** * @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 {state, style, transition, trigger} from '@angular/animations'; import {CommonModule} from '@angular/common';...
{ "end_byte": 6074, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_binding_spec.ts" }
angular/packages/core/test/acceptance/host_binding_spec.ts_6078_15774
describe('with synthetic (animations) props', () => { it('should work when directive contains synthetic props', () => { @Directive({ selector: '[animationPropDir]', standalone: false, }) class AnimationPropDir { @HostBinding('@myAnimation') myAnimation: string = 'color'; ...
{ "end_byte": 15774, "start_byte": 6078, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_binding_spec.ts" }
angular/packages/core/test/acceptance/host_binding_spec.ts_15778_24017
describe('via @HostBinding', () => { it('should render styling for parent and sub-classed components in order', () => { @Component({ template: ` <child-and-parent-cmp></child-and-parent-cmp> `, standalone: false, }) class MyApp {} @Component({ template:...
{ "end_byte": 24017, "start_byte": 15778, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_binding_spec.ts" }
angular/packages/core/test/acceptance/host_binding_spec.ts_24021_32064
it('should support consecutive components with host bindings', () => { @Component({ selector: 'host-binding-comp', template: '', standalone: false, }) class HostBindingComp { @HostBinding() id = 'blue'; } @Component({ template: ` <host-binding-comp></host-bin...
{ "end_byte": 32064, "start_byte": 24021, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_binding_spec.ts" }
angular/packages/core/test/acceptance/host_binding_spec.ts_32067_40688
it('should support host bindings that contain array literals', () => { @Component({ selector: 'name-comp', template: '', standalone: false, }) class NameComp { @Input() names!: string[]; } @Component({ selector: 'host-binding-comp', host: {'[id]': `['red', id]`, ...
{ "end_byte": 40688, "start_byte": 32067, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_binding_spec.ts" }
angular/packages/core/test/acceptance/host_binding_spec.ts_40692_48572
it('should support host attributes', () => { @Directive({ selector: '[hostAttributeDir]', host: {'role': 'listbox'}, standalone: false, }) class HostAttributeDir {} @Component({ template: '<div hostAttributeDir></div>', standalone: false, }) class App {} TestB...
{ "end_byte": 48572, "start_byte": 40692, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_binding_spec.ts" }
angular/packages/core/test/acceptance/host_binding_spec.ts_48576_52485
describe('host binding on containers', () => { @Directive({ selector: '[staticHostAtt]', host: {'static': 'attr'}, standalone: false, }) class StaticHostAttr { constructor() {} } @Directive({ selector: '[dynamicHostAtt]', host: {'[attr.dynamic]': '"dynamic"'}, ...
{ "end_byte": 52485, "start_byte": 48576, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_binding_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_0_1398
/** * @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 */ // Make the `$localize()` global function available to the compiled templates, and the direct calls // below. This wo...
{ "end_byte": 1398, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_1400_8518
escribe('runtime i18n', () => { beforeEach(() => { TestBed.configureTestingModule({ declarations: [AppComp, DirectiveWithTplRef, UppercasePipe], // In some of the tests we use made-up tag names for better readability, however // they'll cause validation errors. Add the `NO_ERRORS_SCHEMA` so that...
{ "end_byte": 8518, "start_byte": 1400, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_8522_15214
d support multiple i18n blocks', () => { loadTranslations({ [computeMsgId('trad {$INTERPOLATION}')]: 'traduction {$INTERPOLATION}', [computeMsgId('start {$INTERPOLATION} middle {$INTERPOLATION_1} end')]: 'start {$INTERPOLATION_1} middle {$INTERPOLATION} end', [computeMsgId( '{$STAR...
{ "end_byte": 15214, "start_byte": 8522, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_15218_21802
d support conditional blocks', () => { loadTranslations({ [computeMsgId( 'Content: {$START_BLOCK_IF}before{$START_TAG_SPAN}zero{$CLOSE_TAG_SPAN}after' + '{$CLOSE_BLOCK_IF}{$START_BLOCK_ELSE_IF}before{$START_TAG_DIV}one{$CLOSE_TAG_DIV}' + 'after{$CLOSE_BLOCK_ELSE_IF}{$START_BLOCK_EL...
{ "end_byte": 21802, "start_byte": 15218, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_21806_29247
emplate support', () => { it('should support ng-container', () => { loadTranslations({[computeMsgId('text')]: 'texte'}); const fixture = initWithTemplate(AppComp, `<ng-container i18n>text</ng-container>`); expect(fixture.nativeElement.innerHTML).toEqual(`texte<!--ng-container-->`); }); it...
{ "end_byte": 29247, "start_byte": 21806, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_29251_33846
with namespaces', () => { beforeEach(() => { function _document(): any { // Tell Ivy about the global document ɵsetDocument(document); return document; } TestBed.configureTestingModule({ providers: [{provide: DOCUMENT, useFactory: _document, deps: []}], }); ...
{ "end_byte": 33846, "start_byte": 29251, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_33850_39191
ressions', () => { it('with no root node', () => { loadTranslations({ [computeMsgId('{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}')]: '{VAR_SELECT, select, 10 {dix} 20 {vingt} other {autre}}', }); const fixture = initWithTemplate( AppComp, `{count, sel...
{ "end_byte": 39191, "start_byte": 33850, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_39197_45856
loadTranslations({ [computeMsgId( '{VAR_PLURAL, plural, =0 {no {START_BOLD_TEXT}emails{CLOSE_BOLD_TEXT}!} =1 {one {START_ITALIC_TEXT}email{CLOSE_ITALIC_TEXT}} other {{INTERPOLATION} {START_TAG_SPAN}emails{CLOSE_TAG_SPAN}}}', '', )]: '{VAR_PLURAL, plural, =0 {aucun {S...
{ "end_byte": 45856, "start_byte": 39197, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_45862_52160
al form for ICU expressions when using "ro" locale', () => { // The "ro" locale has a complex plural function that can handle muliple options // (and string inputs) // // function plural(n: number): number { // let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').le...
{ "end_byte": 52160, "start_byte": 45862, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_52166_59863
ng a view via vcr.createEmbeddedView', () => { loadTranslations({ [computeMsgId('{VAR_PLURAL, plural, =1 {ONE} other {OTHER}}')]: '{VAR_PLURAL, plural, =1 {ONE} other {OTHER}}', }); @Directive({ selector: '[someDir]', standalone: false, }) class Dir { ...
{ "end_byte": 59863, "start_byte": 52166, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_59869_68736
teOutlet inside an ngFor', () => { loadTranslations({ [computeMsgId('{VAR_SELECT, select, A {A } B {B } other {other - {PH_WITH_SPACES}}}')]: '{VAR_SELECT, select, A {A } B {B } other {other - {PH_WITH_SPACES}}}', [computeMsgId('{$ICU} ')]: '{$ICU} ', }); @Component({ ...
{ "end_byte": 68736, "start_byte": 59869, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_68740_68777
s', () => { it('text', () => {
{ "end_byte": 68777, "start_byte": 68740, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_68778_77459
loadTranslations({[computeMsgId('text')]: 'texte'}); const fixture = initWithTemplate(AppComp, `<div i18n i18n-title title='text'></div>`); expect(fixture.nativeElement.innerHTML).toEqual(`<div title="texte"></div>`); }); it('interpolations', () => { loadTranslations({[computeMsgId('hello ...
{ "end_byte": 77459, "start_byte": 68778, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_77465_85442
uring second template pass', () => { loadTranslations({[computeMsgId('Set')]: 'Set'}); @Directive({ selector: '[test]', inputs: ['test'], exportAs: 'dir', standalone: false, }) class Dir {} @Component({ selector: 'other', template: `<div i18...
{ "end_byte": 85442, "start_byte": 77465, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_85446_86631
ving nodes', () => { loadTranslations({ [computeMsgId( '{$START_TAG_DIV2}{$CLOSE_TAG_DIV2}' + '{$START_TAG_DIV3}{$CLOSE_TAG_DIV3}' + '{$START_TAG_DIV4}{$CLOSE_TAG_DIV4}' + '{$START_TAG_DIV5}{$CLOSE_TAG_DIV5}' + '{$START_TAG_DIV6}{$CLOSE_TAG_DIV6}' + '{...
{ "end_byte": 86631, "start_byte": 85446, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_86635_95508
('should project the translations', () => { @Component({ selector: 'child', template: '<p><ng-content></ng-content></p>', standalone: false, }) class Child {} @Component({ selector: 'parent', template: ` <div i18n> <child>I am pr...
{ "end_byte": 95508, "start_byte": 86635, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_95514_104108
locks', () => { @Component({ selector: 'child', template: `<div i18n>Child content <ng-content></ng-content></div>`, standalone: false, }) class Child {} @Component({ selector: 'parent', template: `<child i18n>and projection from {{name}}</child>`, ...
{ "end_byte": 104108, "start_byte": 95514, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_104112_112608
{ it('should throw in case invalid ICU is present in a template', () => { // Error message is produced by Compiler. expect(() => initWithTemplate(AppComp, '{count, select, 10 {ten} other {other}'), ).toThrowError( /Invalid ICU message. Missing '}'. \("{count, select, 10 {ten} othe...
{ "end_byte": 112608, "start_byte": 104112, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_112612_120627
// This test demonstrates an issue with setting attributes on ICU elements. // NOTE: This test is extracted from g3. @Component({ template: ` <h1 class="num-cart-items" i18n *ngIf="true">{ registerItemCount, plural, =0 {Your cart} =1 {Your cart <span ...
{ "end_byte": 120627, "start_byte": 112612, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/i18n_spec.ts_120631_124403
gFor iteration', () => { @Component({ template: ` <ul i18n> <li *ngFor="let item of items">{ item, plural, =1 {<b>one</b>} =2 {<i>two</i>} },</li> </ul>`, standalone: false, }) class MyApp { items = [1, 2]; } TestBed.configur...
{ "end_byte": 124403, "start_byte": 120631, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/i18n_spec.ts" }
angular/packages/core/test/acceptance/control_flow_if_spec.ts_0_8570
/** * @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 {NgFor} from '@angular/common'; import { ChangeDetectorRef, Component, Directive, inject, Input, ...
{ "end_byte": 8570, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_if_spec.ts" }
angular/packages/core/test/acceptance/control_flow_if_spec.ts_8574_17615
describe('content projection', () => { it('should project an @if with a single root node into the root node slot', () => { @Component({ standalone: true, selector: 'test', template: 'Main: <ng-content/> Slot: <ng-content select="[foo]"/>', }) class TestComponent {} @...
{ "end_byte": 17615, "start_byte": 8574, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_if_spec.ts" }
angular/packages/core/test/acceptance/control_flow_if_spec.ts_17621_23920
it('should not project the root node across multiple layers of @if', () => { @Component({ standalone: true, selector: 'test', template: 'Main: <ng-content/> Slot: <ng-content select="[foo]"/>', }) class TestComponent {} @Component({ standalone: true, impo...
{ "end_byte": 23920, "start_byte": 17621, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_if_spec.ts" }
angular/packages/core/test/acceptance/control_flow_for_spec.ts_0_5906
/** * @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 {NgIf} from '@angular/common'; import { ChangeDetectorRef, Component, Directive, inject, Input, O...
{ "end_byte": 5906, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_for_spec.ts" }
angular/packages/core/test/acceptance/control_flow_for_spec.ts_5910_15310
describe('trackBy', () => { it('should have access to the host context in the track function', () => { let offsetReads = 0; @Component({ template: '@for ((item of items); track $index + offset) {{{item}}}', standalone: false, }) class TestComponent { items = ['a', 'b...
{ "end_byte": 15310, "start_byte": 5910, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_for_spec.ts" }
angular/packages/core/test/acceptance/control_flow_for_spec.ts_15314_19100
describe('list diffing and view operations', () => { it('should delete views in the middle', () => { @Component({ template: '@for (item of items; track item; let idx = $index) {{{item}}({{idx}})|}', standalone: false, }) class TestComponent { items = [1, 2, 3]; } ...
{ "end_byte": 19100, "start_byte": 15314, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_for_spec.ts" }
angular/packages/core/test/acceptance/control_flow_for_spec.ts_19104_27047
describe('content projection', () => { it('should project an @for with a single root node into the root node slot', () => { @Component({ standalone: true, selector: 'test', template: 'Main: <ng-content/> Slot: <ng-content select="[foo]"/>', }) class TestComponent {} ...
{ "end_byte": 27047, "start_byte": 19104, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_for_spec.ts" }
angular/packages/core/test/acceptance/control_flow_for_spec.ts_27053_32399
it('should not project the root node across multiple layers of @for', () => { @Component({ standalone: true, selector: 'test', template: 'Main: <ng-content/> Slot: <ng-content select="[foo]"/>', }) class TestComponent {} @Component({ standalone: true, imp...
{ "end_byte": 32399, "start_byte": 27053, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/control_flow_for_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_0_7557
/** * @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} from '@angular/common'; import { AfterViewInit, ChangeDetectorRef, Component, ContentC...
{ "end_byte": 7557, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_7561_14719
it('should call onChanges every time a new view is created with ngIf', () => { const events: any[] = []; @Component({ selector: 'comp', template: `<p>{{val}}</p>`, standalone: false, }) class Comp { @Input() val = ''; ngOnChanges(changes: SimpleChanges) { events.p...
{ "end_byte": 14719, "start_byte": 7561, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_14723_21399
it('should be called on directives before component if component injects directives', () => { const events: any[] = []; @Directive({ selector: '[dir]', standalone: false, }) class Dir { @Input() dir = ''; ngOnChanges(changes: SimpleChanges) { events.push({name: 'dir', c...
{ "end_byte": 21399, "start_byte": 14723, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_21403_26610
it('should call onChanges properly in for loop with children', () => { const events: any[] = []; @Component({ selector: 'child', template: `<p>{{val}}</p>`, standalone: false, }) class Child { @Input() val = ''; @Input() name = ''; ngOnChanges(changes: SimpleChange...
{ "end_byte": 26610, "start_byte": 21403, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_26612_33783
describe('meta-programming', () => { it('should allow adding lifecycle hook methods any time before first instance creation', () => { const events: any[] = []; @Component({ template: `<child name="value"></child>`, standalone: false, }) class App {} @Component({ selector: 'chil...
{ "end_byte": 33783, "start_byte": 26612, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_33785_41445
describe('onInit', () => { it('should call onInit after inputs are the first time', () => { const input1Values: string[] = []; const input2Values: string[] = []; @Component({ selector: 'my-comp', template: `<p>test</p>`, standalone: false, }) class MyComponent { @Input() i...
{ "end_byte": 41445, "start_byte": 33785, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_41449_47876
it('should be called on directives after component by default', () => { const initialized: string[] = []; @Directive({ selector: '[dir]', standalone: false, }) class Dir { @Input('dir-name') name = ''; ngOnInit() { initialized.push('dir ' + this.name); } } ...
{ "end_byte": 47876, "start_byte": 41449, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_47878_53589
describe('doCheck', () => { it('should call doCheck on every refresh', () => { let doCheckCalled = 0; @Component({ template: ``, standalone: false, }) class App { ngDoCheck() { doCheckCalled++; } } TestBed.configureTestingModule({ declarations: [App], ...
{ "end_byte": 53589, "start_byte": 47878, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_53591_61589
describe('afterContentinit', () => { it('should be called only in creation mode', () => { let afterContentInitCalls = 0; @Component({ selector: 'comp', template: `<p>test</p>`, standalone: false, }) class Comp { ngAfterContentInit() { afterContentInitCalls++; } ...
{ "end_byte": 61589, "start_byte": 53591, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_61593_63685
it('should be called on directives after component', () => { const events: string[] = []; @Directive({ selector: '[dir]', standalone: false, }) class Dir { @Input('dir') name = ''; ngAfterContentInit() { events.push('dir ' + this.name); } } @Component({ ...
{ "end_byte": 63685, "start_byte": 61593, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_63687_70718
describe('afterViewInit', () => { it('should be called on creation and not in update mode', () => { let afterViewInitCalls = 0; @Component({ selector: 'comp', template: `<p>test</p>`, standalone: false, }) class Comp { ngAfterViewInit() { afterViewInitCalls++; } ...
{ "end_byte": 70718, "start_byte": 63687, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_70722_73944
it('should be called in correct order with for loops with children', () => { const events: string[] = []; @Component({ selector: 'child', template: `<p>test</p>`, standalone: false, }) class Child { @Input() name = ''; ngAfterViewInit() { events.push('child of par...
{ "end_byte": 73944, "start_byte": 70722, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_73946_79328
describe('afterViewChecked', () => { it('should call ngAfterViewChecked every update', () => { let afterViewCheckedCalls = 0; @Component({ selector: 'comp', template: `<p>test</p>`, standalone: false, }) class Comp { ngAfterViewChecked() { afterViewCheckedCalls++; ...
{ "end_byte": 79328, "start_byte": 73946, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_79330_86855
describe('onDestroy', () => { it('should call destroy when view is removed', () => { let destroyCalled = 0; @Component({ selector: 'comp', template: `<p>test</p>`, standalone: false, }) class Comp { ngOnDestroy() { destroyCalled++; } } @Component({ ...
{ "end_byte": 86855, "start_byte": 79330, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_86859_93454
it('should be called on every iteration of a destroyed for loop', () => { const events: string[] = []; @Component({ selector: 'comp', template: `<p>test</p>`, standalone: false, }) class Comp { @Input() name = ''; ngOnDestroy() { events.push('comp ' + this.name); ...
{ "end_byte": 93454, "start_byte": 86859, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_93456_101884
scribe('hook order', () => { let events: string[] = []; beforeEach(() => (events = [])); @Component({ selector: 'comp', template: `{{value}}<div><ng-content></ng-content></div>`, standalone: false, }) class Comp { @Input() value = ''; @Input() name = ''; ngOnInit() { events.p...
{ "end_byte": 101884, "start_byte": 93456, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/lifecycle_spec.ts_101886_104979
scribe('non-regression', () => { it('should call lifecycle hooks for directives active on <ng-template>', () => { let destroyed = false; @Directive({ selector: '[onDestroyDir]', standalone: false, }) class OnDestroyDir { ngOnDestroy() { destroyed = true; } } @...
{ "end_byte": 104979, "start_byte": 101886, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/lifecycle_spec.ts" }
angular/packages/core/test/acceptance/pending_tasks_spec.ts_0_5023
/** * @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 {ApplicationRef, PendingTasks} from '@angular/core'; import {TestBed} from '@angular/core/testing'; import {E...
{ "end_byte": 5023, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pending_tasks_spec.ts" }
angular/packages/core/test/acceptance/property_interpolation_spec.ts_0_5367
/** * @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} from '@angular/core'; import {TestBed} from '@angular/core/testing'; import {By} from '@angular/pl...
{ "end_byte": 5367, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/property_interpolation_spec.ts" }
angular/packages/core/test/acceptance/property_interpolation_spec.ts_5371_7899
it('should support the chained use cases of propertyInterpolate instructions', () => { // The below *just happens* to have two attributes in a row that have the same interpolation // count. @Component({ template: ` <img title="a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f{{six}}g{{seven}}h{{eigh...
{ "end_byte": 7899, "start_byte": 5371, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/property_interpolation_spec.ts" }
angular/packages/core/test/acceptance/standalone_injector_spec.ts_0_3161
/** * @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, createComponent, createEnvironmentInjector, EnvironmentInjector, NgModule, ViewChild...
{ "end_byte": 3161, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/standalone_injector_spec.ts" }
angular/packages/core/test/acceptance/attributes_spec.ts_0_6623
/** * @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} from '@angular/core'; import {TestBed} from '@angular/core/testing'; import {By, DomSanitizer, Sa...
{ "end_byte": 6623, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/attributes_spec.ts" }
angular/packages/core/test/acceptance/attributes_spec.ts_6625_8089
describe('attribute interpolation', () => { it('should handle all varieties of interpolation', () => { @Component({ template: ` <div attr.title="a{{a}}b{{b}}c{{c}}d{{d}}e{{e}}f{{f}}g{{g}}h{{h}}i{{i}}j"></div> <div attr.title="a{{a}}b{{b}}c{{c}}d{{d}}e{{e}}f{{f}}g{{g}}h{{h}}i"></div> ...
{ "end_byte": 8089, "start_byte": 6625, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/attributes_spec.ts" }
angular/packages/core/test/acceptance/providers_spec.ts_0_2040
/** * @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} from '@angular/common'; import { Component, Directive, forwardRef, Inject, Injectabl...
{ "end_byte": 2040, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/providers_spec.ts" }
angular/packages/core/test/acceptance/providers_spec.ts_2044_10859
describe('lifecycles', () => { it('should inherit ngOnDestroy hooks on providers', () => { const logs: string[] = []; @Injectable() class SuperInjectableWithDestroyHook { ngOnDestroy() { logs.push('OnDestroy'); } } @Injectable() class SubInjectableWith...
{ "end_byte": 10859, "start_byte": 2044, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/providers_spec.ts" }
angular/packages/core/test/acceptance/providers_spec.ts_10865_20718
describe('ngOnDestroy on multi providers', () => { it('should invoke ngOnDestroy on multi providers with the correct context', () => { const destroyCalls: any[] = []; const SERVICES = new InjectionToken<any>('SERVICES'); @Injectable() class DestroyService { ngOnDestroy()...
{ "end_byte": 20718, "start_byte": 10865, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/providers_spec.ts" }
angular/packages/core/test/acceptance/providers_spec.ts_20722_23349
describe('flags', () => { class MyService { constructor(public value: OtherService | null) {} } class OtherService {} it('should support Optional flag in deps', () => { const injector = Injector.create({ providers: [{provide: MyService, deps: [[new Optional(), OtherService]]}], ...
{ "end_byte": 23349, "start_byte": 20722, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/providers_spec.ts" }
angular/packages/core/test/acceptance/profiler_spec.ts_0_6717
/** * @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 {setProfiler} from '@angular/core/src/render3/profiler'; import {ProfilerEvent} from '@angular/core/src/rende...
{ "end_byte": 6717, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/profiler_spec.ts" }
angular/packages/core/test/acceptance/profiler_spec.ts_6721_13311
describe('lifecycle hooks', () => { it('should call the profiler on lifecycle execution', () => { class Service implements OnDestroy { ngOnDestroy() {} } @Component({ selector: 'my-comp', template: '{{prop}}', providers: [Service], standalone: false, }...
{ "end_byte": 13311, "start_byte": 6721, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/profiler_spec.ts" }
angular/packages/core/test/acceptance/ngmodule_scope_spec.ts_0_2307
/** * @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, NgModule, Pipe, PipeTransform} from '@angular/core'; import {BrowserModule} from...
{ "end_byte": 2307, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/ngmodule_scope_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_0_8782
/** * @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} from '@angular/common'; import { Component, ComponentRef, Directive, ElementRef, Host...
{ "end_byte": 8782, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_8786_16605
describe('css variables', () => { const supportsCssVariables = typeof getComputedStyle !== 'undefined' && typeof CSS !== 'undefined' && typeof CSS.supports !== 'undefined' && CSS.supports('color', 'var(--fake-var)'); it('should support css variables', () => { // This test only wor...
{ "end_byte": 16605, "start_byte": 8786, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_16609_24701
it('should not feed host classes back into shadow input', () => { @Component({ template: ` <div class="s1" dir-shadows-class-input></div> <div class="s1" [class]=" 'd1' " dir-shadows-class-input></div> `, standalone: false, }) class Cmp {} @Directive({ se...
{ "end_byte": 24701, "start_byte": 16609, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_24705_33028
it('should render inline style and class attribute values on the element before a directive is instantiated', () => { @Component({ template: ` <div directive-expecting-styling style="width:200px" class="abc xyz"></div> `, standalone: false, }) class Cmp {} @Directive({ s...
{ "end_byte": 33028, "start_byte": 24705, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_33032_39118
it('should set !important on multiple properties', () => { @Component({ template: '<div [style]="styles"></div>', standalone: false, }) class Cmp { styles!: string; } TestBed.configureTestingModule({declarations: [Cmp]}); const fixture = TestBed.createComponent(Cmp); fixtu...
{ "end_byte": 39118, "start_byte": 33032, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_39122_46103
it('should support interpolations inside a style binding', () => { @Component({ template: ` <div style="content: &quot;a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f{{six}}g{{seven}}h{{eight}}i{{nine}}j&quot;"></div> <div style="content: &quot;a{{one}}b{{two}}c{{three}}d{{four}}e{{five}}f{{six}...
{ "end_byte": 46103, "start_byte": 39122, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_46107_52563
it('should support interpolations when a style property has a unit suffix', () => { @Component({ template: '<div style.width.px="{{one}}{{three}}{{three}}7"></div>', standalone: false, }) class Cmp { one = 1; three = 3; } TestBed.configureTestingModule({declarations: [Cmp]})...
{ "end_byte": 52563, "start_byte": 46107, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_52567_61391
it('should write to a `class` input binding if there is a static class value and there is a binding value', () => { let capturedClassBindingCount = 0; let capturedClassBindingValue: string | null = null; let capturedMyClassBindingCount = 0; let capturedMyClassBindingValue: string | null = null; @Co...
{ "end_byte": 61391, "start_byte": 52567, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_61395_69130
it('should apply single style/class across the template and directive host bindings', () => { @Directive({ selector: '[dir-that-sets-width]', standalone: false, }) class DirThatSetsWidthDirective { @Input('dir-that-sets-width') @HostBinding('style.width') public width: string = ''; } ...
{ "end_byte": 69130, "start_byte": 61395, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_69134_76663
it('should apply map-based style and class entries', () => { @Component({ template: '<div [style]="s" [class]="c"></div>', standalone: false, }) class Cmp { public c: {[key: string]: any} | null = null; updateClasses(classes: string) { const c = this.c || (this.c = {}); ...
{ "end_byte": 76663, "start_byte": 69134, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_76667_85404
it('should not sanitize style values before writing them', () => { @Component({ template: ` <div [style.width]="widthExp" [style.background-image]="bgImageExp"></div> `, standalone: false, }) class Cmp { widthExp = ...
{ "end_byte": 85404, "start_byte": 76667, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_85408_93962
it('should create and update multiple class bindings across multiple elements in a template', () => { @Component({ template: ` <header class="header">header</header> <div *ngFor="let item of items" class="item item-{{ item }}"> {{ item }} </div> <f...
{ "end_byte": 93962, "start_byte": 85408, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_93966_102388
it('should allow to reset style property value defined using ngStyle', () => { @Component({ template: ` <div [ngStyle]="s"></div> `, standalone: false, }) class Cmp { s: any = {opacity: '1'}; clearStyle(): void { this.s = null; } } TestBed.config...
{ "end_byte": 102388, "start_byte": 93966, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_102392_111443
it('should not set classes when falsy value is passed while a sanitizer is present', () => { @Component({ // Note that we use `background` here because it needs to be sanitized. template: ` <span class="container" [ngClass]="{disabled: isDisabled}"></span> <div [style.background]="backgr...
{ "end_byte": 111443, "start_byte": 102392, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_111447_118550
it('should allow multiple styling bindings to work alongside property/attribute bindings', () => { @Component({ template: ` <div dir-that-sets-styles [style]="{'font-size': '300px'}" [attr.title]="'my-title'" [attr.data-foo]="'my-foo'"> </div>`, ...
{ "end_byte": 118550, "start_byte": 111447, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_118554_127014
it('should combine host class.foo bindings from multiple directives', () => { @Directive({ selector: '[dir-that-sets-one-two]', exportAs: 'one', standalone: false, }) class DirThatSetsOneTwo { @HostBinding('class.one') one = false; @HostBinding('class.two') two = false; } ...
{ "end_byte": 127014, "start_byte": 118554, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/styling_spec.ts_127018_131395
describe('regression', () => { it('should support sanitizer value in the [style] bindings', () => { @Component({ template: `<div [style]="style"></div>`, standalone: false, }) class HostBindingTestComponent { style: SafeStyle; constructor(private sanitizer: DomSanit...
{ "end_byte": 131395, "start_byte": 127018, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/styling_spec.ts" }
angular/packages/core/test/acceptance/directive_spec.ts_0_556
/** * @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} from '@angular/common'; import { Component, Directive, ElementRef, EventEmitter, Inp...
{ "end_byte": 556, "start_byte": 0, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/directive_spec.ts" }
angular/packages/core/test/acceptance/directive_spec.ts_558_10053
describe('directives', () => { describe('matching', () => { @Directive({ selector: 'ng-template[test]', standalone: false, }) class TestDirective { constructor(public templateRef: TemplateRef<any>) {} } @Directive({ selector: '[title]', standalone: false, }) ...
{ "end_byte": 10053, "start_byte": 558, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/directive_spec.ts" }
angular/packages/core/test/acceptance/directive_spec.ts_10059_14827
it('should match attributes to directive selectors without case sensitivity', () => { @Directive({ selector: '[title=Titledir]', standalone: false, }) class TitleAttributeDirective {} TestBed.configureTestingModule({declarations: [TestComponent, TitleAttributeDirective]}); ...
{ "end_byte": 14827, "start_byte": 10059, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/directive_spec.ts" }
angular/packages/core/test/acceptance/directive_spec.ts_14831_23797
describe('inputs', () => { it('should allow directive inputs (as a prop binding) on <ng-template>', () => { let dirInstance: WithInput; @Directive({ selector: '[dir]', standalone: false, }) class WithInput { constructor() { dirInstance = this; } ...
{ "end_byte": 23797, "start_byte": 14831, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/directive_spec.ts" }
angular/packages/core/test/acceptance/directive_spec.ts_23803_31850
it('should transform incoming static input values', () => { @Directive({ selector: '[dir]', standalone: false, }) class Dir { @Input({transform: (value: string) => (value ? 1 : 0)}) value = -1; } @Component({ template: '<div dir value="staticValue"></div>',...
{ "end_byte": 31850, "start_byte": 23803, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/directive_spec.ts" }
angular/packages/core/test/acceptance/directive_spec.ts_31854_41010
describe('attribute shadowing behaviors', () => { /** * To match ViewEngine, we need to ensure the following behaviors */ @Directive({ selector: '[dir-with-title]', standalone: false, }) class DirWithTitle { @Input() title = ''; } it('should set both the div attribu...
{ "end_byte": 41010, "start_byte": 31854, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/directive_spec.ts" }
angular/packages/core/test/acceptance/directive_spec.ts_41014_43747
describe('directives with the same selector', () => { it('should process Directives from `declarations` list after imported ones', () => { const log: string[] = []; @Directive({ selector: '[dir]', standalone: false, }) class DirectiveA { constructor() { log....
{ "end_byte": 43747, "start_byte": 41014, "url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/directive_spec.ts" }