_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts_0_1765 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export const STATUS = {
CONTINUE: 100,
SWITCHING_PROTOCOLS: 101,
OK: 200,
CREATED: 201,
ACCEPTED: 202,
N... | {
"end_byte": 1765,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts_1766_8526 | {
'100': {
'code': 100,
'text': 'Continue',
'description':
'"The initial part of a request has been received and has not yet been rejected by the server."',
'spec_title': 'RFC7231#6.2.1',
'spec_href': 'https://tools.ietf.org/html/rfc7231#section-6.2.1',
},
'101': {
'code': 101,
'... | {
"end_byte": 8526,
"start_byte": 1766,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts_8529_15354 | '405': {
'code': 405,
'text': 'Method Not Allowed',
'description':
'"The method specified in the request-line is known by the origin server but not supported by the target resource."',
'spec_title': 'RFC7231#6.5.5',
'spec_href': 'https://tools.ietf.org/html/rfc7231#section-6.5.5',
},
'406'... | {
"end_byte": 15354,
"start_byte": 8529,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts_15357_20322 | '102': {
'code': 102,
'text': 'Processing',
'description':
'"An interim response to inform the client that the server has accepted the complete request, but has not yet completed it."',
'spec_title': 'RFC5218#10.1',
'spec_href': 'https://tools.ietf.org/html/rfc2518#section-10.1',
},
'207':... | {
"end_byte": 20322,
"start_byte": 15357,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/http-status-codes.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/delay-response.ts_0_1107 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Observable} from 'rxjs';
// Replaces use of RxJS delay. See v0.5.4.
/** adds specified delay (in ms) to bot... | {
"end_byte": 1107,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/delay-response.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/interfaces.ts_0_7498 | /**
* @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 {HttpHeaders} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from... | {
"end_byte": 7498,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/interfaces.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/interfaces.ts_7499_10122 | export interface RequestInfoUtilities {
/**
* Create a cold response Observable from a factory for ResponseOptions
* the same way that the in-mem backend service does.
* @param resOptionsFactory - creates ResponseOptions when observable is subscribed
* @param withDelay - if true (default), add simulated l... | {
"end_byte": 10122,
"start_byte": 7499,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/interfaces.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/backend-service.ts_0_1060 | /**
* @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 {HttpHeaders} from '@angular/common/http';
import {BehaviorSubject, from, Observable, Observer, of} from 'rxj... | {
"end_byte": 1060,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/backend-service.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/backend-service.ts_1061_8724 | export abstract class BackendService {
protected config: InMemoryBackendConfigArgs = new InMemoryBackendConfig();
protected db: {[key: string]: any} = {};
protected dbReadySubject: BehaviorSubject<boolean> | undefined;
private passThruBackend: PassThruBackend | undefined;
protected requestInfoUtils = this.get... | {
"end_byte": 8724,
"start_byte": 1061,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/backend-service.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/backend-service.ts_8727_17295 | protected commands(reqInfo: RequestInfo): Observable<any> {
const command = reqInfo.collectionName.toLowerCase();
const method = reqInfo.method;
let resOptions: ResponseOptions = {url: reqInfo.url};
switch (command) {
case 'resetdb':
resOptions.status = STATUS.NO_CONTENT;
return ... | {
"end_byte": 17295,
"start_byte": 8727,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/backend-service.ts"
} |
angular/packages/misc/angular-in-memory-web-api/src/backend-service.ts_17298_25133 | protected parseId(collection: any[], collectionName: string, id: string): any {
if (!this.isCollectionIdNumeric(collection, collectionName)) {
// Can't confirm that `id` is a numeric type; don't parse as a number
// or else `'42'` -> `42` and _get by id_ fails.
return id;
}
const idNum = p... | {
"end_byte": 25133,
"start_byte": 17298,
"url": "https://github.com/angular/angular/blob/main/packages/misc/angular-in-memory-web-api/src/backend-service.ts"
} |
angular/packages/upgrade/PACKAGE.md_0_234 | Provides support for upgrading applications from Angular JS to Angular.
The primary entry point is deprecated. Use the secondary entry point,
`upgrade/static`.
See [Angular deprecation policy](reference/releases#deprecation-policy). | {
"end_byte": 234,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/PACKAGE.md"
} |
angular/packages/upgrade/BUILD.bazel_0_1593 | load("//tools:defaults.bzl", "api_golden_test_npm_package", "generate_api_docs", "ng_module", "ng_package")
package(default_visibility = ["//visibility:public"])
ng_module(
name = "upgrade",
srcs = glob(
[
"*.ts",
"src/dynamic/src/*.ts",
],
),
deps = [
"... | {
"end_byte": 1593,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/BUILD.bazel"
} |
angular/packages/upgrade/index.ts_0_481 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// This file is not used to build this module. It is only used during editing
// by the TypeScript language service ... | {
"end_byte": 481,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/index.ts"
} |
angular/packages/upgrade/public_api.ts_0_585 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
/**
* @module
* @description
* Entry point for all public APIs of this package. allowing
* Angular 1 and Angular... | {
"end_byte": 585,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/public_api.ts"
} |
angular/packages/upgrade/static/common.ts_0_846 | /**
* @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
*/
/**
* Note: We intentionally use cross entry-point relative paths here. This
* is because the primary entry-point ... | {
"end_byte": 846,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/common.ts"
} |
angular/packages/upgrade/static/PACKAGE.md_0_139 | Supports the upgrade path from AngularJS to Angular, allowing
components and services from both systems to be used in the same application. | {
"end_byte": 139,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/PACKAGE.md"
} |
angular/packages/upgrade/static/BUILD.bazel_0_857 | load("//tools:defaults.bzl", "generate_api_docs", "ng_module")
package(default_visibility = ["//visibility:public"])
exports_files(["package.json"])
ng_module(
name = "static",
srcs = glob(
[
"*.ts",
"src/*.ts",
],
),
deps = [
"//packages/core",
... | {
"end_byte": 857,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/BUILD.bazel"
} |
angular/packages/upgrade/static/index.ts_0_481 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// This file is not used to build this module. It is only used during editing
// by the TypeScript language service ... | {
"end_byte": 481,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/index.ts"
} |
angular/packages/upgrade/static/public_api.ts_0_804 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export {
getAngularJSGlobal,
getAngularLib,
setAngularJSGlobal,
setAngularLib,
} from '../src/common/src/ang... | {
"end_byte": 804,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/public_api.ts"
} |
angular/packages/upgrade/static/test/angular1_providers_spec.ts_0_2521 | /**
* @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 {Ng1Token} from '../../src/common/src/angular1';
import {
compileFactory,
injectorFactory,
parseFactory... | {
"end_byte": 2521,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/angular1_providers_spec.ts"
} |
angular/packages/upgrade/static/test/BUILD.bazel_0_947 | load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")
circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/upgrade/static/index.mjs",
deps = ["//packages/upgrade/static"],
)
ts_lib... | {
"end_byte": 947,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/BUILD.bazel"
} |
angular/packages/upgrade/static/test/integration/static_test_helpers.ts_0_1889 | /**
* @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 {NgZone, PlatformRef, Type} from '@angular/core';
import {UpgradeModule} from '@angular/upgrade/static';
impo... | {
"end_byte": 1889,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/static_test_helpers.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_0_1293 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
AfterContentChecked,
AfterContentInit,
AfterViewChecked,
AfterViewInit,
ApplicationRef,
Compile... | {
"end_byte": 1293,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_1295_10172 | withEachNg1Version(() => {
[true, false].forEach((propagateDigest) => {
describe(`lazy-load ng2 module (propagateDigest: ${propagateDigest})`, () => {
beforeEach(() => destroyPlatform());
afterEach(() => destroyPlatform());
it('should support multiple downgraded modules', waitForAsync(() => {
... | {
"end_byte": 10172,
"start_byte": 1295,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_10180_16854 | it('should support manually setting up a root module for all downgraded modules', fakeAsync(() => {
@Injectable({providedIn: 'root'})
class CounterService {
private static counter = 0;
value = ++CounterService.counter;
}
@Component({
selector: 'ng2A',
... | {
"end_byte": 16854,
"start_byte": 10180,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_16862_23453 | it('should correctly traverse the injector tree of downgraded components (from different modules)', waitForAsync(() => {
@Component({
selector: 'ng2A',
template: 'ng2A(<ng-content></ng-content>)',
providers: [
{provide: 'FOO', useValue: 'CompA-foo'},
{provid... | {
"end_byte": 23453,
"start_byte": 16862,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_23461_30762 | it('should support using an upgraded service', waitForAsync(() => {
@Injectable()
class Ng2Service {
constructor(@Inject('ng1Value') private ng1Value: string) {}
getValue = () => `${this.ng1Value}-bar`;
}
@Component({
selector: 'ng2',
template: '{... | {
"end_byte": 30762,
"start_byte": 23461,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_30770_36548 | it('should create and destroy nested, asynchronously instantiated components inside the Angular zone', waitForAsync(() => {
let createdInTheZone = false;
let destroyedInTheZone = false;
@Component({
selector: 'test',
template: '',
standalone: false,
})
... | {
"end_byte": 36548,
"start_byte": 30770,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_36556_45004 | it('should run the lifecycle hooks in the correct order', waitForAsync(() => {
const logs: string[] = [];
let rootScope: angular.IRootScopeService;
@Component({
selector: 'ng2',
template: `
{{ value }}
<button (click)="value = 'qux'"></button>
... | {
"end_byte": 45004,
"start_byte": 36556,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_45012_51471 | it('should properly run cleanup when a downgraded component is destroyed', waitForAsync(() => {
let destroyed = false;
@Component({
selector: 'ng2',
template: '<ul><li>test1</li><li>test2</li></ul>',
standalone: false,
})
class Ng2Component implements OnDes... | {
"end_byte": 51471,
"start_byte": 45012,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_module_spec.ts_51479_60135 | it('should destroy the AngularJS app when `PlatformRef` is destroyed', waitForAsync(() => {
@Component({
selector: 'ng2',
template: '<span>NG2</span>',
standalone: false,
})
class Ng2Component {}
@NgModule({
declarations: [Ng2Component],
... | {
"end_byte": 60135,
"start_byte": 51479,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/testability_spec.ts_0_4461 | /**
* @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 {destroyPlatform, NgModule, Testability, NgZone} from '@angular/core';
import {fakeAsync, flush, tick} from '... | {
"end_byte": 4461,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/testability_spec.ts"
} |
angular/packages/upgrade/static/test/integration/change_detection_spec.ts_0_8061 | /**
* @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,
Directive,
ElementRef,
Injector,
Input,
NgModule,
NgZone,
Sim... | {
"end_byte": 8061,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/change_detection_spec.ts"
} |
angular/packages/upgrade/static/test/integration/content_projection_spec.ts_0_6198 | /**
* @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,
Directive,
ElementRef,
Injector,
Input,
NgModule,
} from '@angula... | {
"end_byte": 6198,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/content_projection_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_component_spec.ts_0_1051 | /**
* @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 {
ChangeDetectionStrategy,
Compiler,
Component,
destroyPlatform,
Directive,
ElementRef,
EventEm... | {
"end_byte": 1051,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_component_spec.ts_1053_8511 | withEachNg1Version(() => {
describe('downgrade ng2 component', () => {
beforeEach(() => destroyPlatform());
afterEach(() => destroyPlatform());
it('should bind properties, events', waitForAsync(() => {
const ng1Module = angular.module_('ng1', []).run(($rootScope: angular.IScope) => {
$rootS... | {
"end_byte": 8511,
"start_byte": 1053,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_component_spec.ts_8517_15720 | t('should support two-way binding and event listener', waitForAsync(() => {
const listenerSpy = jasmine.createSpy('$rootScope.listener');
const ng1Module = angular.module_('ng1', []).run(($rootScope: angular.IScope) => {
$rootScope['value'] = 'world';
$rootScope['listener'] = listenerSpy;
... | {
"end_byte": 15720,
"start_byte": 8517,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_component_spec.ts_15726_22523 | t('should initialize inputs in time for `ngOnChanges`', waitForAsync(() => {
@Component({
selector: 'ng2',
template: ` ngOnChangesCount: {{ ngOnChangesCount }} | firstChangesCount:
{{ firstChangesCount }} | initialValue: {{ initialValue }}`,
standalone: false,
})
clas... | {
"end_byte": 22523,
"start_byte": 15726,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_component_spec.ts_22529_31252 | t('should properly run cleanup with multiple levels of nesting', waitForAsync(() => {
let destroyed = false;
@Component({
selector: 'ng2-outer',
template: '<div *ngIf="!destroyIt"><ng1></ng1></div>',
standalone: false,
})
class Ng2OuterComponent {
@Input() destro... | {
"end_byte": 31252,
"start_byte": 22529,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/downgrade_component_spec.ts_31258_35907 | t('should be compiled synchronously, if possible', waitForAsync(() => {
@Component({
selector: 'ng2A',
template: '<ng-content></ng-content>',
standalone: false,
})
class Ng2ComponentA {}
@Component({
selector: 'ng2B',
template: "{{ 'Ng2 template' }}",
... | {
"end_byte": 35907,
"start_byte": 31258,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/downgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_0_8859 | /**
* @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,
Directive,
ElementRef,
EventEmitter,
Inject,
Injector,
Input,
... | {
"end_byte": 8859,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_8867_17171 | it('should pass $element to `templateUrl` function and not $attrs', waitForAsync(() => {
// Define `ng1Component`
const ng1Component: angular.IComponent = {
templateUrl: ($attrs: angular.IAttributes, $element: angular.IAugmentedJQuery) => {
expect($attrs).toBeUndefined();
... | {
"end_byte": 17171,
"start_byte": 8867,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_17177_24964 | describe('bindings', () => {
it('should support `@` bindings', fakeAsync(() => {
let ng2ComponentInstance: Ng2Component;
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template: 'Inside: {{ $ctrl.inputA }}, {{ $ctrl.inputB }}',
bindings: {inputA: '... | {
"end_byte": 24964,
"start_byte": 17177,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_24972_30560 | it('should support `&` bindings', fakeAsync(() => {
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template: 'Inside: -',
bindings: {outputA: '&outputAttrA', outputB: '&'},
};
// Define `Ng1ComponentFacade`
@Directive({
selector... | {
"end_byte": 30560,
"start_byte": 24972,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_30568_36856 | it('should bind optional properties', fakeAsync(() => {
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template: 'Inside: {{ $ctrl.inputA.value }}, {{ $ctrl.inputB }}',
bindings: {inputA: '=?inputAttrA', inputB: '=?', outputA: '&?outputAttrA', outputB: '&?'},
... | {
"end_byte": 36856,
"start_byte": 30568,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_36862_38629 | describe('compiling', () => {
it('should compile the ng1 template in the correct DOM context', waitForAsync(() => {
let grandParentNodeName: string;
// Define `ng1Component`
const ng1ComponentA: angular.IComponent = {template: 'ng1A(<ng1-b></ng1-b>)'};
const ng1DirectiveB: angular... | {
"end_byte": 38629,
"start_byte": 36862,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_38635_46920 | describe('linking', () => {
it('should run the pre-linking after instantiating the controller', waitForAsync(() => {
const log: string[] = [];
// Define `ng1Directive`
const ng1Directive: angular.IDirective = {
template: '',
link: {pre: () => log.push('ng1-pre')},
... | {
"end_byte": 46920,
"start_byte": 38635,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_46926_55138 | describe('controller', () => {
it('should support `controllerAs`', waitForAsync(() => {
// Define `ng1Directive`
const ng1Directive: angular.IDirective = {
template: '{{ vm.scope }}; {{ vm.isClass }}; {{ vm.hasElement }}; {{ vm.isPublished() }}',
scope: true,
controll... | {
"end_byte": 55138,
"start_byte": 46926,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_55146_59124 | it('should insert the compiled content before instantiating the controller', waitForAsync(() => {
let compiledContent: string;
let getCurrentContent: () => string;
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template: 'Hello, {{ $ctrl.name }}!',
... | {
"end_byte": 59124,
"start_byte": 55146,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_59132_66718 | describe('in controller', () => {
it('should be available to children', waitForAsync(() => {
// Define `ng1Component`
const ng1ComponentA: angular.IComponent = {
template: '<ng1-b></ng1-b>',
controller: class {
value = 'ng1A';
},
};... | {
"end_byte": 66718,
"start_byte": 59132,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_66728_74213 | it('should assign resolved values to the controller instance (if `require` is not object)', waitForAsync(() => {
// Define `ng1Component`
const ng1ComponentA: angular.IComponent = {
template: 'ng1A(<div><ng2></ng2></div>)',
controller: class {
value = 'A';
... | {
"end_byte": 74213,
"start_byte": 66728,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_74223_76530 | it('should use the key as name if the required controller name is omitted', waitForAsync(() => {
// Define `ng1Component`
const ng1ComponentA: angular.IComponent = {
template: '<ng1-b></ng1-b>',
controller: class {
value = 'A';
},
};
... | {
"end_byte": 76530,
"start_byte": 74223,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_76536_83465 | describe('transclusion', () => {
it('should support single-slot transclusion', waitForAsync(() => {
let ng2ComponentAInstance: Ng2ComponentA;
let ng2ComponentBInstance: Ng2ComponentB;
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template: 'ng1(<div... | {
"end_byte": 83465,
"start_byte": 76536,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_83473_90855 | it('should support default slot (with fallback content)', waitForAsync(() => {
let ng1ControllerInstances: any[] = [];
let ng2ComponentInstance: Ng2Component;
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template: 'ng1(default(<div ng-transclude="">fallb... | {
"end_byte": 90855,
"start_byte": 83473,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_90863_93475 | it('should support structural directives in transcluded content', waitForAsync(() => {
let ng2ComponentInstance: Ng2Component;
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template:
'ng1(x(<div ng-transclude="slotX"></div>) | default(<div ng-transclu... | {
"end_byte": 93475,
"start_byte": 90863,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_93481_99663 | describe('lifecycle hooks', () => {
it('should call `$onChanges()` on binding destination (prototype)', fakeAsync(() => {
const scopeOnChanges = jasmine.createSpy('scopeOnChanges');
const controllerOnChangesA = jasmine.createSpy('controllerOnChangesA');
const controllerOnChangesB = jasmine... | {
"end_byte": 99663,
"start_byte": 93481,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_99671_105842 | it('should call `$onChanges()` on binding destination (instance)', fakeAsync(() => {
const scopeOnChangesA = jasmine.createSpy('scopeOnChangesA');
const scopeOnChangesB = jasmine.createSpy('scopeOnChangesB');
const controllerOnChangesA = jasmine.createSpy('controllerOnChangesA');
const c... | {
"end_byte": 105842,
"start_byte": 99671,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_105850_113412 | it('should call `$onInit()` on controller', waitForAsync(() => {
// Define `ng1Directive`
const ng1DirectiveA: angular.IDirective = {
template: 'Called: {{ called }}',
bindToController: false,
controller: class {
constructor(private $scope: angular.IScope) {
... | {
"end_byte": 113412,
"start_byte": 105850,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_113420_121763 | it('should not call `$postLink()` on scope', waitForAsync(() => {
// Define `ng1Directive`
const ng1DirectiveA: angular.IDirective = {
template: 'Called: {{ called }}',
bindToController: false,
controller: class {
constructor($scope: angular.IScope) {
... | {
"end_byte": 121763,
"start_byte": 113420,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_121771_128917 | it('should call `$onDestroy()` on controller', waitForAsync(() => {
const controllerOnDestroyA = jasmine.createSpy('controllerOnDestroyA');
const controllerOnDestroyB = jasmine.createSpy('controllerOnDestroyB');
// Define `ng1Directive`
const ng1DirectiveA: angular.IDirective = {
... | {
"end_byte": 128917,
"start_byte": 121771,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_128925_131150 | it('should be called in order `$onChanges()` > `$onInit()` > `$doCheck()` > `$postLink()`', waitForAsync(() => {
// Define `ng1Component`
const ng1Component: angular.IComponent = {
// `$doCheck()` will keep getting called as long as the interpolated value keeps
// changing (by append... | {
"end_byte": 131150,
"start_byte": 128925,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_131156_138305 | describe('destroying the upgraded component', () => {
it('should destroy `$componentScope`', waitForAsync(() => {
const scopeDestroyListener = jasmine.createSpy('scopeDestroyListener');
let ng2ComponentAInstance: Ng2ComponentA;
// Define `ng1Component`
const ng1Component: angular.... | {
"end_byte": 138305,
"start_byte": 131156,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_138313_145184 | it('should clear dom listeners on `$element` and descendants`', waitForAsync(() => {
const elementClickListener = jasmine.createSpy('elementClickListener');
const descendantClickListener = jasmine.createSpy('descendantClickListener');
let ng1DescendantElement: angular.IAugmentedJQuery;
l... | {
"end_byte": 145184,
"start_byte": 138313,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_145190_152100 | it('should support ng2 > ng1 > ng2 (with inputs/outputs)', fakeAsync(() => {
let ng2ComponentAInstance: Ng2ComponentA;
let ng2ComponentBInstance: Ng2ComponentB;
let ng1ControllerXInstance: Ng1ControllerX;
// Define `ng1Component`
class Ng1ControllerX {
ng1XInputA: string = '';
... | {
"end_byte": 152100,
"start_byte": 145190,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_component_spec.ts_152106_156003 | it('should support ng2 > ng1 > ng2 > ng1 (with `require`)', waitForAsync(() => {
// Define `ng1Component`
const ng1ComponentA: angular.IComponent = {
template: 'ng1A(<ng2-b></ng2-b>)',
controller: class {
value = 'ng1A';
},
};
const ng1ComponentB: angular.IComp... | {
"end_byte": 156003,
"start_byte": 152106,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_component_spec.ts"
} |
angular/packages/upgrade/static/test/integration/injection_spec.ts_0_4476 | /**
* @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 {destroyPlatform, InjectionToken, Injector, NgModule} from '@angular/core';
import {waitForAsync} from '@angu... | {
"end_byte": 4476,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/injection_spec.ts"
} |
angular/packages/upgrade/static/test/integration/upgrade_module_spec.ts_0_5025 | /**
* @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 {destroyPlatform, NgModule, NgZone} from '@angular/core';
import {BrowserModule} from '@angular/platform-brow... | {
"end_byte": 5025,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/upgrade_module_spec.ts"
} |
angular/packages/upgrade/static/test/integration/examples_spec.ts_0_3322 | /**
* @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,
Directive,
ElementRef,
Injector,
Input,
NgModule,
} from '@angula... | {
"end_byte": 3322,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/test/integration/examples_spec.ts"
} |
angular/packages/upgrade/static/testing/PACKAGE.md_0_69 | Supplies testing functions for the AngularJS-to-Angular upgrade path. | {
"end_byte": 69,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/PACKAGE.md"
} |
angular/packages/upgrade/static/testing/BUILD.bazel_0_745 | load("//tools:defaults.bzl", "generate_api_docs", "ng_module")
package(default_visibility = ["//visibility:public"])
exports_files(["package.json"])
ng_module(
name = "testing",
srcs = glob(
[
"*.ts",
"src/*.ts",
],
),
deps = [
"//packages/core/testing"... | {
"end_byte": 745,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/BUILD.bazel"
} |
angular/packages/upgrade/static/testing/index.ts_0_234 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export * from './public_api';
| {
"end_byte": 234,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/index.ts"
} |
angular/packages/upgrade/static/testing/public_api.ts_0_368 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export {createAngularTestingModule} from './src/create_angular_testing_module';
export {createAngularJSTestingModule... | {
"end_byte": 368,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/public_api.ts"
} |
angular/packages/upgrade/static/testing/test/mocks.ts_0_1979 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Inject, Injectable, NgModule} from '@angular/core';
import {downgradeInjectable} from '@angular/upgrade/stat... | {
"end_byte": 1979,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/test/mocks.ts"
} |
angular/packages/upgrade/static/testing/test/create_angularjs_testing_module_spec.ts_0_1419 | /**
* @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 {getAngularJSGlobal} from '../../../src/common/src/angular1';
import {withEachNg1Version} from '../../../src/... | {
"end_byte": 1419,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/test/create_angularjs_testing_module_spec.ts"
} |
angular/packages/upgrade/static/testing/test/create_angular_testing_module_spec.ts_0_2001 | /**
* @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 {Injector} from '@angular/core';
import {TestBed} from '@angular/core/testing';
import {$INJECTOR} from '../... | {
"end_byte": 2001,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/test/create_angular_testing_module_spec.ts"
} |
angular/packages/upgrade/static/testing/test/BUILD.bazel_0_892 | load("//tools:defaults.bzl", "karma_web_test_suite", "ts_library")
load("//tools/circular_dependency_test:index.bzl", "circular_dependency_test")
package(default_visibility = ["//visibility:public"])
circular_dependency_test(
name = "circular_deps_test",
entry_point = "angular/packages/upgrade/static/testing/... | {
"end_byte": 892,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/test/BUILD.bazel"
} |
angular/packages/upgrade/static/testing/src/create_angularjs_testing_module.ts_0_3629 | /**
* @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 {Injector} from '@angular/core';
import {TestBed} from '@angular/core/testing';
import {ɵangular1 as ng, ɵcon... | {
"end_byte": 3629,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/src/create_angularjs_testing_module.ts"
} |
angular/packages/upgrade/static/testing/src/create_angular_testing_module.ts_0_3738 | /**
* @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 {Injector, NgModule, Type} from '@angular/core';
import {ɵangular1 as angular, ɵconstants} from '@angular/upg... | {
"end_byte": 3738,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/testing/src/create_angular_testing_module.ts"
} |
angular/packages/upgrade/static/src/upgrade_module.ts_0_6580 | /**
* @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 {Injector, NgModule, NgZone, PlatformRef, Testability} from '@angular/core';
import {ɵangular1, ɵconstants, ... | {
"end_byte": 6580,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/upgrade_module.ts"
} |
angular/packages/upgrade/static/src/upgrade_module.ts_6581_14713 | Module({providers: [angular1Providers]})
export class UpgradeModule {
/**
* The AngularJS `$injector` for the upgrade application.
*/
public $injector: any /*angular.IInjectorService*/;
/** The Angular Injector **/
public injector: Injector;
constructor(
/** The root `Injector` for the upgrade appl... | {
"end_byte": 14713,
"start_byte": 6581,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/upgrade_module.ts"
} |
angular/packages/upgrade/static/src/downgrade_module.ts_0_6602 | /**
* @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 {
Injector,
NgModuleFactory,
NgModuleRef,
PlatformRef,
StaticProvider,
Type,
} from '@angular/cor... | {
"end_byte": 6602,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/downgrade_module.ts"
} |
angular/packages/upgrade/static/src/downgrade_module.ts_6603_12720 |
* @description
*
* A helper function for creating an AngularJS module that can bootstrap an Angular module
* "on-demand" (possibly lazily) when a {@link downgradeComponent downgraded component} needs to be
* instantiated.
*
* *Part of the [upgrade/static](api?query=upgrade/static) library for hybrid upgrade app... | {
"end_byte": 12720,
"start_byte": 6603,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/downgrade_module.ts"
} |
angular/packages/upgrade/static/src/downgrade_module.ts_12721_18595 |
* @description
*
* A helper function for creating an AngularJS module that can bootstrap an Angular module
* "on-demand" (possibly lazily) when a {@link downgradeComponent downgraded component} needs to be
* instantiated.
*
* *Part of the [upgrade/static](api?query=upgrade/static) library for hybrid upgrade app... | {
"end_byte": 18595,
"start_byte": 12721,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/downgrade_module.ts"
} |
angular/packages/upgrade/static/src/downgrade_module.ts_18596_21549 | ort function downgradeModule<T>(
moduleOrBootstrapFn:
| Type<T>
| NgModuleFactory<T>
| ((extraProviders: StaticProvider[]) => Promise<NgModuleRef<T>>),
): string {
const lazyModuleName = `${ɵconstants.UPGRADE_MODULE_NAME}.lazy${++moduleUid}`;
const lazyModuleRefKey = `${ɵconstants.LAZY_MODULE_REF}${la... | {
"end_byte": 21549,
"start_byte": 18596,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/downgrade_module.ts"
} |
angular/packages/upgrade/static/src/util.ts_0_942 | /**
* @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 {
Injector,
ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR,
} from '@ang... | {
"end_byte": 942,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/util.ts"
} |
angular/packages/upgrade/static/src/upgrade_component.ts_0_2217 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
Directive,
DoCheck,
ElementRef,
EventEmitter,
Injector,
OnChanges,
OnDestroy,
OnInit,
Sim... | {
"end_byte": 2217,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/upgrade_component.ts"
} |
angular/packages/upgrade/static/src/upgrade_component.ts_2218_10917 | ective()
export class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
private helper: ɵupgradeHelper.UpgradeHelper;
private $element: ɵangular1.IAugmentedJQuery;
private $componentScope: ɵangular1.IScope;
private directive: ɵangular1.IDirective;
private bindings: Bindings;
private con... | {
"end_byte": 10917,
"start_byte": 2218,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/upgrade_component.ts"
} |
angular/packages/upgrade/static/src/angular1_providers.ts_0_1919 | /**
* @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 {IInjectorService} from '../../src/common/src/angular1';
// We have to do a little dance to get the ng1 inje... | {
"end_byte": 1919,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/static/src/angular1_providers.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_0_1034 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
ChangeDetectorRef,
Component,
destroyPlatform,
EventEmitter,
forwardRef,
Input,
NgModule,
N... | {
"end_byte": 1034,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_1036_8864 | withEachNg1Version(() => {
describe('adapter: ng1 to ng2', () => {
beforeEach(() => destroyPlatform());
afterEach(() => destroyPlatform());
describe('(basic use)', () => {
it('should have AngularJS loaded', () =>
expect(angular.getAngularJSGlobal().version.major).toBe(1));
it('should... | {
"end_byte": 8864,
"start_byte": 1036,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_8870_15287 | describe('change-detection', () => {
it('should not break if a $digest is already in progress', waitForAsync(() => {
@Component({
selector: 'my-app',
template: '',
standalone: false,
})
class AppComponent {}
@NgModule({declarations: [AppComponent], im... | {
"end_byte": 15287,
"start_byte": 8870,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_15293_22972 | describe('downgrade ng2 component', () => {
it('should allow non-element selectors for downgraded components', waitForAsync(() => {
@Component({
selector: '[itWorks]',
template: 'It works',
standalone: false,
})
class WorksComponent {}
@NgModule({decl... | {
"end_byte": 22972,
"start_byte": 15293,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_22980_31476 | it('should initialize inputs in time for `ngOnChanges`', waitForAsync(() => {
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
@Component({
selector: 'ng2',
template: ` ngOnChangesCount: {{ ngOnChangesCount }} | firstChangesCount:
{{ first... | {
"end_byte": 31476,
"start_byte": 22980,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_31484_36214 | it('should fallback to the root ng2.injector when compiled outside the dom', waitForAsync(() => {
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
const ng1Module = angular.module_('ng1', []);
ng1Module.directive('ng1', [
'$compile',
($compile... | {
"end_byte": 36214,
"start_byte": 31484,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_36215_44414 | () => {
it('should support `@` bindings', fakeAsync(() => {
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
let ng2ComponentInstance: Ng2Component;
// Define `ng1Component`
const ng1Component: angular.IComponent = {
template: 'Inside: {{ ... | {
"end_byte": 44414,
"start_byte": 36215,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_44422_51608 | it('should bind properties, events', waitForAsync(() => {
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
const ng1Module = angular.module_('ng1', []);
const ng1 = () => {
return {
template: 'Hello {{fullName}}; A: {{modelA}}; B: {{modelB}}... | {
"end_byte": 51608,
"start_byte": 44422,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_51616_59968 | it('should support templateUrl fetched from $httpBackend', waitForAsync(() => {
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
const ng1Module = angular.module_('ng1', []);
ng1Module.value(
'$httpBackend',
(method: string, url: string, post: ... | {
"end_byte": 59968,
"start_byte": 51616,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_59976_64510 | it('should support bindToController with bindings', waitForAsync(() => {
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
const ng1Module = angular.module_('ng1', []);
const ng1 = () => {
return {
scope: {},
bindToController: {ti... | {
"end_byte": 64510,
"start_byte": 59976,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
angular/packages/upgrade/src/dynamic/test/upgrade_spec.ts_64518_72288 | describe('with life-cycle hooks', () => {
it('should call `$onInit()` on controller', waitForAsync(() => {
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
const $onInitSpyA = jasmine.createSpy('$onInitA');
const $onInitSpyB = jasmine.createSpy('$onI... | {
"end_byte": 72288,
"start_byte": 64518,
"url": "https://github.com/angular/angular/blob/main/packages/upgrade/src/dynamic/test/upgrade_spec.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.