_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/packages/core/test/animation/animation_query_integration_spec.ts_1199_10144 | // these tests are only meant to be run within the DOM (for now)
if (isNode) return;
describe('animation query tests', function () {
function getLog(): MockAnimationPlayer[] {
return MockAnimationDriver.log as MockAnimationPlayer[];
}
function resetLog() {
MockAnimationDriver.log = [];
... | {
"end_byte": 10144,
"start_byte": 1199,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_10152_17649 | hould be able to query all actively queued animation triggers via `@*:animating`', () => {
@Component({
selector: 'ani-cmp',
template: `
<div [@parent]="exp0">
<div class="c1" [@child]="exp1"></div>
<div class="c2" [@child]="exp2"></div>
... | {
"end_byte": 17649,
"start_byte": 10152,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_17657_26084 | ld properly apply stagger after various other steps within a query', () => {
@Component({
selector: 'ani-cmp',
template: `
<div [@myAnimation]="exp">
<header></header>
<footer></footer>
</div>
`,
animations: [
... | {
"end_byte": 26084,
"start_byte": 17657,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_26092_34064 | eanup :enter and :leave artifacts from nodes when any animation sequences fail to be built', () => {
@Component({
selector: 'ani-cmp',
template: `
<div [@myAnimation]="items.length" class="parent" #container>
<div *ngFor="let item of items" class="child">
... | {
"end_byte": 34064,
"start_byte": 26092,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_34072_42365 | y cancel items that were queried into a former animation and pass in the associated styles into the follow-up players per element', () => {
@Component({
selector: 'ani-cmp',
template: `
<div [@myAnimation]="exp" class="parent">
<div *ngFor="let item of items" class=... | {
"end_byte": 42365,
"start_byte": 34072,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_42373_51178 | ied players when the previous player is finished', () => {
@Component({
selector: 'ani-cmp',
template: `
<div [@myAnimation]="exp" class="parent">
<div *ngFor="let item of items" class="child">
{{ item }}
</div>
</div>
... | {
"end_byte": 51178,
"start_byte": 42373,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_51186_55630 | in sub components that do not contain animations using the :leave selector', () => {
@Component({
selector: 'parent-cmp',
template: `
<div [@myAnimation]="exp">
<child-cmp #child></child-cmp>
</div>
`,
animations: [
trigge... | {
"end_byte": 55630,
"start_byte": 51186,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_55636_63200 | ) => {
it('should animate a sub trigger that exists in an inner element in the template', () => {
@Component({
selector: 'ani-cmp',
template: `
<div #parent class="parent" [@parent]="exp1">
<div #child class="child" [@child]="exp2"></div>
</div>
... | {
"end_byte": 63200,
"start_byte": 55636,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_63208_69604 | if a sub trigger is animated that doesn't contain a trigger that is setup for animation", () => {
@Component({
selector: 'ani-cmp',
template: `
<div #parent class="parent" [@parent]="exp1">
<div [@child]="exp2" class="child"></div>
</div>
`,
... | {
"end_byte": 69604,
"start_byte": 63208,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_69612_78858 | ation to be used up by a parent trigger once', () => {
@Component({
selector: 'ani-cmp',
template: `
<div [@parent]="exp1" class="parent1" #parent>
<div [@parent]="exp1" class="parent2">
<div [@child]="exp2" class="child">
</div>
... | {
"end_byte": 78858,
"start_byte": 69612,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_78866_87731 | nner @trigger DOM nodes when a parent animation occurs', fakeAsync(() => {
@Component({
selector: 'ani-cmp',
template: `
<div @parent *ngIf="exp" class="parent">
this <div @child>child</div>
</div>
`,
animations: [
trigger... | {
"end_byte": 87731,
"start_byte": 78866,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_87739_95022 | gers when a parent animation is scheduled', () => {
@Component({
selector: 'parent-cmp',
animations: [
trigger('parent', [transition('* => *', [animate(1000, style({opacity: 0}))])]),
],
template: '<div [@parent]="exp"><child-cmp #child></child-cmp></div>',
... | {
"end_byte": 95022,
"start_byte": 87739,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_95030_102817 | of a child animation queries are issued by the parent', () => {
@Component({
selector: 'parent-cmp',
animations: [
trigger('parent', [
transition('* => *', [
animate(1000, style({color: 'red'})),
query('@child', animateChild()),
... | {
"end_byte": 102817,
"start_byte": 95030,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_102825_110880 | animations', () => {
@Component({
selector: 'cmp',
animations: [
trigger('parent', [
transition(
':leave',
group([
sequence([style({opacity: 0}), animate(1000, style({opacity: 1}))]),
query(':leave... | {
"end_byte": 110880,
"start_byte": 102825,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_query_integration_spec.ts_110886_116226 | describe('[@.disabled]', () => {
it('should allow a parent animation to query and animate inner nodes that are in a disabled region', () => {
@Component({
selector: 'some-cmp',
template: `
<div [@myAnimation]="exp">
<div [@.disabled]="disable... | {
"end_byte": 116226,
"start_byte": 110886,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_query_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_router_integration_spec.ts_0_8536 | /**
* @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 {
animate,
animateChild,
group,
query,
sequence,
style,
transition,
trigger,
ɵAnimationGroup... | {
"end_byte": 8536,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_router_integration_spec.ts"
} |
angular/packages/core/test/animation/animation_router_integration_spec.ts_8542_17494 | should allow inner leave animations to be emulated within a routed item', fakeAsync(() => {
@Component({
animations: [
trigger('routerAnimations', [
transition('page1 => page2', [query(':leave', animateChild())]),
]),
],
template: `
<div [@routerAn... | {
"end_byte": 17494,
"start_byte": 8542,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animation_router_integration_spec.ts"
} |
angular/packages/core/test/animation/animations_with_web_animations_integration_spec.ts_0_806 | /**
* @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 {animate, query, state, style, transition, trigger} from '@angular/animations';
import {
AnimationDriver,
... | {
"end_byte": 806,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animations_with_web_animations_integration_spec.ts"
} |
angular/packages/core/test/animation/animations_with_web_animations_integration_spec.ts_808_9259 | nction () {
// these tests are only meant to be run within the DOM (for now)
// Buggy in Chromium 39, see https://github.com/angular/angular/issues/15793
if (isNode) return;
describe('animation integration tests using web animations', function () {
beforeEach(() => {
TestBed.configureTestingModule({
... | {
"end_byte": 9259,
"start_byte": 808,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animations_with_web_animations_integration_spec.ts"
} |
angular/packages/core/test/animation/animations_with_web_animations_integration_spec.ts_9265_16460 | t * styles as ! for queried items that are collected in a container that is being removed', () => {
@Component({
selector: 'my-app',
styles: [
`
.list .outer {
overflow:hidden;
}
.list .inner {
box-sizing: border-b... | {
"end_byte": 16460,
"start_byte": 9265,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animations_with_web_animations_integration_spec.ts"
} |
angular/packages/core/test/animation/animations_with_web_animations_integration_spec.ts_16466_21837 | splay` and `position` styles as regular inline styles for the duration of the animation', () => {
@Component({
selector: 'ani-cmp',
template: `
<div #elm [@myAnimation]="myAnimationExp" style="display:table; position:fixed"></div>
`,
animations: [
trigger('myAni... | {
"end_byte": 21837,
"start_byte": 16466,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/animation/animations_with_web_animations_integration_spec.ts"
} |
angular/packages/core/test/authoring/input_signal_spec.ts_0_3145 | /**
* @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, computed, effect, input} from '@angular/core';
import {SIGNAL} from '@angular/core/primitives/sig... | {
"end_byte": 3145,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/input_signal_spec.ts"
} |
angular/packages/core/test/authoring/type_tester.ts_0_2814 | /**
* @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 fs from 'fs';
import path from 'path';
import ts from 'typescript';
import url from 'url';
/** Currently-con... | {
"end_byte": 2814,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/type_tester.ts"
} |
angular/packages/core/test/authoring/signal_model_signature_test.ts_0_1602 | /**
* @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
*/
/**
* @fileoverview
* This file contains various signal `model()` patterns and ensures
* the resulting types matc... | {
"end_byte": 1602,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/signal_model_signature_test.ts"
} |
angular/packages/core/test/authoring/signal_queries_signature_test.ts_0_7462 | /**
* @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 {
contentChild,
contentChildren,
ElementRef,
forwardRef,
InjectionToken,
Signal,
viewChild,
v... | {
"end_byte": 7462,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/signal_queries_signature_test.ts"
} |
angular/packages/core/test/authoring/signal_input_signature_test.ts_0_4067 | /**
* @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
*/
/**
* @fileoverview
* This file contains various signal `input()` patterns and ensures
* the resulting types matc... | {
"end_byte": 4067,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/signal_input_signature_test.ts"
} |
angular/packages/core/test/authoring/BUILD.bazel_0_1207 | load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "nodejs_test", "ts_library")
ts_library(
name = "signal_authoring_signature_test_lib",
testonly = True,
srcs = [
"signal_input_signature_test.ts",
"signal_model_signature_test.ts",
"signal_queries_signature_te... | {
"end_byte": 1207,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/BUILD.bazel"
} |
angular/packages/core/test/authoring/unwrap_writable_signal_signature_test.ts_0_1426 | /**
* @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
*/
/**
* @fileoverview
* This file contains various signal `model()` patterns and ensures
* the resulting types matc... | {
"end_byte": 1426,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/unwrap_writable_signal_signature_test.ts"
} |
angular/packages/core/test/authoring/model_input_spec.ts_0_4602 | /**
* @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 {computed, isSignal, model, WritableSignal} from '@angular/core';
import {TestBed} from '@angular/core/testin... | {
"end_byte": 4602,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/authoring/model_input_spec.ts"
} |
angular/packages/core/test/acceptance/ng_module_spec.ts_0_7039 | /**
* @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,
createNgModule,
CUSTOM_ELEMENTS_SCHEMA,
de... | {
"end_byte": 7039,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/ng_module_spec.ts"
} |
angular/packages/core/test/acceptance/ng_module_spec.ts_7043_15909 | chemas', () => {
it('should log an error on unknown props if NO_ERRORS_SCHEMA is absent', () => {
@Component({
selector: 'my-comp',
template: `
<ng-container *ngIf="condition">
<div [unknown-prop]="true"></div>
</ng-container>
`,
standalone: fals... | {
"end_byte": 15909,
"start_byte": 7043,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/ng_module_spec.ts"
} |
angular/packages/core/test/acceptance/ng_module_spec.ts_15915_22605 | report unknown property bindings on ng-content', () => {
@Component({
template: `<ng-content *unknownProp="123"></ng-content>`,
standalone: false,
})
class App {}
TestBed.configureTestingModule({declarations: [App]});
const spy = spyOn(console, 'error');
const fixtur... | {
"end_byte": 22605,
"start_byte": 15915,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/ng_module_spec.ts"
} |
angular/packages/core/test/acceptance/ng_module_spec.ts_22611_31100 | OT-compiled components', () => {
function createComponent(
template: (rf: any) => void,
vars: number,
consts?: (number | string)[][],
) {
class Comp {
static ɵfac = () => new Comp();
static ɵcmp = defineComponent({
type: Comp,
selec... | {
"end_byte": 31100,
"start_byte": 22611,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/ng_module_spec.ts"
} |
angular/packages/core/test/acceptance/ng_module_spec.ts_31104_33514 | eNgModule function', () => {
it('should create an NgModuleRef instance', () => {
const TOKEN_A = new InjectionToken('A');
const TOKEN_B = new InjectionToken('B');
@NgModule({
providers: [{provide: TOKEN_A, useValue: 'TokenValueA'}],
})
class AppModule {}
@NgModule({
... | {
"end_byte": 33514,
"start_byte": 31104,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/ng_module_spec.ts"
} |
angular/packages/core/test/acceptance/view_insertion_spec.ts_0_8958 | /**
* @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 {
ChangeDetectorRef,
Component,
Directive,
EmbeddedView... | {
"end_byte": 8958,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/view_insertion_spec.ts"
} |
angular/packages/core/test/acceptance/view_insertion_spec.ts_8962_17234 | describe('before another view', () => {
@Directive({
selector: '[viewInserting]',
exportAs: 'vi',
standalone: false,
})
class ViewInsertingDir {
constructor(private _vcRef: ViewContainerRef) {}
insert(beforeView: ViewRef, insertTpl: TemplateRef<{}>) {
this._vcRef.inser... | {
"end_byte": 17234,
"start_byte": 8962,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/view_insertion_spec.ts"
} |
angular/packages/core/test/acceptance/view_insertion_spec.ts_17240_22904 | describe('before component view', () => {
@Directive({
selector: '[viewInserting]',
exportAs: 'vi',
standalone: false,
})
class ViewInsertingDir {
constructor(private _vcRef: ViewContainerRef) {}
insert(beforeView: ViewRef, insertTpl: TemplateRef<{}>) {
... | {
"end_byte": 22904,
"start_byte": 17240,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/view_insertion_spec.ts"
} |
angular/packages/core/test/acceptance/view_insertion_spec.ts_22908_30968 | describe('create mode error handling', () => {
it('should consistently report errors raised a directive constructor', () => {
@Directive({
selector: '[failInConstructorAlways]',
standalone: false,
})
class FailInConstructorAlways {
constructor() {
throw new Error(... | {
"end_byte": 30968,
"start_byte": 22908,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/view_insertion_spec.ts"
} |
angular/packages/core/test/acceptance/component_spec.ts_0_8975 | /**
* @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, NgIf} from '@angular/common';
import {
ApplicationRef,
Component,
ComponentRef,
createComp... | {
"end_byte": 8975,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/component_spec.ts"
} |
angular/packages/core/test/acceptance/component_spec.ts_8979_17069 | should clear the contents of dynamically created component when it's attached to ApplicationRef", () => {
let wasOnDestroyCalled = false;
@Component({
selector: '[comp]',
template: 'comp content',
standalone: false,
})
class DynamicComponent {
ngOnDestroy() {
wasOnDestroy... | {
"end_byte": 17069,
"start_byte": 8979,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/component_spec.ts"
} |
angular/packages/core/test/acceptance/component_spec.ts_17073_24793 | should use a new ngcontent attribute for child elements created w/ Renderer2', () => {
@Component({
selector: 'app-root',
template: '<parent-comp></parent-comp>',
styles: [':host { color: red; }'], // `styles` must exist for encapsulation to apply.
encapsulation: ViewEncapsulation.Emulated,
... | {
"end_byte": 24793,
"start_byte": 17073,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/component_spec.ts"
} |
angular/packages/core/test/acceptance/component_spec.ts_24797_33147 | ibe('createComponent', () => {
it('should create an instance of a standalone component', () => {
@Component({
standalone: true,
template: 'Hello {{ name }}!',
})
class StandaloneComponent {
name = 'Angular';
}
const hostElement = document.createElement('div');
... | {
"end_byte": 33147,
"start_byte": 24797,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/component_spec.ts"
} |
angular/packages/core/test/acceptance/component_spec.ts_33151_37498 | ibe('reflectComponentType', () => {
it('should create an ComponentMirror for a standalone component', () => {
function transformFn() {}
@Component({
selector: 'standalone-component',
standalone: true,
template: `
<ng-content></ng-content>
<ng-content select="... | {
"end_byte": 37498,
"start_byte": 33151,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/component_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_0_3164 | /**
* @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 {animate, AnimationEvent, state, style, transition, trigger} from '@angular/animations';
import {AnimationDriv... | {
"end_byte": 3164,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_3168_13788 | describe('ng-container', () => {
it('should insert as a child of a regular element', () => {
@Component({
template: '<div>before|<ng-container>Greetings<span></span></ng-container>|after</div>',
standalone: false,
})
class App {}
TestBed.configureTestingModule({declarations:... | {
"end_byte": 13788,
"start_byte": 3168,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_13792_21531 | describe('text bindings', () => {
it('should render "undefined" as ""', () => {
@Component({
template: '{{name}}',
standalone: false,
})
class App {
name: string | undefined = 'benoit';
}
TestBed.configureTestingModule({declarations: [App]});
const fixtur... | {
"end_byte": 21531,
"start_byte": 13792,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_21535_26165 | describe('basic components', () => {
@Component({
selector: 'todo',
template: '<p>Todo{{value}}</p>',
standalone: false,
})
class TodoComponent {
value = ' one';
}
it('should support a basic component template', () => {
@Component({
template: '<todo></todo>',
... | {
"end_byte": 26165,
"start_byte": 21535,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_26169_33288 | describe('element bindings', () => {
describe('elementAttribute', () => {
it('should support attribute bindings', () => {
@Component({
template: '<button [attr.title]="title"></button>',
standalone: false,
})
class App {
title: string | null = '';
... | {
"end_byte": 33288,
"start_byte": 26169,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_33294_35183 | describe('elementStyle', () => {
it('should support binding to styles', () => {
@Component({
template: '<span [style.font-size]="size"></span>',
standalone: false,
})
class App {
size: string | null = '';
}
TestBed.configureTestingModule({decl... | {
"end_byte": 35183,
"start_byte": 33294,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_35189_44794 | describe('class-based styling', () => {
it('should support CSS class toggle', () => {
@Component({
template: '<span [class.active]="value"></span>',
standalone: false,
})
class App {
value: any;
}
TestBed.configureTestingModule({declarations: ... | {
"end_byte": 44794,
"start_byte": 35189,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_44802_54316 | it("should apply single styling bindings present within a directive onto the same element and defer the element's initial styling values when missing", () => {
@Directive({
selector: '[DirWithSingleStylingBindings]',
host: {
'class': 'def',
'[class.xyz]': 'activateXYZ... | {
"end_byte": 54316,
"start_byte": 44802,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_54322_63807 | it('should properly handle and render interpolation for class attribute bindings', () => {
@Component({
template: '<div class="-{{name}}-{{age}}-"></div>',
standalone: false,
})
class App {
name = '';
age = '';
}
TestBed.configureTestingModule({declarations... | {
"end_byte": 63807,
"start_byte": 54322,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_63811_72487 | it('should inherit inputs from undecorated superclasses', () => {
class ButtonSuperClass {
@Input() isDisabled!: boolean;
}
@Component({
selector: 'button[custom-button]',
template: '',
standalone: false,
})
class ButtonSubClass extends ButtonSuperClass {}
@Component({
... | {
"end_byte": 72487,
"start_byte": 63811,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_72491_79345 | it('should handle nullish coalescing inside templates', () => {
@Component({
template: `
<span [title]="'Your last name is ' + (lastName ?? lastNameFallback ?? 'unknown')">
Hello, {{ firstName ?? 'Frodo' }}!
You are a Balrog: {{ falsyValue ?? true }}
</span>
`,
... | {
"end_byte": 79345,
"start_byte": 72491,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_79349_86206 | it('should handle nested calls to a safe access methods in templates', () => {
const log: string[] = [];
class Person {
constructor(
public name: string,
public title: string,
) {}
getName(includeTitle: boolean | undefined) {
log.push(`person.getName(${includeTitle})`... | {
"end_byte": 86206,
"start_byte": 79349,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_86210_95060 | describe('tView.firstUpdatePass', () => {
function isFirstUpdatePass() {
const lView = getLView();
const tView = lView[TVIEW];
return tView.firstUpdatePass;
}
function assertAttrValues(element: Element, value: string) {
expect(element.getAttribute('data-comp')).toEqual(value);
... | {
"end_byte": 95060,
"start_byte": 86210,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/integration_spec.ts_95062_95317 | /**
* Queries the provided `root` element for sub elements by the selector and casts the result as an
* array of elements
*/
function queryAll(root: HTMLElement, selector: string): HTMLElement[] {
return Array.from(root.querySelectorAll(selector));
} | {
"end_byte": 95317,
"start_byte": 95062,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/integration_spec.ts"
} |
angular/packages/core/test/acceptance/property_binding_spec.ts_0_5952 | /**
* @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, trigger} from '@angular/animations';
import {CommonModule} from '@angular/common';
import {Comp... | {
"end_byte": 5952,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/property_binding_spec.ts"
} |
angular/packages/core/test/acceptance/property_binding_spec.ts_5956_14091 | describe('input properties', () => {
@Directive({
selector: '[myButton]',
standalone: false,
})
class MyButton {
@Input() disabled: boolean | undefined;
}
@Directive({
selector: '[otherDir]',
standalone: false,
})
class OtherDir {
@Input() id: number | un... | {
"end_byte": 14091,
"start_byte": 5956,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/property_binding_spec.ts"
} |
angular/packages/core/test/acceptance/property_binding_spec.ts_14095_22446 | describe('attributes and input properties', () => {
@Directive({
selector: '[myDir]',
exportAs: 'myDir',
standalone: false,
})
class MyDir {
@Input() role: string | undefined;
@Input('dir') direction: string | undefined;
@Output('change') changeStream = new EventEmitter<v... | {
"end_byte": 22446,
"start_byte": 14095,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/property_binding_spec.ts"
} |
angular/packages/core/test/acceptance/property_binding_spec.ts_22450_24150 | it('should not throw on synthetic property bindings when a directive on the same element injects ViewContainerRef', () => {
@Component({
selector: 'my-comp',
template: '',
animations: [trigger('trigger', [state('void', style({opacity: 0}))])],
host: {'[@trigger]': '"void"'},
standalone... | {
"end_byte": 24150,
"start_byte": 22450,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/property_binding_spec.ts"
} |
angular/packages/core/test/acceptance/di_forward_ref_spec.ts_0_2639 | /**
* @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, forwardRef, Host, Inject, ViewChild} from '@angular/core';
import {TestBed} from '@ang... | {
"end_byte": 2639,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/di_forward_ref_spec.ts"
} |
angular/packages/core/test/acceptance/destroy_ref_spec.ts_0_8477 | /**
* @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 {
Component,
createEnvironmentInjector,
DestroyRef,
Directive,
... | {
"end_byte": 8477,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/destroy_ref_spec.ts"
} |
angular/packages/core/test/acceptance/pure_function_spec.ts_0_7217 | /**
* @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, Input, QueryList, ViewChild, ViewChildren... | {
"end_byte": 7217,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pure_function_spec.ts"
} |
angular/packages/core/test/acceptance/pure_function_spec.ts_7223_11824 | it('should work up to 8 bindings', () => {
@Component({
template: `
<my-comp [names]="['a', 'b', 'c', 'd', 'e', 'f', 'g', v8]"></my-comp>
<my-comp [names]="['a', 'b', 'c', 'd', 'e', 'f', v7, v8]"></my-comp>
<my-comp [names]="['a', 'b', 'c', 'd', 'e', v6, v7,... | {
"end_byte": 11824,
"start_byte": 7223,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pure_function_spec.ts"
} |
angular/packages/core/test/acceptance/pure_function_spec.ts_11828_16638 | describe('with object literals', () => {
@Component({
selector: 'object-comp',
template: ``,
standalone: false,
})
class ObjectComp {
@Input() config: any = [];
}
it('should support an object literal', () => {
@Component({
template: '<object-comp [config]="{dur... | {
"end_byte": 16638,
"start_byte": 11828,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pure_function_spec.ts"
} |
angular/packages/core/test/acceptance/pure_function_spec.ts_16642_21299 | describe('identical literals', () => {
@Directive({
selector: '[dir]',
standalone: false,
})
class Dir {
@Input('dir') value: any;
}
it('should not share object literals across elements', () => {
@Component({
template: `
<div [dir]="{}"></div>
<di... | {
"end_byte": 21299,
"start_byte": 16642,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pure_function_spec.ts"
} |
angular/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts_0_8437 | /**
* @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, CommonModule, NgTemplateOutlet} from '@angular/common';
import {
AfterViewChecked,
Applicatio... | {
"end_byte": 8437,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts"
} |
angular/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts_8443_16552 | describe('and declaration component is CheckAlways', () => {
beforeEach(() => {
fixture.componentInstance.showCheckAlwaysDeclare = true;
fixture.componentInstance.showOnPushInsert = true;
fixture.detectChanges(false);
viewExecutionLog.length = 0;
});
it('should set up ... | {
"end_byte": 16552,
"start_byte": 8443,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts"
} |
angular/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts_16556_26234 | describe('backwards references', () => {
@Component({
selector: 'insertion',
template: `
<div>Insertion({{name}})</div>
<ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{$implicit: name}">
</ng-container>`,
changeDetection: ChangeDetectionS... | {
"end_byte": 26234,
"start_byte": 16556,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts"
} |
angular/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts_26238_31942 | it('refreshes transplanted views used as template in ngForTemplate', () => {
@Component({
selector: 'triple',
template: '<div *ngFor="let unused of [1,2,3]; template: template"></div>',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
class TripleTemplate {
... | {
"end_byte": 31942,
"start_byte": 26238,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts"
} |
angular/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts_31946_41367 | describe('when detached', () => {
@Component({
selector: 'on-push-component',
template: `
<ng-container #vc></ng-container>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
class OnPushComponent {
@ViewChild('vc', {read: ViewContainerR... | {
"end_byte": 41367,
"start_byte": 31946,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts"
} |
angular/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts_41370_42880 | it('does not cause infinite loops with exhaustive checkNoChanges', async () => {
TestBed.configureTestingModule({
providers: [provideExperimentalCheckNoChangesForDebug({interval: 1})],
});
const errorSpy = spyOn(console, 'error').and.callFake((...v) => {
fail('console errored with ' + v);
})... | {
"end_byte": 42880,
"start_byte": 41370,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts"
} |
angular/packages/core/test/acceptance/pipe_spec.ts_0_8130 | /**
* @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 {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
... | {
"end_byte": 8130,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pipe_spec.ts"
} |
angular/packages/core/test/acceptance/pipe_spec.ts_8133_13939 | be able to use DI in a Pipe that extends an Injectable', () => {
@Injectable({providedIn: 'root'})
class SayHelloService {
getHello() {
return 'Hello there';
}
}
// The generated code corresponds to the following decorator:
// @Injectable()
class ParentPipe {
construc... | {
"end_byte": 13939,
"start_byte": 8133,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pipe_spec.ts"
} |
angular/packages/core/test/acceptance/pipe_spec.ts_13943_20332 | hanism', () => {
it('should be able to handle Service injection', () => {
@Injectable()
class Service {
title = 'Service Title';
}
@Pipe({
name: 'myConcatPipe',
standalone: false,
})
class ConcatPipe implements PipeTransform {
constructor(public s... | {
"end_byte": 20332,
"start_byte": 13943,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pipe_spec.ts"
} |
angular/packages/core/test/acceptance/pipe_spec.ts_20336_29757 | or handling', () => {
it('should not re-invoke pure pipes if it fails initially', () => {
@Pipe({
name: 'throwPipe',
pure: true,
standalone: false,
})
class ThrowPipe implements PipeTransform {
transform(): never {
throw new Error('ThrowPipeError');
... | {
"end_byte": 29757,
"start_byte": 20336,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/pipe_spec.ts"
} |
angular/packages/core/test/acceptance/internal_spec.ts_0_4990 | /*!
* @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,
Directive,
EnvironmentInjector,
ɵgetClosestComponentName as getCloses... | {
"end_byte": 4990,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/internal_spec.ts"
} |
angular/packages/core/test/acceptance/bootstrap_spec.ts_0_7175 | /**
* @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,
COMPILER_OPTIONS,
Component,
destroyPlatform,
forwardRef,
NgModule,
NgZone,
... | {
"end_byte": 7175,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/bootstrap_spec.ts"
} |
angular/packages/core/test/acceptance/bootstrap_spec.ts_7181_15117 | scribe('ApplicationRef cleanup', () => {
it(
'should cleanup ApplicationRef when Injector is destroyed',
withBody('<my-app></my-app>', async () => {
const TestModule = createComponentAndModule();
const ngModuleRef = await platformBrowserDynamic().bootstrapModule(TestModule);
... | {
"end_byte": 15117,
"start_byte": 7181,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/bootstrap_spec.ts"
} |
angular/packages/core/test/acceptance/bootstrap_spec.ts_15123_21011 | ribe('changing bootstrap options', () => {
beforeEach(() => {
spyOn(console, 'error');
});
it(
'should log an error when changing defaultEncapsulation bootstrap options',
withBody('<my-app-a></my-app-a><my-app-b></my-app-b>', async () => {
const platformRef = platfor... | {
"end_byte": 21011,
"start_byte": 15123,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/bootstrap_spec.ts"
} |
angular/packages/core/test/acceptance/let_spec.ts_0_457 | /**
* @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,
Output,
EventEmitter,
ErrorHandler,
Pipe,
PipeTransform,
inject,
Ch... | {
"end_byte": 457,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/let_spec.ts"
} |
angular/packages/core/test/acceptance/let_spec.ts_458_9754 | {
it('should update the value of a @let declaration over time', () => {
@Component({
standalone: true,
template: `
@let multiplier = 2;
@let result = value * multiplier;
{{value}} times {{multiplier}} is {{result}}
`,
})
class TestComponent {
value = 0;
... | {
"end_byte": 9754,
"start_byte": 458,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/let_spec.ts"
} |
angular/packages/core/test/acceptance/let_spec.ts_9758_12305 | it('should not project let declarations', () => {
@Component({
selector: 'inner',
template: `
<ng-content select="header">Fallback header</ng-content>
<ng-content>Fallback content</ng-content>
<ng-content select="footer">Fallback footer</ng-content>
`,
standalone: tru... | {
"end_byte": 12305,
"start_byte": 9758,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/let_spec.ts"
} |
angular/packages/core/test/acceptance/discover_utils_spec.ts_0_8345 | /**
* @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 {
ChangeDetectionStrategy,
Component,
Directive,
Injecti... | {
"end_byte": 8345,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/discover_utils_spec.ts"
} |
angular/packages/core/test/acceptance/discover_utils_spec.ts_8349_15199 | describe('getOwningComponent', () => {
it('should return null when called on root component', () => {
expect(getOwningComponent(fixture.nativeElement)).toEqual(null);
expect(getOwningComponent(myApp)).toEqual(null);
});
it('should return containing component of child component', () => {
ex... | {
"end_byte": 15199,
"start_byte": 8349,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/discover_utils_spec.ts"
} |
angular/packages/core/test/acceptance/discover_utils_spec.ts_15201_20460 | describe('discovery utils deprecated', () => {
describe('getRootComponents()', () => {
it('should return a list of the root components of the application from an element', () => {
@Component({
selector: 'inner-comp',
template: '<div></div>',
standalone: false,
})
class In... | {
"end_byte": 20460,
"start_byte": 15201,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/discover_utils_spec.ts"
} |
angular/packages/core/test/acceptance/template_ref_spec.ts_0_343 | /**
* @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, Injector, TemplateRef, ViewChild, ViewContainerRef} from '@angular/core';
import {TestBed} from '... | {
"end_byte": 343,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/template_ref_spec.ts"
} |
angular/packages/core/test/acceptance/template_ref_spec.ts_345_9383 | describe('TemplateRef', () => {
describe('rootNodes', () => {
@Component({
template: `<ng-template #templateRef></ng-template>`,
standalone: false,
})
class App {
@ViewChild('templateRef', {static: true}) templateRef!: TemplateRef<any>;
minutes = 0;
}
function getRootNodes... | {
"end_byte": 9383,
"start_byte": 345,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/template_ref_spec.ts"
} |
angular/packages/core/test/acceptance/template_ref_spec.ts_9387_13235 | describe('context', () => {
@Component({
template: `
<ng-template #templateRef let-name="name">{{name}}</ng-template>
<ng-container #containerRef></ng-container>
`,
standalone: false,
})
class App {
@ViewChild('templateRef') templateRef!: TemplateRef<any>;
@ViewChild(... | {
"end_byte": 13235,
"start_byte": 9387,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/template_ref_spec.ts"
} |
angular/packages/core/test/acceptance/host_directives_spec.ts_0_8204 | /*!
* @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 {
AfterViewChecked,
AfterViewInit,
ChangeDetectorRef,
Component,
Directive,
ElementRef,
EventEm... | {
"end_byte": 8204,
"start_byte": 0,
"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_8208_10208 | it('should execute inherited host directives in the correct order', () => {
const logs: string[] = [];
@Directive({standalone: true})
class HostGrandparent_1 {
constructor() {
logs.push('HostGrandparent_1');
}
}
@Directive({standalone: true})
class HostGrandparent_2 {
... | {
"end_byte": 10208,
"start_byte": 8208,
"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_10212_17354 | describe('lifecycle hooks', () => {
it('should invoke lifecycle hooks from the host directives', () => {
const logs: string[] = [];
@Directive({standalone: true})
class HostDir implements OnInit, AfterViewInit, AfterViewChecked {
ngOnInit() {
logs.push('HostDir - ngOnInit');
... | {
"end_byte": 17354,
"start_byte": 10212,
"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_17358_19667 | describe('host bindings', () => {
it('should apply the host bindings from all host directives', () => {
const clicks: string[] = [];
@Directive({standalone: true, host: {'host-dir-attr': 'true', '(click)': 'handleClick()'}})
class HostDir {
handleClick() {
clicks.push('HostDir')... | {
"end_byte": 19667,
"start_byte": 17358,
"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_19671_28718 | describe('dependency injection', () => {
it('should allow the host to inject its host directives', () => {
let hostInstance!: Host;
let firstHostDirInstance!: FirstHostDir;
let secondHostDirInstance!: SecondHostDir;
@Directive({standalone: true})
class SecondHostDir {
construc... | {
"end_byte": 28718,
"start_byte": 19671,
"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_28724_31046 | it('should throw a circular dependency error if a host and a host directive inject each other', () => {
@Directive({standalone: true})
class HostDir {
host = inject(Host);
}
@Directive({
selector: '[dir]',
hostDirectives: [HostDir],
standalone: false,
})
... | {
"end_byte": 31046,
"start_byte": 28724,
"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_31050_40292 | describe('outputs', () => {
it('should not emit to an output of a host directive that has not been exposed', () => {
let hostDirectiveInstance: HostDir | undefined;
@Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit()'}})
class HostDir {
@Output() hasBeenClicked = new Ev... | {
"end_byte": 40292,
"start_byte": 31050,
"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_40298_45447 | it('should emit to an inherited output of a host directive', () => {
@Directive({
host: {'(click)': 'hasBeenClicked.emit("hello")'},
standalone: false,
})
class ParentDir {
@Output() hasBeenClicked = new EventEmitter<string>();
}
@Directive({standalone: true})
... | {
"end_byte": 45447,
"start_byte": 40298,
"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_45451_53534 | describe('inputs', () => {
it('should not set an input of a host directive that has not been exposed', () => {
@Directive({standalone: true})
class HostDir {
@Input() color?: string;
}
@Directive({
selector: '[dir]',
hostDirectives: [HostDir],
standalone: fal... | {
"end_byte": 53534,
"start_byte": 45451,
"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_53540_61782 | it('should set an input that was exposed from one host directive, but not another', () => {
@Directive({standalone: true})
class ExposedHostDir {
@Input() color?: string;
}
@Directive({standalone: true})
class UnExposedHostDir {
@Input() color?: string;
}
@Dir... | {
"end_byte": 61782,
"start_byte": 53540,
"url": "https://github.com/angular/angular/blob/main/packages/core/test/acceptance/host_directives_spec.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.