refactor(ivy): use ɵɵ instead of Δ for now (#29850)
The `Δ` caused issue with other infrastructure, and we are temporarily changing it to `ɵɵ`. This commit also patches ts_api_guardian_test and AIO to understand `ɵɵ`. PR Close #29850
This commit is contained in:
parent
54058ba3a7
commit
b0578061ce
@ -74,7 +74,7 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
|
|||||||
|
|
||||||
// API files are typescript
|
// API files are typescript
|
||||||
readTypeScriptModules.basePath = API_SOURCE_PATH;
|
readTypeScriptModules.basePath = API_SOURCE_PATH;
|
||||||
readTypeScriptModules.ignoreExportsMatching = [/^[_Δ]|^VERSION$/];
|
readTypeScriptModules.ignoreExportsMatching = [/^_|^ɵɵ|^VERSION$/];
|
||||||
readTypeScriptModules.hidePrivateMembers = true;
|
readTypeScriptModules.hidePrivateMembers = true;
|
||||||
|
|
||||||
// NOTE: This list should be in sync with tools/public_api_guard/BUILD.bazel
|
// NOTE: This list should be in sync with tools/public_api_guard/BUILD.bazel
|
||||||
|
@ -37,7 +37,7 @@ We explicitly don't consider the following to be our public API surface:
|
|||||||
|
|
||||||
- any file/import paths within our package except for the `/`, `/testing` and `/bundles/*` and other documented package entry-points.
|
- any file/import paths within our package except for the `/`, `/testing` and `/bundles/*` and other documented package entry-points.
|
||||||
- constructors of injectable classes (services and directives) - please use DI to obtain instances of these classes
|
- constructors of injectable classes (services and directives) - please use DI to obtain instances of these classes
|
||||||
- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and [greek delta](https://en.wikipedia.org/wiki/Delta_(letter)) (`Δ`).
|
- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and [double barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵɵ`).
|
||||||
- extending any of our classes unless the support for this is specifically documented in the API docs
|
- extending any of our classes unless the support for this is specifically documented in the API docs
|
||||||
- the contents and API surface of the code generated by Angular's compiler (with one notable exception: the existence and name of `NgModuleFactory` instances exported from generated code is guaranteed)
|
- the contents and API surface of the code generated by Angular's compiler (with one notable exception: the existence and name of `NgModuleFactory` instances exported from generated code is guaranteed)
|
||||||
|
|
||||||
|
@ -40,25 +40,25 @@ if [[ $? != 0 ]]; then exit 1; fi
|
|||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
|
|
||||||
# Did it compile @angular/core/ApplicationModule correctly?
|
# Did it compile @angular/core/ApplicationModule correctly?
|
||||||
grep "ApplicationModule.ngModuleDef = ΔdefineNgModule" node_modules/@angular/core/fesm2015/core.js
|
grep "ApplicationModule.ngModuleDef = ɵɵdefineNgModule" node_modules/@angular/core/fesm2015/core.js
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
grep "ApplicationModule.ngModuleDef = ΔdefineNgModule" node_modules/@angular/core/fesm5/core.js
|
grep "ApplicationModule.ngModuleDef = ɵɵdefineNgModule" node_modules/@angular/core/fesm5/core.js
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
grep "ApplicationModule.ngModuleDef = ɵngcc0.ΔdefineNgModule" node_modules/@angular/core/esm2015/src/application_module.js
|
grep "ApplicationModule.ngModuleDef = ɵngcc0.ɵɵdefineNgModule" node_modules/@angular/core/esm2015/src/application_module.js
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
grep "ApplicationModule.ngModuleDef = ɵngcc0.ΔdefineNgModule" node_modules/@angular/core/esm5/src/application_module.js
|
grep "ApplicationModule.ngModuleDef = ɵngcc0.ɵɵdefineNgModule" node_modules/@angular/core/esm5/src/application_module.js
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
|
|
||||||
# Did it transform @angular/core typing files correctly?
|
# Did it transform @angular/core typing files correctly?
|
||||||
grep "import [*] as ɵngcc0 from './src/r3_symbols';" node_modules/@angular/core/core.d.ts
|
grep "import [*] as ɵngcc0 from './src/r3_symbols';" node_modules/@angular/core/core.d.ts
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
grep "static ngInjectorDef: ɵngcc0.ΔInjectorDef<ApplicationModule>;" node_modules/@angular/core/core.d.ts
|
grep "static ngInjectorDef: ɵngcc0.ɵɵInjectorDef<ApplicationModule>;" node_modules/@angular/core/core.d.ts
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
|
|
||||||
# Did it generate a base factory call for synthesized constructors correctly?
|
# Did it generate a base factory call for synthesized constructors correctly?
|
||||||
grep "const ɵMatTable_BaseFactory = ɵngcc0.ΔgetInheritedFactory(MatTable);" node_modules/@angular/material/esm2015/table.js
|
grep "const ɵMatTable_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MatTable);" node_modules/@angular/material/esm2015/table.js
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
grep "const ɵMatTable_BaseFactory = ɵngcc0.ΔgetInheritedFactory(MatTable);" node_modules/@angular/material/esm5/table.es5.js
|
grep "const ɵMatTable_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MatTable);" node_modules/@angular/material/esm5/table.es5.js
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
|
|
||||||
# Can it be safely run again (as a noop)?
|
# Can it be safely run again (as a noop)?
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {ɵRenderFlags, ɵrenderComponent as renderComponent, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, ΔdefineComponent, ΔelementEnd, ΔelementStart, ΔelementStyleProp, ΔelementStyling, ΔembeddedViewEnd, ΔembeddedViewStart, Δinterpolation1, Δtext, ΔtextBinding} from '@angular/core';
|
import {ɵRenderFlags, ɵrenderComponent as renderComponent, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵtext, ɵɵtextBinding} from '@angular/core';
|
||||||
|
|
||||||
import {bindAction, profile} from '../../util';
|
import {bindAction, profile} from '../../util';
|
||||||
import {createDom, destroyDom, detectChanges} from '../render3/tree';
|
import {createDom, destroyDom, detectChanges} from '../render3/tree';
|
||||||
@ -18,7 +18,7 @@ export class TreeFunction {
|
|||||||
data: TreeNode = emptyTree;
|
data: TreeNode = emptyTree;
|
||||||
|
|
||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ngComponentDef = ΔdefineComponent({
|
static ngComponentDef = ɵɵdefineComponent({
|
||||||
type: TreeFunction,
|
type: TreeFunction,
|
||||||
selectors: [['tree']],
|
selectors: [['tree']],
|
||||||
consts: 5,
|
consts: 5,
|
||||||
@ -35,38 +35,38 @@ export class TreeFunction {
|
|||||||
const c1 = ['background-color'];
|
const c1 = ['background-color'];
|
||||||
export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) {
|
export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) {
|
||||||
if (rf & ɵRenderFlags.Create) {
|
if (rf & ɵRenderFlags.Create) {
|
||||||
ΔelementStart(0, 'tree');
|
ɵɵelementStart(0, 'tree');
|
||||||
{
|
{
|
||||||
ΔelementStart(1, 'span');
|
ɵɵelementStart(1, 'span');
|
||||||
ΔelementStyling(null, c1);
|
ɵɵelementStyling(null, c1);
|
||||||
{ Δtext(2); }
|
{ ɵɵtext(2); }
|
||||||
ΔelementEnd();
|
ɵɵelementEnd();
|
||||||
Δcontainer(3);
|
ɵɵcontainer(3);
|
||||||
Δcontainer(4);
|
ɵɵcontainer(4);
|
||||||
}
|
}
|
||||||
ΔelementEnd();
|
ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & ɵRenderFlags.Update) {
|
if (rf & ɵRenderFlags.Update) {
|
||||||
ΔelementStyleProp(1, 0, ctx.depth % 2 ? '' : 'grey');
|
ɵɵelementStyleProp(1, 0, ctx.depth % 2 ? '' : 'grey');
|
||||||
ΔtextBinding(2, Δinterpolation1(' ', ctx.value, ' '));
|
ɵɵtextBinding(2, ɵɵinterpolation1(' ', ctx.value, ' '));
|
||||||
ΔcontainerRefreshStart(3);
|
ɵɵcontainerRefreshStart(3);
|
||||||
{
|
{
|
||||||
if (ctx.left != null) {
|
if (ctx.left != null) {
|
||||||
let rf0 = ΔembeddedViewStart(0, 5, 1);
|
let rf0 = ɵɵembeddedViewStart(0, 5, 1);
|
||||||
{ TreeTpl(rf0, ctx.left); }
|
{ TreeTpl(rf0, ctx.left); }
|
||||||
ΔembeddedViewEnd();
|
ɵɵembeddedViewEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ΔcontainerRefreshEnd();
|
ɵɵcontainerRefreshEnd();
|
||||||
ΔcontainerRefreshStart(4);
|
ɵɵcontainerRefreshStart(4);
|
||||||
{
|
{
|
||||||
if (ctx.right != null) {
|
if (ctx.right != null) {
|
||||||
let rf0 = ΔembeddedViewStart(0, 5, 1);
|
let rf0 = ɵɵembeddedViewStart(0, 5, 1);
|
||||||
{ TreeTpl(rf0, ctx.right); }
|
{ TreeTpl(rf0, ctx.right); }
|
||||||
ΔembeddedViewEnd();
|
ɵɵembeddedViewEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ΔcontainerRefreshEnd();
|
ɵɵcontainerRefreshEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Use of this source code is governed by an MIT-style license that can be
|
* Use of this source code is governed by an MIT-style license that can be
|
||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
import {Directive, DoCheck, Input, ɵRenderFlags, ΔdefineDirective, ΔelementHostStyling, ΔelementHostStylingApply, ΔelementHostStylingMap} from '@angular/core';
|
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementHostStylingMap} from '@angular/core';
|
||||||
|
|
||||||
import {NgClassImpl, NgClassImplProvider} from './ng_class_impl';
|
import {NgClassImpl, NgClassImplProvider} from './ng_class_impl';
|
||||||
|
|
||||||
@ -29,17 +29,17 @@ export const ngClassDirectiveDef__PRE_R3__ = undefined;
|
|||||||
// used when the VE is not present (note the directive will
|
// used when the VE is not present (note the directive will
|
||||||
// never be instantiated normally because it is apart of a
|
// never be instantiated normally because it is apart of a
|
||||||
// base class)
|
// base class)
|
||||||
export const ngClassDirectiveDef__POST_R3__ = ΔdefineDirective({
|
export const ngClassDirectiveDef__POST_R3__ = ɵɵdefineDirective({
|
||||||
type: function() {} as any,
|
type: function() {} as any,
|
||||||
selectors: null as any,
|
selectors: null as any,
|
||||||
factory: () => {},
|
factory: () => {},
|
||||||
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
|
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
|
||||||
if (rf & ɵRenderFlags.Create) {
|
if (rf & ɵRenderFlags.Create) {
|
||||||
ΔelementHostStyling();
|
ɵɵelementHostStyling();
|
||||||
}
|
}
|
||||||
if (rf & ɵRenderFlags.Update) {
|
if (rf & ɵRenderFlags.Update) {
|
||||||
ΔelementHostStylingMap(ctx.getValue());
|
ɵɵelementHostStylingMap(ctx.getValue());
|
||||||
ΔelementHostStylingApply();
|
ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Use of this source code is governed by an MIT-style license that can be
|
* Use of this source code is governed by an MIT-style license that can be
|
||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
import {Directive, DoCheck, Input, ɵRenderFlags, ΔdefineDirective, ΔelementHostStyling, ΔelementHostStylingApply, ΔelementHostStylingMap} from '@angular/core';
|
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostStyling, ɵɵelementHostStylingApply, ɵɵelementHostStylingMap} from '@angular/core';
|
||||||
|
|
||||||
import {NgStyleImpl, NgStyleImplProvider} from './ng_style_impl';
|
import {NgStyleImpl, NgStyleImplProvider} from './ng_style_impl';
|
||||||
|
|
||||||
@ -29,17 +29,17 @@ export const ngStyleDirectiveDef__PRE_R3__ = undefined;
|
|||||||
// used when the VE is not present (note the directive will
|
// used when the VE is not present (note the directive will
|
||||||
// never be instantiated normally because it is apart of a
|
// never be instantiated normally because it is apart of a
|
||||||
// base class)
|
// base class)
|
||||||
export const ngStyleDirectiveDef__POST_R3__ = ΔdefineDirective({
|
export const ngStyleDirectiveDef__POST_R3__ = ɵɵdefineDirective({
|
||||||
type: function() {} as any,
|
type: function() {} as any,
|
||||||
selectors: null as any,
|
selectors: null as any,
|
||||||
factory: () => {},
|
factory: () => {},
|
||||||
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
|
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
|
||||||
if (rf & ɵRenderFlags.Create) {
|
if (rf & ɵRenderFlags.Create) {
|
||||||
ΔelementHostStyling();
|
ɵɵelementHostStyling();
|
||||||
}
|
}
|
||||||
if (rf & ɵRenderFlags.Update) {
|
if (rf & ɵRenderFlags.Update) {
|
||||||
ΔelementHostStylingMap(null, ctx.getValue());
|
ɵɵelementHostStylingMap(null, ctx.getValue());
|
||||||
ΔelementHostStylingApply();
|
ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {ErrorHandler, ΔdefineInjectable, Δinject} from '@angular/core';
|
import {ErrorHandler, ɵɵdefineInjectable, ɵɵinject} from '@angular/core';
|
||||||
|
|
||||||
import {DOCUMENT} from './dom_tokens';
|
import {DOCUMENT} from './dom_tokens';
|
||||||
|
|
||||||
@ -21,9 +21,9 @@ export abstract class ViewportScroller {
|
|||||||
// De-sugared tree-shakable injection
|
// De-sugared tree-shakable injection
|
||||||
// See #23917
|
// See #23917
|
||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ngInjectableDef = ΔdefineInjectable({
|
static ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
factory: () => new BrowserViewportScroller(Δinject(DOCUMENT), window, Δinject(ErrorHandler))
|
factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window, ɵɵinject(ErrorHandler))
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -152,11 +152,11 @@ describe('Renderer', () => {
|
|||||||
const addDefinitionsSpy = renderer.addDefinitions as jasmine.Spy;
|
const addDefinitionsSpy = renderer.addDefinitions as jasmine.Spy;
|
||||||
expect(addDefinitionsSpy.calls.first().args[2])
|
expect(addDefinitionsSpy.calls.first().args[2])
|
||||||
.toEqual(
|
.toEqual(
|
||||||
`A.ngComponentDef = ɵngcc0.ΔdefineComponent({ type: A, selectors: [["a"]], factory: function A_Factory(t) { return new (t || A)(); }, consts: 1, vars: 1, template: function A_Template(rf, ctx) { if (rf & 1) {
|
`A.ngComponentDef = ɵngcc0.ɵɵdefineComponent({ type: A, selectors: [["a"]], factory: function A_Factory(t) { return new (t || A)(); }, consts: 1, vars: 1, template: function A_Template(rf, ctx) { if (rf & 1) {
|
||||||
ɵngcc0.Δtext(0);
|
ɵngcc0.ɵɵtext(0);
|
||||||
} if (rf & 2) {
|
} if (rf & 2) {
|
||||||
ɵngcc0.Δselect(0);
|
ɵngcc0.ɵɵselect(0);
|
||||||
ɵngcc0.ΔtextBinding(0, ɵngcc0.Δinterpolation1("", ctx.person.name, ""));
|
ɵngcc0.ɵɵtextBinding(0, ɵngcc0.ɵɵinterpolation1("", ctx.person.name, ""));
|
||||||
} }, encapsulation: 2 });
|
} }, encapsulation: 2 });
|
||||||
/*@__PURE__*/ ɵngcc0.ɵsetClassMetadata(A, [{
|
/*@__PURE__*/ ɵngcc0.ɵsetClassMetadata(A, [{
|
||||||
type: Component,
|
type: Component,
|
||||||
@ -197,7 +197,7 @@ describe('Renderer', () => {
|
|||||||
}));
|
}));
|
||||||
expect(addDefinitionsSpy.calls.first().args[2])
|
expect(addDefinitionsSpy.calls.first().args[2])
|
||||||
.toEqual(
|
.toEqual(
|
||||||
`A.ngDirectiveDef = ɵngcc0.ΔdefineDirective({ type: A, selectors: [["", "a", ""]], factory: function A_Factory(t) { return new (t || A)(); } });
|
`A.ngDirectiveDef = ɵngcc0.ɵɵdefineDirective({ type: A, selectors: [["", "a", ""]], factory: function A_Factory(t) { return new (t || A)(); } });
|
||||||
/*@__PURE__*/ ɵngcc0.ɵsetClassMetadata(A, [{
|
/*@__PURE__*/ ɵngcc0.ɵsetClassMetadata(A, [{
|
||||||
type: Directive,
|
type: Directive,
|
||||||
args: [{ selector: '[a]' }]
|
args: [{ selector: '[a]' }]
|
||||||
@ -331,7 +331,7 @@ describe('Renderer', () => {
|
|||||||
const typingsFile = result.find(f => f.path === '/typings/file.d.ts') !;
|
const typingsFile = result.find(f => f.path === '/typings/file.d.ts') !;
|
||||||
expect(typingsFile.contents)
|
expect(typingsFile.contents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'foo(x: number): number;\n static ngDirectiveDef: ɵngcc0.ΔDirectiveDefWithMeta');
|
'foo(x: number): number;\n static ngDirectiveDef: ɵngcc0.ɵɵDirectiveDefWithMeta');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render imports into typings files', () => {
|
it('should render imports into typings files', () => {
|
||||||
|
@ -423,7 +423,7 @@ export class MetadataBundler {
|
|||||||
result[key] = this.convertFunction(moduleName, value);
|
result[key] = this.convertFunction(moduleName, value);
|
||||||
} else if (isMetadataSymbolicCallExpression(value)) {
|
} else if (isMetadataSymbolicCallExpression(value)) {
|
||||||
// Class members can also contain static members that call a function with module
|
// Class members can also contain static members that call a function with module
|
||||||
// references. e.g. "static ngInjectableDef = ΔdefineInjectable(..)". We also need to
|
// references. e.g. "static ngInjectableDef = ɵɵdefineInjectable(..)". We also need to
|
||||||
// convert these module references because otherwise these resolve to non-existent files.
|
// convert these module references because otherwise these resolve to non-existent files.
|
||||||
result[key] = this.convertValue(moduleName, value);
|
result[key] = this.convertValue(moduleName, value);
|
||||||
} else {
|
} else {
|
||||||
|
@ -48,15 +48,15 @@ export class NoopImportRewriter implements ImportRewriter {
|
|||||||
* which they're exported from r3_symbols.
|
* which they're exported from r3_symbols.
|
||||||
*/
|
*/
|
||||||
const CORE_SUPPORTED_SYMBOLS = new Map<string, string>([
|
const CORE_SUPPORTED_SYMBOLS = new Map<string, string>([
|
||||||
['ΔdefineInjectable', 'ΔdefineInjectable'],
|
['ɵɵdefineInjectable', 'ɵɵdefineInjectable'],
|
||||||
['ΔdefineInjector', 'ΔdefineInjector'],
|
['ɵɵdefineInjector', 'ɵɵdefineInjector'],
|
||||||
['ΔdefineNgModule', 'ΔdefineNgModule'],
|
['ɵɵdefineNgModule', 'ɵɵdefineNgModule'],
|
||||||
['ΔsetNgModuleScope', 'ΔsetNgModuleScope'],
|
['ɵɵsetNgModuleScope', 'ɵɵsetNgModuleScope'],
|
||||||
['Δinject', 'Δinject'],
|
['ɵɵinject', 'ɵɵinject'],
|
||||||
['ɵsetClassMetadata', 'setClassMetadata'],
|
['ɵsetClassMetadata', 'setClassMetadata'],
|
||||||
['ΔInjectableDef', 'ΔInjectableDef'],
|
['ɵɵInjectableDef', 'ɵɵInjectableDef'],
|
||||||
['ΔInjectorDef', 'ΔInjectorDef'],
|
['ɵɵInjectorDef', 'ɵɵInjectorDef'],
|
||||||
['ΔNgModuleDefWithMeta', 'ΔNgModuleDefWithMeta'],
|
['ɵɵNgModuleDefWithMeta', 'ɵɵNgModuleDefWithMeta'],
|
||||||
['ɵNgModuleFactory', 'NgModuleFactory'],
|
['ɵNgModuleFactory', 'NgModuleFactory'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ describe('mock_compiler', () => {
|
|||||||
expectEmit(
|
expectEmit(
|
||||||
result.source, `
|
result.source, `
|
||||||
// TODO: this comment should not be taken into account
|
// TODO: this comment should not be taken into account
|
||||||
$r3$.Δtext(0, "Hello!");
|
$r3$.ɵɵtext(0, "Hello!");
|
||||||
// TODO: this comment should not be taken into account
|
// TODO: this comment should not be taken into account
|
||||||
`,
|
`,
|
||||||
'todo comments should be ignored');
|
'todo comments should be ignored');
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -39,13 +39,13 @@ describe('compiler compliance: bindings', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template:function MyComponent_Template(rf, $ctx$){
|
template:function MyComponent_Template(rf, $ctx$){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
$i0$.Δtext(1);
|
$i0$.ɵɵtext(1);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
|
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation1("Hello ", $ctx$.name, ""));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
@ -78,11 +78,11 @@ describe('compiler compliance: bindings', () => {
|
|||||||
…
|
…
|
||||||
template:function MyComponent_Template(rf, $ctx$){
|
template:function MyComponent_Template(rf, $ctx$){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δelement(0, "a", $e0_attrs$);
|
$i0$.ɵɵelement(0, "a", $e0_attrs$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "title", $i0$.Δbind($ctx$.title));
|
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵbind($ctx$.title));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
@ -113,11 +113,11 @@ describe('compiler compliance: bindings', () => {
|
|||||||
…
|
…
|
||||||
template:function MyComponent_Template(rf, $ctx$){
|
template:function MyComponent_Template(rf, $ctx$){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δelement(0, "a", $e0_attrs$);
|
$i0$.ɵɵelement(0, "a", $e0_attrs$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "title", $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
|
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵinterpolation1("Hello ", $ctx$.name, ""));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
@ -138,7 +138,7 @@ describe('compiler compliance: bindings', () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
expect(result.source).not.toContain('i0.ΔelementProperty');
|
expect(result.source).not.toContain('i0.ɵɵelementProperty');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not remap property names whose names do not correspond to their attribute names',
|
it('should not remap property names whose names do not correspond to their attribute names',
|
||||||
@ -170,11 +170,11 @@ describe('compiler compliance: bindings', () => {
|
|||||||
|
|
||||||
function MyComponent_Template(rf, ctx) {
|
function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δelement(0, "label", _c0);
|
$i0$.ɵɵelement(0, "label", _c0);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "for", $i0$.Δbind(ctx.forValue));
|
$i0$.ɵɵelementProperty(0, "for", $i0$.ɵɵbind(ctx.forValue));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -204,16 +204,16 @@ describe('compiler compliance: bindings', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const HostBindingDirDeclaration = `
|
const HostBindingDirDeclaration = `
|
||||||
HostBindingDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
HostBindingDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||||
type: HostBindingDir,
|
type: HostBindingDir,
|
||||||
selectors: [["", "hostBindingDir", ""]],
|
selectors: [["", "hostBindingDir", ""]],
|
||||||
factory: function HostBindingDir_Factory(t) { return new (t || HostBindingDir)(); },
|
factory: function HostBindingDir_Factory(t) { return new (t || HostBindingDir)(); },
|
||||||
hostBindings: function HostBindingDir_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function HostBindingDir_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔallocHostVars(1);
|
$r3$.ɵɵallocHostVars(1);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.dirId), null, true);
|
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind(ctx.dirId), null, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -251,16 +251,16 @@ describe('compiler compliance: bindings', () => {
|
|||||||
const HostBindingCompDeclaration = `
|
const HostBindingCompDeclaration = `
|
||||||
const $ff$ = function ($v$) { return ["red", $v$]; };
|
const $ff$ = function ($v$) { return ["red", $v$]; };
|
||||||
…
|
…
|
||||||
HostBindingComp.ngComponentDef = $r3$.ΔdefineComponent({
|
HostBindingComp.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: HostBindingComp,
|
type: HostBindingComp,
|
||||||
selectors: [["host-binding-comp"]],
|
selectors: [["host-binding-comp"]],
|
||||||
factory: function HostBindingComp_Factory(t) { return new (t || HostBindingComp)(); },
|
factory: function HostBindingComp_Factory(t) { return new (t || HostBindingComp)(); },
|
||||||
hostBindings: function HostBindingComp_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function HostBindingComp_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔallocHostVars(3);
|
$r3$.ɵɵallocHostVars(3);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind($r3$.ΔpureFunction1(1, $ff$, ctx.id)), null, true);
|
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind($r3$.ɵɵpureFunction1(1, $ff$, ctx.id)), null, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
consts: 0,
|
consts: 0,
|
||||||
@ -299,16 +299,16 @@ describe('compiler compliance: bindings', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const HostAttributeDirDeclaration = `
|
const HostAttributeDirDeclaration = `
|
||||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||||
type: HostAttributeDir,
|
type: HostAttributeDir,
|
||||||
selectors: [["", "hostAttributeDir", ""]],
|
selectors: [["", "hostAttributeDir", ""]],
|
||||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔallocHostVars(1);
|
$r3$.ɵɵallocHostVars(1);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementAttribute(elIndex, "required", $r3$.Δbind(ctx.required));
|
$r3$.ɵɵelementAttribute(elIndex, "required", $r3$.ɵɵbind(ctx.required));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -344,13 +344,13 @@ describe('compiler compliance: bindings', () => {
|
|||||||
const HostAttributeDirDeclaration = `
|
const HostAttributeDirDeclaration = `
|
||||||
const $c0$ = ["aria-label", "label"];
|
const $c0$ = ["aria-label", "label"];
|
||||||
…
|
…
|
||||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||||
type: HostAttributeDir,
|
type: HostAttributeDir,
|
||||||
selectors: [["", "hostAttributeDir", ""]],
|
selectors: [["", "hostAttributeDir", ""]],
|
||||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostAttrs($c0$);
|
$r3$.ɵɵelementHostAttrs($c0$);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -402,25 +402,25 @@ describe('compiler compliance: bindings', () => {
|
|||||||
const $c0$ = ["title", "hello there from component", ${AttributeMarker.Styles}, "opacity", "1"];
|
const $c0$ = ["title", "hello there from component", ${AttributeMarker.Styles}, "opacity", "1"];
|
||||||
const $c1$ = ["title", "hello there from directive", ${AttributeMarker.Classes}, "one", "two", ${AttributeMarker.Styles}, "width", "200px", "height", "500px"];
|
const $c1$ = ["title", "hello there from directive", ${AttributeMarker.Classes}, "one", "two", ${AttributeMarker.Styles}, "width", "200px", "height", "500px"];
|
||||||
…
|
…
|
||||||
HostAttributeComp.ngComponentDef = $r3$.ΔdefineComponent({
|
HostAttributeComp.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: HostAttributeComp,
|
type: HostAttributeComp,
|
||||||
selectors: [["my-host-attribute-component"]],
|
selectors: [["my-host-attribute-component"]],
|
||||||
factory: function HostAttributeComp_Factory(t) { return new (t || HostAttributeComp)(); },
|
factory: function HostAttributeComp_Factory(t) { return new (t || HostAttributeComp)(); },
|
||||||
hostBindings: function HostAttributeComp_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function HostAttributeComp_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostAttrs($c0$);
|
$r3$.ɵɵelementHostAttrs($c0$);
|
||||||
…
|
…
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||||
type: HostAttributeDir,
|
type: HostAttributeDir,
|
||||||
selectors: [["", "hostAttributeDir", ""]],
|
selectors: [["", "hostAttributeDir", ""]],
|
||||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostAttrs($c1$);
|
$r3$.ɵɵelementHostAttrs($c1$);
|
||||||
…
|
…
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
@ -466,19 +466,19 @@ describe('compiler compliance: bindings', () => {
|
|||||||
…
|
…
|
||||||
template:function MyComponent_Template(rf, $ctx$){
|
template:function MyComponent_Template(rf, $ctx$){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "b", $_c0$, $_c1$);
|
$i0$.ɵɵelementStart(0, "b", $_c0$, $_c1$);
|
||||||
$i0$.ΔdisableBindings();
|
$i0$.ɵɵdisableBindings();
|
||||||
$i0$.ΔelementStart(2, "i");
|
$i0$.ɵɵelementStart(2, "i");
|
||||||
$i0$.Δtext(3, "Hello {{ name }}!");
|
$i0$.ɵɵtext(3, "Hello {{ name }}!");
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
$i0$.ΔenableBindings();
|
$i0$.ɵɵenableBindings();
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
$i0$.Δtext(4);
|
$i0$.ɵɵtext(4);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $_r0$ = $i0$.Δreference(1);
|
const $_r0$ = $i0$.ɵɵreference(1);
|
||||||
$r3$.Δselect(4);
|
$r3$.ɵɵselect(4);
|
||||||
$i0$.ΔtextBinding(4, $i0$.Δinterpolation1(" ", $_r0$.id, " "));
|
$i0$.ɵɵtextBinding(4, $i0$.ɵɵinterpolation1(" ", $_r0$.id, " "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -498,12 +498,12 @@ describe('compiler compliance: bindings', () => {
|
|||||||
…
|
…
|
||||||
template:function MyComponent_Template(rf, $ctx$){
|
template:function MyComponent_Template(rf, $ctx$){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
$i0$.ΔdisableBindings();
|
$i0$.ɵɵdisableBindings();
|
||||||
$i0$.Δelement(1, "input", $_c0$);
|
$i0$.ɵɵelement(1, "input", $_c0$);
|
||||||
$i0$.Δtext(2, " {{ myInput.value }} ");
|
$i0$.ɵɵtext(2, " {{ myInput.value }} ");
|
||||||
$i0$.ΔenableBindings();
|
$i0$.ɵɵenableBindings();
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
@ -522,11 +522,11 @@ describe('compiler compliance: bindings', () => {
|
|||||||
…
|
…
|
||||||
template:function MyComponent_Template(rf, $ctx$){
|
template:function MyComponent_Template(rf, $ctx$){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
$i0$.ΔdisableBindings();
|
$i0$.ɵɵdisableBindings();
|
||||||
$i0$.Δelement(1, "div", $_c0$);
|
$i0$.ɵɵelement(1, "div", $_c0$);
|
||||||
$i0$.ΔenableBindings();
|
$i0$.ɵɵenableBindings();
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
@ -541,7 +541,7 @@ describe('compiler compliance: bindings', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template:function MyComponent_Template(rf, $ctx$){
|
template:function MyComponent_Template(rf, $ctx$){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δelement(0, "div");
|
$i0$.ɵɵelement(0, "div");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -50,13 +50,13 @@ describe('compiler compliance: dependency injection', () => {
|
|||||||
const factory = `
|
const factory = `
|
||||||
factory: function MyComponent_Factory(t) {
|
factory: function MyComponent_Factory(t) {
|
||||||
return new (t || MyComponent)(
|
return new (t || MyComponent)(
|
||||||
$r3$.ΔinjectAttribute('name'),
|
$r3$.ɵɵinjectAttribute('name'),
|
||||||
$r3$.ΔdirectiveInject(MyService),
|
$r3$.ɵɵdirectiveInject(MyService),
|
||||||
$r3$.ΔdirectiveInject(MyService, 1),
|
$r3$.ɵɵdirectiveInject(MyService, 1),
|
||||||
$r3$.ΔdirectiveInject(MyService, 2),
|
$r3$.ɵɵdirectiveInject(MyService, 2),
|
||||||
$r3$.ΔdirectiveInject(MyService, 4),
|
$r3$.ɵɵdirectiveInject(MyService, 4),
|
||||||
$r3$.ΔdirectiveInject(MyService, 8),
|
$r3$.ɵɵdirectiveInject(MyService, 8),
|
||||||
$r3$.ΔdirectiveInject(MyService, 10)
|
$r3$.ɵɵdirectiveInject(MyService, 10)
|
||||||
);
|
);
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ describe('compiler compliance: directives', () => {
|
|||||||
|
|
||||||
// MyComponent definition should be:
|
// MyComponent definition should be:
|
||||||
const MyComponentDefinition = `
|
const MyComponentDefinition = `
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors: [["my-component"]],
|
selectors: [["my-component"]],
|
||||||
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
||||||
@ -46,7 +46,7 @@ describe('compiler compliance: directives', () => {
|
|||||||
vars: 0,
|
vars: 0,
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δelement(0, "div");
|
$r3$.ɵɵelement(0, "div");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
@ -84,7 +84,7 @@ describe('compiler compliance: directives', () => {
|
|||||||
|
|
||||||
// MyComponent definition should be:
|
// MyComponent definition should be:
|
||||||
const MyComponentDefinition = `
|
const MyComponentDefinition = `
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors: [["my-component"]],
|
selectors: [["my-component"]],
|
||||||
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
||||||
@ -92,7 +92,7 @@ describe('compiler compliance: directives', () => {
|
|||||||
vars: 0,
|
vars: 0,
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δelement(0, "div");
|
$r3$.ɵɵelement(0, "div");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
@ -132,15 +132,15 @@ describe('compiler compliance: directives', () => {
|
|||||||
…
|
…
|
||||||
const _c0 = [${AttributeMarker.Bindings}, "someDirective"];
|
const _c0 = [${AttributeMarker.Bindings}, "someDirective"];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δelement(0, "div", _c0);
|
$r3$.ɵɵelement(0, "div", _c0);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementProperty(0, "someDirective", $r3$.Δbind(true));
|
$r3$.ɵɵelementProperty(0, "someDirective", $r3$.ɵɵbind(true));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
…
|
…
|
||||||
@ -187,15 +187,15 @@ describe('compiler compliance: directives', () => {
|
|||||||
const $_c0$ = ["directiveA", ""];
|
const $_c0$ = ["directiveA", ""];
|
||||||
function MyComponent_ng_template_0_Template(rf, ctx) {
|
function MyComponent_ng_template_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δtext(0, "Some content");
|
$r3$.ɵɵtext(0, "Some content");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $_c0$);
|
$r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $_c0$);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
…
|
…
|
||||||
@ -241,21 +241,21 @@ describe('compiler compliance: directives', () => {
|
|||||||
const $_c1$ = ["directiveA", ""];
|
const $_c1$ = ["directiveA", ""];
|
||||||
function MyComponent_ng_container_0_Template(rf, ctx) {
|
function MyComponent_ng_container_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementContainerStart(0, $_c1$);
|
$r3$.ɵɵelementContainerStart(0, $_c1$);
|
||||||
$r3$.Δtext(1, "Some content");
|
$r3$.ɵɵtext(1, "Some content");
|
||||||
$r3$.ΔelementContainerEnd();
|
$r3$.ɵɵelementContainerEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δtemplate(0, MyComponent_ng_container_0_Template, 2, 0, "ng-container", $_c0$);
|
$r3$.ɵɵtemplate(0, MyComponent_ng_container_0_Template, 2, 0, "ng-container", $_c0$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementProperty(0, "ngIf", $r3$.Δbind(ctx.showing));
|
$r3$.ɵɵelementProperty(0, "ngIf", $r3$.ɵɵbind(ctx.showing));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
…
|
…
|
||||||
@ -295,15 +295,15 @@ describe('compiler compliance: directives', () => {
|
|||||||
…
|
…
|
||||||
const $c0_a0$ = [${AttributeMarker.Bindings}, "someDirective"];
|
const $c0_a0$ = [${AttributeMarker.Bindings}, "someDirective"];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $c0_a0$);
|
$r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $c0_a0$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementProperty(0, "someDirective", $r3$.Δbind(true));
|
$r3$.ɵɵelementProperty(0, "someDirective", $r3$.ɵɵbind(true));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
…
|
…
|
||||||
@ -344,11 +344,11 @@ describe('compiler compliance: directives', () => {
|
|||||||
…
|
…
|
||||||
const $c0_a0$ = [${AttributeMarker.Template}, "someDirective"];
|
const $c0_a0$ = [${AttributeMarker.Template}, "someDirective"];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0_a0$);
|
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0_a0$);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
…
|
…
|
||||||
@ -393,13 +393,13 @@ describe('compiler compliance: directives', () => {
|
|||||||
…
|
…
|
||||||
const $c0_a0$ = [${AttributeMarker.Bindings}, "someDirective"];
|
const $c0_a0$ = [${AttributeMarker.Bindings}, "someDirective"];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div", $c0_a0$);
|
$r3$.ɵɵelementStart(0, "div", $c0_a0$);
|
||||||
$r3$.Δlistener("someDirective", function MyComponent_Template_div_someDirective_0_listener($event) { return ctx.noop(); });
|
$r3$.ɵɵlistener("someDirective", function MyComponent_Template_div_someDirective_0_listener($event) { return ctx.noop(); });
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
…
|
…
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -52,7 +52,7 @@ describe('compiler compliance: listen()', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const componentDef = `
|
const componentDef = `
|
||||||
MyComponent.ngComponentDef = IDENT.ΔdefineComponent({
|
MyComponent.ngComponentDef = IDENT.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
inputs:{
|
inputs:{
|
||||||
componentInput: "componentInput",
|
componentInput: "componentInput",
|
||||||
@ -66,7 +66,7 @@ describe('compiler compliance: listen()', () => {
|
|||||||
});`;
|
});`;
|
||||||
|
|
||||||
const directiveDef = `
|
const directiveDef = `
|
||||||
MyDirective.ngDirectiveDef = IDENT.ΔdefineDirective({
|
MyDirective.ngDirectiveDef = IDENT.ɵɵdefineDirective({
|
||||||
…
|
…
|
||||||
inputs:{
|
inputs:{
|
||||||
directiveInput: "directiveInput",
|
directiveInput: "directiveInput",
|
||||||
|
@ -45,12 +45,12 @@ describe('compiler compliance: listen()', () => {
|
|||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div", $e0_attrs$);
|
$r3$.ɵɵelementStart(0, "div", $e0_attrs$);
|
||||||
$r3$.Δlistener("click", function MyComponent_Template_div_click_0_listener($event) {
|
$r3$.ɵɵlistener("click", function MyComponent_Template_div_click_0_listener($event) {
|
||||||
ctx.onClick($event);
|
ctx.onClick($event);
|
||||||
return (1 == 2);
|
return (1 == 2);
|
||||||
});
|
});
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -91,11 +91,11 @@ describe('compiler compliance: listen()', () => {
|
|||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "my-app", $e0_attrs$);
|
$r3$.ɵɵelementStart(0, "my-app", $e0_attrs$);
|
||||||
$r3$.Δlistener("click", function MyComponent_Template_my_app_click_0_listener($event) {
|
$r3$.ɵɵlistener("click", function MyComponent_Template_my_app_click_0_listener($event) {
|
||||||
return ctx.onClick($event);
|
return ctx.onClick($event);
|
||||||
});
|
});
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -138,33 +138,33 @@ describe('compiler compliance: listen()', () => {
|
|||||||
|
|
||||||
function MyComponent_div_0_Template(rf, ctx) {
|
function MyComponent_div_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
const $s$ = $r3$.ΔgetCurrentView();
|
const $s$ = $r3$.ɵɵgetCurrentView();
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStart(1, "div", $e_attrs$);
|
$r3$.ɵɵelementStart(1, "div", $e_attrs$);
|
||||||
$r3$.Δlistener("click", function MyComponent_div_0_Template_div_click_1_listener($event) {
|
$r3$.ɵɵlistener("click", function MyComponent_div_0_Template_div_click_1_listener($event) {
|
||||||
$r3$.ΔrestoreView($s$);
|
$r3$.ɵɵrestoreView($s$);
|
||||||
const $comp$ = $r3$.ΔnextContext();
|
const $comp$ = $r3$.ɵɵnextContext();
|
||||||
return $comp$.onClick($comp$.foo);
|
return $comp$.onClick($comp$.foo);
|
||||||
});
|
});
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
$r3$.ΔelementStart(2, "button", $e_attrs$);
|
$r3$.ɵɵelementStart(2, "button", $e_attrs$);
|
||||||
$r3$.Δlistener("click", function MyComponent_div_0_Template_button_click_2_listener($event) {
|
$r3$.ɵɵlistener("click", function MyComponent_div_0_Template_button_click_2_listener($event) {
|
||||||
$r3$.ΔrestoreView($s$);
|
$r3$.ɵɵrestoreView($s$);
|
||||||
const $comp2$ = $r3$.ΔnextContext();
|
const $comp2$ = $r3$.ɵɵnextContext();
|
||||||
return $comp2$.onClick2($comp2$.bar);
|
return $comp2$.onClick2($comp2$.bar);
|
||||||
});
|
});
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ...
|
// ...
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δtemplate(0, MyComponent_div_0_Template, 3, 0, "div", $c0$);
|
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 3, 0, "div", $c0$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "ngIf", $i0$.Δbind(ctx.showing));
|
$i0$.ɵɵelementProperty(0, "ngIf", $i0$.ɵɵbind(ctx.showing));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -199,7 +199,7 @@ describe('compiler compliance: listen()', () => {
|
|||||||
const $e0_attrs$ = [${AttributeMarker.Bindings}, "click"];
|
const $e0_attrs$ = [${AttributeMarker.Bindings}, "click"];
|
||||||
const $e2_refs$ = ["user", ""];
|
const $e2_refs$ = ["user", ""];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors: [["my-component"]],
|
selectors: [["my-component"]],
|
||||||
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
factory: function MyComponent_Factory(t) { return new (t || MyComponent)(); },
|
||||||
@ -207,16 +207,16 @@ describe('compiler compliance: listen()', () => {
|
|||||||
vars: 0,
|
vars: 0,
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
const $s$ = $r3$.ΔgetCurrentView();
|
const $s$ = $r3$.ɵɵgetCurrentView();
|
||||||
$r3$.ΔelementStart(0, "button", $e0_attrs$);
|
$r3$.ɵɵelementStart(0, "button", $e0_attrs$);
|
||||||
$r3$.Δlistener("click", function MyComponent_Template_button_click_0_listener($event) {
|
$r3$.ɵɵlistener("click", function MyComponent_Template_button_click_0_listener($event) {
|
||||||
$r3$.ΔrestoreView($s$);
|
$r3$.ɵɵrestoreView($s$);
|
||||||
const $user$ = $r3$.Δreference(3);
|
const $user$ = $r3$.ɵɵreference(3);
|
||||||
return ctx.onClick($user$.value);
|
return ctx.onClick($user$.value);
|
||||||
});
|
});
|
||||||
$r3$.Δtext(1, "Save");
|
$r3$.ɵɵtext(1, "Save");
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
$r3$.Δelement(2, "input", null, $e2_refs$);
|
$r3$.ɵɵelement(2, "input", null, $e2_refs$);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
|
@ -46,7 +46,7 @@ describe('compiler compliance: providers', () => {
|
|||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
expectEmit(
|
expectEmit(
|
||||||
result.source,
|
result.source,
|
||||||
'features: [i0.ΔProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}], [GreeterEN])],',
|
'features: [i0.ɵɵProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}], [GreeterEN])],',
|
||||||
'Incorrect features');
|
'Incorrect features');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ describe('compiler compliance: providers', () => {
|
|||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
expectEmit(
|
expectEmit(
|
||||||
result.source,
|
result.source,
|
||||||
'features: [i0.ΔProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}])],',
|
'features: [i0.ɵɵProvidersFeature([GreeterEN, {provide: Greeter, useClass: GreeterEN}])],',
|
||||||
'Incorrect features');
|
'Incorrect features');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ describe('compiler compliance: providers', () => {
|
|||||||
|
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
expectEmit(
|
expectEmit(
|
||||||
result.source, 'features: [i0.ΔProvidersFeature([], [GreeterEN])],', 'Incorrect features');
|
result.source, 'features: [i0.ɵɵProvidersFeature([], [GreeterEN])],', 'Incorrect features');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not emit the ProvidersFeature feature when no providers', () => {
|
it('should not emit the ProvidersFeature feature when no providers', () => {
|
||||||
|
@ -113,7 +113,7 @@ describe('r3_view_compiler', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const bV_call =
|
const bV_call =
|
||||||
`$r3$.ΔinterpolationV([" ",ctx.list[0]," ",ctx.list[1]," ",ctx.list[2]," ",ctx.list[3],
|
`$r3$.ɵɵinterpolationV([" ",ctx.list[0]," ",ctx.list[1]," ",ctx.list[2]," ",ctx.list[3],
|
||||||
" ",ctx.list[4]," ",ctx.list[5]," ",ctx.list[6]," ",ctx.list[7]," ",ctx.list[8],
|
" ",ctx.list[4]," ",ctx.list[5]," ",ctx.list[6]," ",ctx.list[7]," ",ctx.list[8],
|
||||||
" "])`;
|
" "])`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
@ -143,12 +143,12 @@ describe('r3_view_compiler', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template: function MyApp_Template(rf, ctx) {
|
template: function MyApp_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δelement(0, "div");
|
$i0$.ɵɵelement(0, "div");
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "@attr", …);
|
$i0$.ɵɵelementProperty(0, "@attr", …);
|
||||||
$i0$.ΔelementProperty(0, "@binding", …);
|
$i0$.ɵɵelementProperty(0, "@binding", …);
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
@ -176,10 +176,10 @@ describe('r3_view_compiler', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template: function MyApp_Template(rf, ctx) {
|
template: function MyApp_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
…
|
…
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "@mySelector", …);
|
$i0$.ɵɵelementProperty(0, "@mySelector", …);
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
const result = compile(files, angularFiles);
|
const result = compile(files, angularFiles);
|
||||||
|
@ -95,7 +95,7 @@ describe('compiler compliance: styling', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const template = `
|
const template = `
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
styles: ["div.cool { color: blue; }", ":host.nice p { color: gold; }"],
|
styles: ["div.cool { color: blue; }", ":host.nice p { color: gold; }"],
|
||||||
encapsulation: 1
|
encapsulation: 1
|
||||||
@ -128,7 +128,7 @@ describe('compiler compliance: styling', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const template = `
|
const template = `
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors:[["my-component"]],
|
selectors:[["my-component"]],
|
||||||
factory:function MyComponent_Factory(t){
|
factory:function MyComponent_Factory(t){
|
||||||
@ -170,7 +170,7 @@ describe('compiler compliance: styling', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const template = `
|
const template = `
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors:[["my-component"]],
|
selectors:[["my-component"]],
|
||||||
factory:function MyComponent_Factory(t){
|
factory:function MyComponent_Factory(t){
|
||||||
@ -215,23 +215,23 @@ describe('compiler compliance: styling', () => {
|
|||||||
|
|
||||||
const template = `
|
const template = `
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
consts: 3,
|
consts: 3,
|
||||||
vars: 3,
|
vars: 3,
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δelement(0, "div");
|
$r3$.ɵɵelement(0, "div");
|
||||||
$r3$.Δelement(1, "div");
|
$r3$.ɵɵelement(1, "div");
|
||||||
$r3$.Δelement(2, "div");
|
$r3$.ɵɵelement(2, "div");
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementProperty(0, "@foo", $r3$.Δbind(ctx.exp));
|
$r3$.ɵɵelementProperty(0, "@foo", $r3$.ɵɵbind(ctx.exp));
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$r3$.ΔelementProperty(1, "@bar", $r3$.Δbind(undefined));
|
$r3$.ɵɵelementProperty(1, "@bar", $r3$.ɵɵbind(undefined));
|
||||||
$r3$.Δselect(2);
|
$r3$.ɵɵselect(2);
|
||||||
$r3$.ΔelementProperty(2, "@baz", $r3$.Δbind(undefined));
|
$r3$.ɵɵelementProperty(2, "@baz", $r3$.ɵɵbind(undefined));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
@ -277,19 +277,19 @@ describe('compiler compliance: styling', () => {
|
|||||||
|
|
||||||
const template = `
|
const template = `
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
…
|
…
|
||||||
consts: 1,
|
consts: 1,
|
||||||
vars: 1,
|
vars: 1,
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.Δlistener("@myAnimation.start", function MyComponent_Template_div_animation_myAnimation_start_0_listener($event) { return ctx.onStart($event); });
|
$r3$.ɵɵlistener("@myAnimation.start", function MyComponent_Template_div_animation_myAnimation_start_0_listener($event) { return ctx.onStart($event); });
|
||||||
$r3$.Δlistener("@myAnimation.done", function MyComponent_Template_div_animation_myAnimation_done_0_listener($event) { return ctx.onDone($event); });
|
$r3$.ɵɵlistener("@myAnimation.done", function MyComponent_Template_div_animation_myAnimation_done_0_listener($event) { return ctx.onDone($event); });
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
} if (rf & 2) {
|
} if (rf & 2) {
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementProperty(0, "@myAnimation", $r3$.Δbind(ctx.exp));
|
$r3$.ɵɵelementProperty(0, "@myAnimation", $r3$.ɵɵbind(ctx.exp));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2,
|
encapsulation: 2,
|
||||||
@ -340,15 +340,15 @@ describe('compiler compliance: styling', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const template = `
|
const template = `
|
||||||
MyAnimDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
MyAnimDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
|
||||||
…
|
…
|
||||||
hostBindings: function MyAnimDir_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function MyAnimDir_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔallocHostVars(1);
|
$r3$.ɵɵallocHostVars(1);
|
||||||
$r3$.ΔcomponentHostSyntheticListener("@myAnim.start", function MyAnimDir_animation_myAnim_start_HostBindingHandler($event) { return ctx.onStart(); });
|
$r3$.ɵɵcomponentHostSyntheticListener("@myAnim.start", function MyAnimDir_animation_myAnim_start_HostBindingHandler($event) { return ctx.onStart(); });
|
||||||
$r3$.ΔcomponentHostSyntheticListener("@myAnim.done", function MyAnimDir_animation_myAnim_done_HostBindingHandler($event) { return ctx.onDone(); });
|
$r3$.ɵɵcomponentHostSyntheticListener("@myAnim.done", function MyAnimDir_animation_myAnim_done_HostBindingHandler($event) { return ctx.onDone(); });
|
||||||
} if (rf & 2) {
|
} if (rf & 2) {
|
||||||
$r3$.ΔcomponentHostSyntheticProperty(elIndex, "@myAnim", $r3$.Δbind(ctx.myAnimState), null, true);
|
$r3$.ɵɵcomponentHostSyntheticProperty(elIndex, "@myAnim", $r3$.ɵɵbind(ctx.myAnimState), null, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
@ -384,13 +384,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, null, $ctx$.myStyleExp);
|
$r3$.ɵɵelementStylingMap(0, null, $ctx$.myStyleExp);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -449,13 +449,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
vars: 1,
|
vars: 1,
|
||||||
template: function MyComponentWithInterpolation_Template(rf, $ctx$) {
|
template: function MyComponentWithInterpolation_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling();
|
$r3$.ɵɵelementStyling();
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, $r3$.Δinterpolation1("foo foo-", $ctx$.fooId, ""));
|
$r3$.ɵɵelementStylingMap(0, $r3$.ɵɵinterpolation1("foo foo-", $ctx$.fooId, ""));
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
@ -463,13 +463,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
vars: 2,
|
vars: 2,
|
||||||
template: function MyComponentWithMuchosInterpolation_Template(rf, $ctx$) {
|
template: function MyComponentWithMuchosInterpolation_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling();
|
$r3$.ɵɵelementStyling();
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, $r3$.Δinterpolation2("foo foo-", $ctx$.fooId, "-", $ctx$.fooUsername, ""));
|
$r3$.ɵɵelementStylingMap(0, $r3$.ɵɵinterpolation2("foo foo-", $ctx$.fooId, "-", $ctx$.fooUsername, ""));
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
@ -477,13 +477,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
vars: 0,
|
vars: 0,
|
||||||
template: function MyComponentWithoutInterpolation_Template(rf, $ctx$) {
|
template: function MyComponentWithoutInterpolation_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling();
|
$r3$.ɵɵelementStyling();
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, $ctx$.exp);
|
$r3$.ɵɵelementStylingMap(0, $ctx$.exp);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -523,7 +523,7 @@ describe('compiler compliance: styling', () => {
|
|||||||
const $_c0$ = [${AttributeMarker.Styles}, "opacity", "1", ${AttributeMarker.Bindings}, "style"];
|
const $_c0$ = [${AttributeMarker.Styles}, "opacity", "1", ${AttributeMarker.Bindings}, "style"];
|
||||||
const $_c1$ = ["width", "height"];
|
const $_c1$ = ["width", "height"];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors:[["my-component"]],
|
selectors:[["my-component"]],
|
||||||
factory:function MyComponent_Factory(t){
|
factory:function MyComponent_Factory(t){
|
||||||
@ -533,17 +533,17 @@ describe('compiler compliance: styling', () => {
|
|||||||
vars: 1,
|
vars: 1,
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div", $_c0$);
|
$r3$.ɵɵelementStart(0, "div", $_c0$);
|
||||||
$r3$.ΔelementStyling(null, $_c1$, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementStyling(null, $_c1$, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, null, $ctx$.myStyleExp);
|
$r3$.ɵɵelementStylingMap(0, null, $ctx$.myStyleExp);
|
||||||
$r3$.ΔelementStyleProp(0, 0, $ctx$.myWidth);
|
$r3$.ɵɵelementStyleProp(0, 0, $ctx$.myWidth);
|
||||||
$r3$.ΔelementStyleProp(0, 1, $ctx$.myHeight);
|
$r3$.ɵɵelementStyleProp(0, 1, $ctx$.myHeight);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementAttribute(0, "style", $r3$.Δbind("border-width: 10px"), $r3$.ΔsanitizeStyle);
|
$r3$.ɵɵelementAttribute(0, "style", $r3$.ɵɵbind("border-width: 10px"), $r3$.ɵɵsanitizeStyle);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
@ -583,7 +583,7 @@ describe('compiler compliance: styling', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors: [["my-component"]],
|
selectors: [["my-component"]],
|
||||||
factory: function MyComponent_Factory(t) {
|
factory: function MyComponent_Factory(t) {
|
||||||
@ -593,13 +593,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
vars: 0,
|
vars: 0,
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling(null, _c0, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementStyling(null, _c0, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStyleProp(0, 0, ctx.myImage);
|
$r3$.ɵɵelementStyleProp(0, 0, ctx.myImage);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
@ -634,13 +634,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling(null, _c0);
|
$r3$.ɵɵelementStyling(null, _c0);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStyleProp(0, 0, 12, "px");
|
$r3$.ɵɵelementStyleProp(0, 0, 12, "px");
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -675,13 +675,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling();
|
$r3$.ɵɵelementStyling();
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0,$ctx$.myClassExp);
|
$r3$.ɵɵelementStylingMap(0,$ctx$.myClassExp);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -721,7 +721,7 @@ describe('compiler compliance: styling', () => {
|
|||||||
const $e0_attrs$ = [${AttributeMarker.Classes}, "grape", ${AttributeMarker.Bindings}, "class"];
|
const $e0_attrs$ = [${AttributeMarker.Classes}, "grape", ${AttributeMarker.Bindings}, "class"];
|
||||||
const $e0_bindings$ = ["apple", "orange"];
|
const $e0_bindings$ = ["apple", "orange"];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors:[["my-component"]],
|
selectors:[["my-component"]],
|
||||||
factory:function MyComponent_Factory(t){
|
factory:function MyComponent_Factory(t){
|
||||||
@ -731,17 +731,17 @@ describe('compiler compliance: styling', () => {
|
|||||||
vars: 1,
|
vars: 1,
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div", $e0_attrs$);
|
$r3$.ɵɵelementStart(0, "div", $e0_attrs$);
|
||||||
$r3$.ΔelementStyling($e0_bindings$);
|
$r3$.ɵɵelementStyling($e0_bindings$);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, $ctx$.myClassExp);
|
$r3$.ɵɵelementStylingMap(0, $ctx$.myClassExp);
|
||||||
$r3$.ΔelementClassProp(0, 0, $ctx$.yesToApple);
|
$r3$.ɵɵelementClassProp(0, 0, $ctx$.yesToApple);
|
||||||
$r3$.ΔelementClassProp(0, 1, $ctx$.yesToOrange);
|
$r3$.ɵɵelementClassProp(0, 1, $ctx$.yesToOrange);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementAttribute(0, "class", $r3$.Δbind("banana"));
|
$r3$.ɵɵelementAttribute(0, "class", $r3$.ɵɵbind("banana"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
@ -777,7 +777,7 @@ describe('compiler compliance: styling', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
const $e0_attrs$ = [${AttributeMarker.Classes}, "foo", ${AttributeMarker.Styles}, "width", "100px", ${AttributeMarker.Bindings}, "class", "style"];
|
const $e0_attrs$ = [${AttributeMarker.Classes}, "foo", ${AttributeMarker.Styles}, "width", "100px", ${AttributeMarker.Bindings}, "class", "style"];
|
||||||
…
|
…
|
||||||
MyComponent.ngComponentDef = $r3$.ΔdefineComponent({
|
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
|
||||||
type: MyComponent,
|
type: MyComponent,
|
||||||
selectors:[["my-component"]],
|
selectors:[["my-component"]],
|
||||||
factory:function MyComponent_Factory(t){
|
factory:function MyComponent_Factory(t){
|
||||||
@ -787,12 +787,12 @@ describe('compiler compliance: styling', () => {
|
|||||||
vars: 2,
|
vars: 2,
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δelement(0, "div", $e0_attrs$);
|
$r3$.ɵɵelement(0, "div", $e0_attrs$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementAttribute(0, "class", $r3$.Δbind("round"));
|
$r3$.ɵɵelementAttribute(0, "class", $r3$.ɵɵbind("round"));
|
||||||
$r3$.ΔelementAttribute(0, "style", $r3$.Δbind("height:100px"), $r3$.ΔsanitizeStyle);
|
$r3$.ɵɵelementAttribute(0, "style", $r3$.ɵɵbind("height:100px"), $r3$.ɵɵsanitizeStyle);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
encapsulation: 2
|
encapsulation: 2
|
||||||
@ -829,13 +829,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, $ctx$.myClassExp, $ctx$.myStyleExp);
|
$r3$.ɵɵelementStylingMap(0, $ctx$.myClassExp, $ctx$.myStyleExp);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -869,15 +869,15 @@ describe('compiler compliance: styling', () => {
|
|||||||
const template = `
|
const template = `
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
$r3$.Δpipe(1, "classPipe");
|
$r3$.ɵɵpipe(1, "classPipe");
|
||||||
$r3$.Δpipe(2, "stylePipe");
|
$r3$.ɵɵpipe(2, "stylePipe");
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, $r3$.ΔpipeBind1(1, 0, $ctx$.myClassExp), $r3$.ΔpipeBind1(2, 2, $ctx$.myStyleExp));
|
$r3$.ɵɵelementStylingMap(0, $r3$.ɵɵpipeBind1(1, 0, $ctx$.myClassExp), $r3$.ɵɵpipeBind1(2, 2, $ctx$.myStyleExp));
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -922,23 +922,23 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
template: function MyComponent_Template(rf, $ctx$) {
|
template: function MyComponent_Template(rf, $ctx$) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
$r3$.Δpipe(1, "pipe");
|
$r3$.ɵɵpipe(1, "pipe");
|
||||||
$r3$.Δpipe(2, "pipe");
|
$r3$.ɵɵpipe(2, "pipe");
|
||||||
$r3$.Δpipe(3, "pipe");
|
$r3$.ɵɵpipe(3, "pipe");
|
||||||
$r3$.Δpipe(4, "pipe");
|
$r3$.ɵɵpipe(4, "pipe");
|
||||||
$r3$.Δtext(5);
|
$r3$.ɵɵtext(5);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, $e2_styling$, $r3$.ΔpipeBind2(1, 1, $ctx$.myStyleExp, 1000));
|
$r3$.ɵɵelementStylingMap(0, $e2_styling$, $r3$.ɵɵpipeBind2(1, 1, $ctx$.myStyleExp, 1000));
|
||||||
$r3$.ΔelementStyleProp(0, 0, $r3$.ΔpipeBind2(2, 4, $ctx$.barExp, 3000));
|
$r3$.ɵɵelementStyleProp(0, 0, $r3$.ɵɵpipeBind2(2, 4, $ctx$.barExp, 3000));
|
||||||
$r3$.ΔelementStyleProp(0, 1, $r3$.ΔpipeBind2(3, 7, $ctx$.bazExp, 4000));
|
$r3$.ɵɵelementStyleProp(0, 1, $r3$.ɵɵpipeBind2(3, 7, $ctx$.bazExp, 4000));
|
||||||
$r3$.ΔelementClassProp(0, 0, $r3$.ΔpipeBind2(4, 10, $ctx$.fooExp, 2000));
|
$r3$.ɵɵelementClassProp(0, 0, $r3$.ɵɵpipeBind2(4, 10, $ctx$.fooExp, 2000));
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
$r3$.Δselect(5);
|
$r3$.ɵɵselect(5);
|
||||||
$r3$.ΔtextBinding(5, $r3$.Δinterpolation1(" ", $ctx$.item, ""));
|
$r3$.ɵɵtextBinding(5, $r3$.ɵɵinterpolation1(" ", $ctx$.item, ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -990,14 +990,14 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostAttrs($e0_attrs$);
|
$r3$.ɵɵelementHostAttrs($e0_attrs$);
|
||||||
$r3$.ΔelementHostStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementHostStyling($e0_classBindings$, $e0_styleBindings$, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
$r3$.ɵɵelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
||||||
$r3$.ΔelementHostStyleProp(0, ctx.myColorProp);
|
$r3$.ɵɵelementHostStyleProp(0, ctx.myColorProp);
|
||||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClass);
|
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClass);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
consts: 0,
|
consts: 0,
|
||||||
@ -1051,15 +1051,15 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostStyling(_c0, _c1, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementHostStyling(_c0, _c1, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementHostStylingMap(ctx.myClasses, ctx.myStyle);
|
$r3$.ɵɵelementHostStylingMap(ctx.myClasses, ctx.myStyle);
|
||||||
$r3$.ΔelementHostStyleProp(0, ctx.myHeightProp, "pt");
|
$r3$.ɵɵelementHostStyleProp(0, ctx.myHeightProp, "pt");
|
||||||
$r3$.ΔelementHostStyleProp(1, ctx.myWidthProp);
|
$r3$.ɵɵelementHostStyleProp(1, ctx.myWidthProp);
|
||||||
$r3$.ΔelementHostClassProp(0, ctx.myBarClass);
|
$r3$.ɵɵelementHostClassProp(0, ctx.myBarClass);
|
||||||
$r3$.ΔelementHostClassProp(1, ctx.myFooClass);
|
$r3$.ɵɵelementHostClassProp(1, ctx.myFooClass);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
consts: 0,
|
consts: 0,
|
||||||
@ -1113,15 +1113,15 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
function MyComponent_Template(rf, ctx) {
|
function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementStart(0, "div");
|
$r3$.ɵɵelementStart(0, "div");
|
||||||
$r3$.ΔelementStyling(_c2, _c3, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementStyling(_c2, _c3, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementStylingMap(0, ctx.myClassExp, ctx.myStyleExp);
|
$r3$.ɵɵelementStylingMap(0, ctx.myClassExp, ctx.myStyleExp);
|
||||||
$r3$.ΔelementStyleProp(0, 0, ctx.myHeightExp, null, true);
|
$r3$.ɵɵelementStyleProp(0, 0, ctx.myHeightExp, null, true);
|
||||||
$r3$.ΔelementClassProp(0, 0, ctx.myBarClassExp, true);
|
$r3$.ɵɵelementClassProp(0, 0, ctx.myBarClassExp, true);
|
||||||
$r3$.ΔelementStylingApply(0);
|
$r3$.ɵɵelementStylingApply(0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
`;
|
`;
|
||||||
@ -1132,13 +1132,13 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostStyling(_c0, _c1, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementHostStyling(_c0, _c1, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementHostStylingMap(ctx.myClassExp, ctx.myStyleExp);
|
$r3$.ɵɵelementHostStylingMap(ctx.myClassExp, ctx.myStyleExp);
|
||||||
$r3$.ΔelementHostStyleProp(0, ctx.myWidthExp, null, true);
|
$r3$.ɵɵelementHostStyleProp(0, ctx.myWidthExp, null, true);
|
||||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClassExp, true);
|
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClassExp, true);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
`;
|
`;
|
||||||
@ -1200,33 +1200,33 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
function ClassDirective_HostBindings(rf, ctx, elIndex) {
|
function ClassDirective_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostStyling();
|
$r3$.ɵɵelementHostStyling();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementHostStylingMap(ctx.myClassMap);
|
$r3$.ɵɵelementHostStylingMap(ctx.myClassMap);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
function WidthDirective_HostBindings(rf, ctx, elIndex) {
|
function WidthDirective_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostStyling($widthDir_classes$, $widthDir_styles$);
|
$r3$.ɵɵelementHostStyling($widthDir_classes$, $widthDir_styles$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementHostStyleProp(0, ctx.myWidth);
|
$r3$.ɵɵelementHostStyleProp(0, ctx.myWidth);
|
||||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClass);
|
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClass);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
function HeightDirective_HostBindings(rf, ctx, elIndex) {
|
function HeightDirective_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔelementHostStyling($heightDir_classes$, $heightDir_styles$);
|
$r3$.ɵɵelementHostStyling($heightDir_classes$, $heightDir_styles$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementHostStyleProp(0, ctx.myHeight);
|
$r3$.ɵɵelementHostStyleProp(0, ctx.myHeight);
|
||||||
$r3$.ΔelementHostClassProp(0, ctx.myBarClass);
|
$r3$.ɵɵelementHostClassProp(0, ctx.myBarClass);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
…
|
…
|
||||||
@ -1280,15 +1280,15 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function MyComponent_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔallocHostVars(2);
|
$r3$.ɵɵallocHostVars(2);
|
||||||
$r3$.ΔelementHostAttrs($_c0$);
|
$r3$.ɵɵelementHostAttrs($_c0$);
|
||||||
$r3$.ΔelementHostStyling(null, null, $r3$.ΔdefaultStyleSanitizer);
|
$r3$.ɵɵelementHostStyling(null, null, $r3$.ɵɵdefaultStyleSanitizer);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.id), null, true);
|
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind(ctx.id), null, true);
|
||||||
$r3$.ΔelementProperty(elIndex, "title", $r3$.Δbind(ctx.title), null, true);
|
$r3$.ɵɵelementProperty(elIndex, "title", $r3$.ɵɵbind(ctx.title), null, true);
|
||||||
$r3$.ΔelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
$r3$.ɵɵelementHostStylingMap(ctx.myClass, ctx.myStyle);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -1327,15 +1327,15 @@ describe('compiler compliance: styling', () => {
|
|||||||
…
|
…
|
||||||
hostBindings: function WidthDirective_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function WidthDirective_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.ΔallocHostVars(2);
|
$r3$.ɵɵallocHostVars(2);
|
||||||
$r3$.ΔelementHostStyling($_c0$, $_c1$);
|
$r3$.ɵɵelementHostStyling($_c0$, $_c1$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.id), null, true);
|
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind(ctx.id), null, true);
|
||||||
$r3$.ΔelementProperty(elIndex, "title", $r3$.Δbind(ctx.title), null, true);
|
$r3$.ɵɵelementProperty(elIndex, "title", $r3$.ɵɵbind(ctx.title), null, true);
|
||||||
$r3$.ΔelementHostStyleProp(0, ctx.myWidth);
|
$r3$.ɵɵelementHostStyleProp(0, ctx.myWidth);
|
||||||
$r3$.ΔelementHostClassProp(0, ctx.myFooClass);
|
$r3$.ɵɵelementHostClassProp(0, ctx.myFooClass);
|
||||||
$r3$.ΔelementHostStylingApply();
|
$r3$.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -56,65 +56,65 @@ describe('compiler compliance: template', () => {
|
|||||||
function MyComponent_ul_0_li_1_div_1_Template(rf, ctx) {
|
function MyComponent_ul_0_li_1_div_1_Template(rf, ctx) {
|
||||||
|
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
const $s$ = $i0$.ΔgetCurrentView();
|
const $s$ = $i0$.ɵɵgetCurrentView();
|
||||||
$i0$.ΔelementStart(0, "div", $c2$);
|
$i0$.ɵɵelementStart(0, "div", $c2$);
|
||||||
$i0$.Δlistener("click", function MyComponent_ul_0_li_1_div_1_Template_div_click_0_listener($event){
|
$i0$.ɵɵlistener("click", function MyComponent_ul_0_li_1_div_1_Template_div_click_0_listener($event){
|
||||||
$i0$.ΔrestoreView($s$);
|
$i0$.ɵɵrestoreView($s$);
|
||||||
const $inner$ = ctx.$implicit;
|
const $inner$ = ctx.$implicit;
|
||||||
const $middle$ = $i0$.ΔnextContext().$implicit;
|
const $middle$ = $i0$.ɵɵnextContext().$implicit;
|
||||||
const $outer$ = $i0$.ΔnextContext().$implicit;
|
const $outer$ = $i0$.ɵɵnextContext().$implicit;
|
||||||
const $myComp$ = $i0$.ΔnextContext();
|
const $myComp$ = $i0$.ɵɵnextContext();
|
||||||
return $myComp$.onClick($outer$, $middle$, $inner$);
|
return $myComp$.onClick($outer$, $middle$, $inner$);
|
||||||
});
|
});
|
||||||
$i0$.Δtext(1);
|
$i0$.ɵɵtext(1);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $inner1$ = ctx.$implicit;
|
const $inner1$ = ctx.$implicit;
|
||||||
const $middle1$ = $i0$.ΔnextContext().$implicit;
|
const $middle1$ = $i0$.ɵɵnextContext().$implicit;
|
||||||
const $outer1$ = $i0$.ΔnextContext().$implicit;
|
const $outer1$ = $i0$.ɵɵnextContext().$implicit;
|
||||||
const $myComp1$ = $i0$.ΔnextContext();
|
const $myComp1$ = $i0$.ɵɵnextContext();
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "title", $i0$.Δbind($myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component)));
|
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵbind($myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component)));
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " "));
|
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function MyComponent_ul_0_li_1_Template(rf, ctx) {
|
function MyComponent_ul_0_li_1_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "li");
|
$i0$.ɵɵelementStart(0, "li");
|
||||||
$i0$.Δtemplate(1, MyComponent_ul_0_li_1_div_1_Template, 2, 2, "div", $c1$);
|
$i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_div_1_Template, 2, 2, "div", $c1$);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $myComp2$ = $i0$.ΔnextContext(2);
|
const $myComp2$ = $i0$.ɵɵnextContext(2);
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($myComp2$.items));
|
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($myComp2$.items));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function MyComponent_ul_0_Template(rf, ctx) {
|
function MyComponent_ul_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "ul");
|
$i0$.ɵɵelementStart(0, "ul");
|
||||||
$i0$.Δtemplate(1, MyComponent_ul_0_li_1_Template, 2, 1, "li", $c0$);
|
$i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_Template, 2, 1, "li", $c0$);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $outer2$ = ctx.$implicit;
|
const $outer2$ = ctx.$implicit;
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($outer2$.items));
|
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($outer2$.items));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ...
|
// ...
|
||||||
template:function MyComponent_Template(rf, ctx){
|
template:function MyComponent_Template(rf, ctx){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_ul_0_Template, 2, 1, "ul", $c0$);
|
$i0$.ɵɵtemplate(0, MyComponent_ul_0_Template, 2, 1, "ul", $c0$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -152,26 +152,26 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
function MyComponent_div_0_Template(rf, ctx) {
|
function MyComponent_div_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
const $s$ = $r3$.ΔgetCurrentView();
|
const $s$ = $r3$.ɵɵgetCurrentView();
|
||||||
$r3$.ΔelementStart(0, "div", $e_attrs$);
|
$r3$.ɵɵelementStart(0, "div", $e_attrs$);
|
||||||
$r3$.Δlistener("click", function MyComponent_div_0_Template_div_click_0_listener($event) {
|
$r3$.ɵɵlistener("click", function MyComponent_div_0_Template_div_click_0_listener($event) {
|
||||||
$r3$.ΔrestoreView($s$);
|
$r3$.ɵɵrestoreView($s$);
|
||||||
const $d$ = ctx.$implicit;
|
const $d$ = ctx.$implicit;
|
||||||
const $i$ = ctx.index;
|
const $i$ = ctx.index;
|
||||||
const $comp$ = $r3$.ΔnextContext();
|
const $comp$ = $r3$.ɵɵnextContext();
|
||||||
return $comp$._handleClick($d$, $i$);
|
return $comp$._handleClick($d$, $i$);
|
||||||
});
|
});
|
||||||
$r3$.ΔelementEnd();
|
$r3$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ...
|
// ...
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$r3$.Δtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $t0_attrs$);
|
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $t0_attrs$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$r3$.Δselect(0);
|
$r3$.ɵɵselect(0);
|
||||||
$r3$.ΔelementProperty(0, "ngForOf", $r3$.Δbind(ctx._data));
|
$r3$.ɵɵelementProperty(0, "ngForOf", $r3$.ɵɵbind(ctx._data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -207,25 +207,25 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
function MyComponent_span_0_Template(rf, ctx) {
|
function MyComponent_span_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "span");
|
$i0$.ɵɵelementStart(0, "span");
|
||||||
$i0$.Δtext(1);
|
$i0$.ɵɵtext(1);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $item$ = ctx.$implicit;
|
const $item$ = ctx.$implicit;
|
||||||
const $i$ = ctx.index;
|
const $i$ = ctx.index;
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation2(" ", $i$, " - ", $item$, " "));
|
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation2(" ", $i$, " - ", $item$, " "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ...
|
// ...
|
||||||
template:function MyComponent_Template(rf, ctx){
|
template:function MyComponent_Template(rf, ctx){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_span_0_Template, 2, 2, "span", _c0);
|
$i0$.ɵɵtemplate(0, MyComponent_span_0_Template, 2, 2, "span", _c0);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -263,40 +263,40 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
function MyComponent_div_0_span_1_Template(rf, ctx) {
|
function MyComponent_div_0_span_1_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "span");
|
$i0$.ɵɵelementStart(0, "span");
|
||||||
$i0$.Δtext(1);
|
$i0$.ɵɵtext(1);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $div$ = $i0$.ΔnextContext();
|
const $div$ = $i0$.ɵɵnextContext();
|
||||||
const $i$ = $div$.index;
|
const $i$ = $div$.index;
|
||||||
const $item$ = $div$.$implicit;
|
const $item$ = $div$.$implicit;
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation2(" ", $i$, " - ", $item$, " "));
|
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation2(" ", $i$, " - ", $item$, " "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function MyComponent_div_0_Template(rf, ctx) {
|
function MyComponent_div_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
$i0$.Δtemplate(1, MyComponent_div_0_span_1_Template, 2, 2, "span", $c1$);
|
$i0$.ɵɵtemplate(1, MyComponent_div_0_span_1_Template, 2, 2, "span", $c1$);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $app$ = $i0$.ΔnextContext();
|
const $app$ = $i0$.ɵɵnextContext();
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔelementProperty(1, "ngIf", $i0$.Δbind($app$.showing));
|
$i0$.ɵɵelementProperty(1, "ngIf", $i0$.ɵɵbind($app$.showing));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
template:function MyComponent_Template(rf, ctx){
|
template:function MyComponent_Template(rf, ctx){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -335,51 +335,51 @@ describe('compiler compliance: template', () => {
|
|||||||
const $c0$ = [${AttributeMarker.Template}, "ngFor", "ngForOf"];
|
const $c0$ = [${AttributeMarker.Template}, "ngFor", "ngForOf"];
|
||||||
function MyComponent_div_0_div_1_div_1_Template(rf, ctx) {
|
function MyComponent_div_0_div_1_div_1_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
$i0$.Δtext(1);
|
$i0$.ɵɵtext(1);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $middle$ = $i0$.ΔnextContext().$implicit;
|
const $middle$ = $i0$.ɵɵnextContext().$implicit;
|
||||||
const $myComp$ = $i0$.ΔnextContext(2);
|
const $myComp$ = $i0$.ɵɵnextContext(2);
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation2(" ", $middle$.value, " - ", $myComp$.name, " "));
|
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation2(" ", $middle$.value, " - ", $myComp$.name, " "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function MyComponent_div_0_div_1_Template(rf, ctx) {
|
function MyComponent_div_0_div_1_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
$i0$.Δtemplate(1, MyComponent_div_0_div_1_div_1_Template, 2, 2, "div", $c0$);
|
$i0$.ɵɵtemplate(1, MyComponent_div_0_div_1_div_1_Template, 2, 2, "div", $c0$);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $middle$ = ctx.$implicit;
|
const $middle$ = ctx.$implicit;
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($middle$.items));
|
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($middle$.items));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function MyComponent_div_0_Template(rf, ctx) {
|
function MyComponent_div_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.ΔelementStart(0, "div");
|
$i0$.ɵɵelementStart(0, "div");
|
||||||
$i0$.Δtemplate(1, MyComponent_div_0_div_1_Template, 2, 1, "div", $c0$);
|
$i0$.ɵɵtemplate(1, MyComponent_div_0_div_1_Template, 2, 1, "div", $c0$);
|
||||||
$i0$.ΔelementEnd();
|
$i0$.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
const $outer$ = ctx.$implicit;
|
const $outer$ = ctx.$implicit;
|
||||||
$r3$.Δselect(1);
|
$r3$.ɵɵselect(1);
|
||||||
$i0$.ΔelementProperty(1, "ngForOf", $i0$.Δbind($outer$.items));
|
$i0$.ɵɵelementProperty(1, "ngForOf", $i0$.ɵɵbind($outer$.items));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ...
|
// ...
|
||||||
template:function MyComponent_Template(rf, ctx){
|
template:function MyComponent_Template(rf, ctx){
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 2, 1, "div", $c0$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "ngForOf", $i0$.Δbind(ctx.items));
|
$i0$.ɵɵelementProperty(0, "ngForOf", $i0$.ɵɵbind(ctx.items));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
function MyComponent_ng_template_0_Template(rf, ctx) {
|
function MyComponent_ng_template_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtext(0, " some-content ");
|
$i0$.ɵɵtext(0, " some-content ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,11 +422,11 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $c0$);
|
$i0$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", $c0$);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "boundAttr", $i0$.Δbind(ctx.b));
|
$i0$.ɵɵelementProperty(0, "boundAttr", $i0$.ɵɵbind(ctx.b));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
function MyComponent_ng_template_0_Template(rf, ctx) {
|
function MyComponent_ng_template_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtext(0, "some-content");
|
$i0$.ɵɵtext(0, "some-content");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,7 +467,7 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", null, $t0_refs$, $i0$.ΔtemplateRefExtractor);
|
$i0$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", null, $t0_refs$, $i0$.ɵɵtemplateRefExtractor);
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -504,8 +504,8 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $t0_attrs$);
|
$i0$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", $t0_attrs$);
|
||||||
$i0$.Δlistener("outDirective", function MyComponent_Template_ng_template_outDirective_0_listener($event) { return $event.doSth(); });
|
$i0$.ɵɵlistener("outDirective", function MyComponent_Template_ng_template_outDirective_0_listener($event) { return $event.doSth(); });
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
@ -657,7 +657,7 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
function MyComponent_div_0_Template(rf, ctx) {
|
function MyComponent_div_0_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δelement(0, "div");
|
$i0$.ɵɵelement(0, "div");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -665,11 +665,11 @@ describe('compiler compliance: template', () => {
|
|||||||
|
|
||||||
template: function MyComponent_Template(rf, ctx) {
|
template: function MyComponent_Template(rf, ctx) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
$i0$.Δtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0$);
|
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", $c0$);
|
||||||
$i0$.Δpipe(1, "pipe");
|
$i0$.ɵɵpipe(1, "pipe");
|
||||||
} if (rf & 2) {
|
} if (rf & 2) {
|
||||||
$i0$.Δselect(0);
|
$i0$.ɵɵselect(0);
|
||||||
$i0$.ΔelementProperty(0, "ngIf", $i0$.Δbind($i0$.ΔpipeBind1(1, 1, ctx.val)));
|
$i0$.ɵɵelementProperty(0, "ngIf", $i0$.ɵɵbind($i0$.ɵɵpipeBind1(1, 1, ctx.val)));
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
|
@ -2075,7 +2075,7 @@ describe('ngc transformer command-line', () => {
|
|||||||
})
|
})
|
||||||
export class Service {}
|
export class Service {}
|
||||||
`);
|
`);
|
||||||
expect(source).toMatch(/ngInjectableDef = .+\.ΔdefineInjectable\(/);
|
expect(source).toMatch(/ngInjectableDef = .+\.ɵɵdefineInjectable\(/);
|
||||||
expect(source).toMatch(/ngInjectableDef.*token: Service/);
|
expect(source).toMatch(/ngInjectableDef.*token: Service/);
|
||||||
expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/);
|
expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/);
|
||||||
});
|
});
|
||||||
@ -2131,7 +2131,7 @@ describe('ngc transformer command-line', () => {
|
|||||||
})
|
})
|
||||||
export class Service {}
|
export class Service {}
|
||||||
`);
|
`);
|
||||||
expect(source).toMatch(/ngInjectableDef.*return ..\.Δinject\(Existing\)/);
|
expect(source).toMatch(/ngInjectableDef.*return ..\.ɵɵinject\(Existing\)/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('compiles a useFactory InjectableDef with optional dep', () => {
|
it('compiles a useFactory InjectableDef with optional dep', () => {
|
||||||
@ -2151,7 +2151,7 @@ describe('ngc transformer command-line', () => {
|
|||||||
constructor(e: Existing|null) {}
|
constructor(e: Existing|null) {}
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.Δinject\(Existing, 8\)/);
|
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.ɵɵinject\(Existing, 8\)/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('compiles a useFactory InjectableDef with skip-self dep', () => {
|
it('compiles a useFactory InjectableDef with skip-self dep', () => {
|
||||||
@ -2171,7 +2171,7 @@ describe('ngc transformer command-line', () => {
|
|||||||
constructor(e: Existing) {}
|
constructor(e: Existing) {}
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.Δinject\(Existing, 4\)/);
|
expect(source).toMatch(/ngInjectableDef.*return ..\(..\.ɵɵinject\(Existing, 4\)/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('compiles a service that depends on a token', () => {
|
it('compiles a service that depends on a token', () => {
|
||||||
@ -2188,7 +2188,7 @@ describe('ngc transformer command-line', () => {
|
|||||||
constructor(@Inject(TOKEN) value: boolean) {}
|
constructor(@Inject(TOKEN) value: boolean) {}
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
expect(source).toMatch(/ngInjectableDef = .+\.ΔdefineInjectable\(/);
|
expect(source).toMatch(/ngInjectableDef = .+\.ɵɵdefineInjectable\(/);
|
||||||
expect(source).toMatch(/ngInjectableDef.*token: Service/);
|
expect(source).toMatch(/ngInjectableDef.*token: Service/);
|
||||||
expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/);
|
expect(source).toMatch(/ngInjectableDef.*providedIn: .+\.Module/);
|
||||||
});
|
});
|
||||||
@ -2215,7 +2215,7 @@ describe('ngc transformer command-line', () => {
|
|||||||
constructor(@Inject(TOKEN) token: any) {}
|
constructor(@Inject(TOKEN) token: any) {}
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
expect(source).toMatch(/new Service\(i0\.Δinject\(exports\.TOKEN\)\);/);
|
expect(source).toMatch(/new Service\(i0\.ɵɵinject\(exports\.TOKEN\)\);/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ export function forwardRef<T>(fn: () => T): T {
|
|||||||
|
|
||||||
export interface SimpleChanges { [propName: string]: any; }
|
export interface SimpleChanges { [propName: string]: any; }
|
||||||
|
|
||||||
export type ΔNgModuleDefWithMeta<ModuleT, DeclarationsT, ImportsT, ExportsT> = any;
|
export type ɵɵNgModuleDefWithMeta<ModuleT, DeclarationsT, ImportsT, ExportsT> = any;
|
||||||
export type ΔDirectiveDefWithMeta<DirT, SelectorT, ExportAsT, InputsT, OutputsT, QueriesT> = any;
|
export type ɵɵDirectiveDefWithMeta<DirT, SelectorT, ExportAsT, InputsT, OutputsT, QueriesT> = any;
|
||||||
|
|
||||||
export enum ViewEncapsulation {
|
export enum ViewEncapsulation {
|
||||||
Emulated = 0,
|
Emulated = 0,
|
||||||
|
@ -18,12 +18,12 @@ const varRegExp = (name: string): RegExp => new RegExp(`var \\w+ = \\[\"${name}\
|
|||||||
|
|
||||||
const viewQueryRegExp = (descend: boolean, ref?: string): RegExp => {
|
const viewQueryRegExp = (descend: boolean, ref?: string): RegExp => {
|
||||||
const maybeRef = ref ? `${ref}` : `null`;
|
const maybeRef = ref ? `${ref}` : `null`;
|
||||||
return new RegExp(`i0\\.ΔviewQuery\\(\\w+, ${descend}, ${maybeRef}\\)`);
|
return new RegExp(`i0\\.ɵɵviewQuery\\(\\w+, ${descend}, ${maybeRef}\\)`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const contentQueryRegExp = (predicate: string, descend: boolean, ref?: string): RegExp => {
|
const contentQueryRegExp = (predicate: string, descend: boolean, ref?: string): RegExp => {
|
||||||
const maybeRef = ref ? `${ref}` : `null`;
|
const maybeRef = ref ? `${ref}` : `null`;
|
||||||
return new RegExp(`i0\\.ΔcontentQuery\\(dirIndex, ${predicate}, ${descend}, ${maybeRef}\\)`);
|
return new RegExp(`i0\\.ɵɵcontentQuery\\(dirIndex, ${predicate}, ${descend}, ${maybeRef}\\)`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const setClassMetadataRegExp = (expectedType: string): RegExp =>
|
const setClassMetadataRegExp = (expectedType: string): RegExp =>
|
||||||
@ -56,8 +56,8 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(jsContents).toContain('Service.ngInjectableDef =');
|
expect(jsContents).toContain('Service.ngInjectableDef =');
|
||||||
expect(jsContents).not.toContain('__decorate');
|
expect(jsContents).not.toContain('__decorate');
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Dep>;');
|
expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef<Dep>;');
|
||||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef<Service>;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Injectables with a generic service', () => {
|
it('should compile Injectables with a generic service', () => {
|
||||||
@ -75,7 +75,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('Store.ngInjectableDef =');
|
expect(jsContents).toContain('Store.ngInjectableDef =');
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Store<any>>;');
|
expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef<Store<any>>;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Injectables with providedIn without errors', () => {
|
it('should compile Injectables with providedIn without errors', () => {
|
||||||
@ -99,11 +99,11 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(jsContents).toContain('Dep.ngInjectableDef =');
|
expect(jsContents).toContain('Dep.ngInjectableDef =');
|
||||||
expect(jsContents).toContain('Service.ngInjectableDef =');
|
expect(jsContents).toContain('Service.ngInjectableDef =');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain('return new (t || Service)(i0.Δinject(Dep)); }, providedIn: \'root\' });');
|
.toContain('return new (t || Service)(i0.ɵɵinject(Dep)); }, providedIn: \'root\' });');
|
||||||
expect(jsContents).not.toContain('__decorate');
|
expect(jsContents).not.toContain('__decorate');
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Dep>;');
|
expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef<Dep>;');
|
||||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef<Service>;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Injectables with providedIn and factory without errors', () => {
|
it('should compile Injectables with providedIn and factory without errors', () => {
|
||||||
@ -128,7 +128,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(jsContents).toContain('return r; }, providedIn: \'root\' });');
|
expect(jsContents).toContain('return r; }, providedIn: \'root\' });');
|
||||||
expect(jsContents).not.toContain('__decorate');
|
expect(jsContents).not.toContain('__decorate');
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef<Service>;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Injectables with providedIn and factory with deps without errors', () => {
|
it('should compile Injectables with providedIn and factory with deps without errors', () => {
|
||||||
@ -151,13 +151,13 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('Service.ngInjectableDef =');
|
expect(jsContents).toContain('Service.ngInjectableDef =');
|
||||||
expect(jsContents).toContain('factory: function Service_Factory(t) { var r = null; if (t) {');
|
expect(jsContents).toContain('factory: function Service_Factory(t) { var r = null; if (t) {');
|
||||||
expect(jsContents).toContain('(r = new t(i0.Δinject(Dep)));');
|
expect(jsContents).toContain('(r = new t(i0.ɵɵinject(Dep)));');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain('(r = (function (dep) { return new Service(dep); })(i0.Δinject(Dep)));');
|
.toContain('(r = (function (dep) { return new Service(dep); })(i0.ɵɵinject(Dep)));');
|
||||||
expect(jsContents).toContain('return r; }, providedIn: \'root\' });');
|
expect(jsContents).toContain('return r; }, providedIn: \'root\' });');
|
||||||
expect(jsContents).not.toContain('__decorate');
|
expect(jsContents).not.toContain('__decorate');
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents).toContain('static ngInjectableDef: i0.ΔInjectableDef<Service>;');
|
expect(dtsContents).toContain('static ngInjectableDef: i0.ɵɵInjectableDef<Service>;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile @Injectable with an @Optional dependency', () => {
|
it('should compile @Injectable with an @Optional dependency', () => {
|
||||||
@ -193,13 +193,13 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent');
|
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ɵɵdefineComponent');
|
||||||
expect(jsContents).not.toContain('__decorate');
|
expect(jsContents).not.toContain('__decorate');
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
'static ngComponentDef: i0.ɵɵComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Components (dynamic inline template) without errors', () => {
|
it('should compile Components (dynamic inline template) without errors', () => {
|
||||||
@ -217,13 +217,13 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent');
|
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ɵɵdefineComponent');
|
||||||
expect(jsContents).not.toContain('__decorate');
|
expect(jsContents).not.toContain('__decorate');
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
'static ngComponentDef: i0.ɵɵComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Components (function call inline template) without errors', () => {
|
it('should compile Components (function call inline template) without errors', () => {
|
||||||
@ -244,13 +244,13 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ΔdefineComponent');
|
expect(jsContents).toContain('TestCmp.ngComponentDef = i0.ɵɵdefineComponent');
|
||||||
expect(jsContents).not.toContain('__decorate');
|
expect(jsContents).not.toContain('__decorate');
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
'static ngComponentDef: i0.ɵɵComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Components (external template) without errors', () => {
|
it('should compile Components (external template) without errors', () => {
|
||||||
@ -351,13 +351,13 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('TestBase.ngBaseDef = i0.ΔdefineBase');
|
expect(jsContents).toContain('TestBase.ngBaseDef = i0.ɵɵdefineBase');
|
||||||
expect(jsContents).toContain('TestComponent.ngComponentDef = i0.ΔdefineComponent');
|
expect(jsContents).toContain('TestComponent.ngComponentDef = i0.ɵɵdefineComponent');
|
||||||
expect(jsContents).toContain('TestDirective.ngDirectiveDef = i0.ΔdefineDirective');
|
expect(jsContents).toContain('TestDirective.ngDirectiveDef = i0.ɵɵdefineDirective');
|
||||||
expect(jsContents).toContain('TestPipe.ngPipeDef = i0.ΔdefinePipe');
|
expect(jsContents).toContain('TestPipe.ngPipeDef = i0.ɵɵdefinePipe');
|
||||||
expect(jsContents).toContain('TestInjectable.ngInjectableDef = i0.ΔdefineInjectable');
|
expect(jsContents).toContain('TestInjectable.ngInjectableDef = i0.ɵɵdefineInjectable');
|
||||||
expect(jsContents).toContain('MyModule.ngModuleDef = i0.ΔdefineNgModule');
|
expect(jsContents).toContain('MyModule.ngModuleDef = i0.ɵɵdefineNgModule');
|
||||||
expect(jsContents).toContain('MyModule.ngInjectorDef = i0.ΔdefineInjector');
|
expect(jsContents).toContain('MyModule.ngInjectorDef = i0.ɵɵdefineInjector');
|
||||||
expect(jsContents).toContain('inputs: { input: "input" }');
|
expect(jsContents).toContain('inputs: { input: "input" }');
|
||||||
expect(jsContents).toContain('outputs: { output: "output" }');
|
expect(jsContents).toContain('outputs: { output: "output" }');
|
||||||
});
|
});
|
||||||
@ -442,25 +442,26 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule, bootstrap: [TestCmp] });');
|
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain('/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { declarations: [TestCmp] });');
|
.toContain('i0.ɵɵdefineNgModule({ type: TestModule, bootstrap: [TestCmp] });');
|
||||||
|
expect(jsContents)
|
||||||
|
.toContain('/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { declarations: [TestCmp] });');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'i0.ΔdefineInjector({ factory: ' +
|
'i0.ɵɵdefineInjector({ factory: ' +
|
||||||
'function TestModule_Factory(t) { return new (t || TestModule)(); } });');
|
'function TestModule_Factory(t) { return new (t || TestModule)(); } });');
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngComponentDef: i0.ΔComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
'static ngComponentDef: i0.ɵɵComponentDefWithMeta<TestCmp, "test-cmp", never, {}, {}, never>');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], never, never>');
|
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, [typeof TestCmp], never, never>');
|
||||||
expect(dtsContents).not.toContain('__decorate');
|
expect(dtsContents).not.toContain('__decorate');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not emit a ΔsetNgModuleScope call when no scope metadata is present', () => {
|
it('should not emit a ɵɵsetNgModuleScope call when no scope metadata is present', () => {
|
||||||
env.tsconfig();
|
env.tsconfig();
|
||||||
env.write('test.ts', `
|
env.write('test.ts', `
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
@ -472,8 +473,8 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||||
expect(jsContents).not.toContain('ΔsetNgModuleScope(TestModule,');
|
expect(jsContents).not.toContain('ɵɵsetNgModuleScope(TestModule,');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter out directives and pipes from module exports in the injector def', () => {
|
it('should filter out directives and pipes from module exports in the injector def', () => {
|
||||||
@ -514,15 +515,15 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
export class Comp {}
|
export class Comp {}
|
||||||
`);
|
`);
|
||||||
env.write('node_modules/@angular/router/index.d.ts', `
|
env.write('node_modules/@angular/router/index.d.ts', `
|
||||||
import {ΔComponentDefWithMeta, ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵComponentDefWithMeta, ModuleWithProviders, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export declare class RouterComp {
|
export declare class RouterComp {
|
||||||
static ngComponentDef: ΔComponentDefWithMeta<RouterComp, "lib-cmp", never, {}, {}, never>
|
static ngComponentDef: ɵɵComponentDefWithMeta<RouterComp, "lib-cmp", never, {}, {}, never>
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class RouterModule {
|
declare class RouterModule {
|
||||||
static forRoot(): ModuleWithProviders<RouterModule>;
|
static forRoot(): ModuleWithProviders<RouterModule>;
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, [typeof RouterComp], never, [typeof RouterComp]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<RouterModule, [typeof RouterComp], never, [typeof RouterComp]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@ -531,7 +532,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'i0.ΔdefineInjector({ factory: function TestModule_Factory(t) ' +
|
'i0.ɵɵdefineInjector({ factory: function TestModule_Factory(t) ' +
|
||||||
'{ return new (t || TestModule)(); }, imports: [[OtherModule, RouterModule.forRoot()],' +
|
'{ return new (t || TestModule)(); }, imports: [[OtherModule, RouterModule.forRoot()],' +
|
||||||
'\n OtherModule,\n RouterModule] });');
|
'\n OtherModule,\n RouterModule] });');
|
||||||
});
|
});
|
||||||
@ -563,18 +564,18 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
`TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` +
|
`TestModule.ngInjectorDef = i0.ɵɵdefineInjector({ factory: ` +
|
||||||
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
||||||
`Token, useValue: 'test' }], imports: [[OtherModule]] });`);
|
`Token, useValue: 'test' }], imports: [[OtherModule]] });`);
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||||
expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef');
|
expect(dtsContents).toContain('static ngInjectorDef: i0.ɵɵInjectorDef');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile NgModules with factory providers without errors', () => {
|
it('should compile NgModules with factory providers without errors', () => {
|
||||||
@ -604,18 +605,18 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
`TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` +
|
`TestModule.ngInjectorDef = i0.ɵɵdefineInjector({ factory: ` +
|
||||||
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
||||||
`Token, useFactory: function () { return new Token(); } }], imports: [[OtherModule]] });`);
|
`Token, useFactory: function () { return new Token(); } }], imports: [[OtherModule]] });`);
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||||
expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef');
|
expect(dtsContents).toContain('static ngInjectorDef: i0.ɵɵInjectorDef');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile NgModules with factory providers and deps without errors', () => {
|
it('should compile NgModules with factory providers and deps without errors', () => {
|
||||||
@ -649,18 +650,18 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
`TestModule.ngInjectorDef = i0.ΔdefineInjector({ factory: ` +
|
`TestModule.ngInjectorDef = i0.ɵɵdefineInjector({ factory: ` +
|
||||||
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
`function TestModule_Factory(t) { return new (t || TestModule)(); }, providers: [{ provide: ` +
|
||||||
`Token, useFactory: function (dep) { return new Token(dep); }, deps: [Dep] }], imports: [[OtherModule]] });`);
|
`Token, useFactory: function (dep) { return new Token(dep); }, deps: [Dep] }], imports: [[OtherModule]] });`);
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, [typeof TestCmp], [typeof OtherModule], never>');
|
||||||
expect(dtsContents).toContain('static ngInjectorDef: i0.ΔInjectorDef');
|
expect(dtsContents).toContain('static ngInjectorDef: i0.ɵɵInjectorDef');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile NgModules with references to local components', () => {
|
it('should compile NgModules with references to local components', () => {
|
||||||
@ -821,9 +822,9 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
|
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'TestPipe.ngPipeDef = i0.ΔdefinePipe({ name: "test-pipe", type: TestPipe, ' +
|
'TestPipe.ngPipeDef = i0.ɵɵdefinePipe({ name: "test-pipe", type: TestPipe, ' +
|
||||||
'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: false })');
|
'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: false })');
|
||||||
expect(dtsContents).toContain('static ngPipeDef: i0.ΔPipeDefWithMeta<TestPipe, "test-pipe">;');
|
expect(dtsContents).toContain('static ngPipeDef: i0.ɵɵPipeDefWithMeta<TestPipe, "test-pipe">;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile pure Pipes without errors', () => {
|
it('should compile pure Pipes without errors', () => {
|
||||||
@ -844,9 +845,9 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
|
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'TestPipe.ngPipeDef = i0.ΔdefinePipe({ name: "test-pipe", type: TestPipe, ' +
|
'TestPipe.ngPipeDef = i0.ɵɵdefinePipe({ name: "test-pipe", type: TestPipe, ' +
|
||||||
'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: true })');
|
'factory: function TestPipe_Factory(t) { return new (t || TestPipe)(); }, pure: true })');
|
||||||
expect(dtsContents).toContain('static ngPipeDef: i0.ΔPipeDefWithMeta<TestPipe, "test-pipe">;');
|
expect(dtsContents).toContain('static ngPipeDef: i0.ɵɵPipeDefWithMeta<TestPipe, "test-pipe">;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Pipes with dependencies', () => {
|
it('should compile Pipes with dependencies', () => {
|
||||||
@ -868,7 +869,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('return new (t || TestPipe)(i0.ΔdirectiveInject(Dep));');
|
expect(jsContents).toContain('return new (t || TestPipe)(i0.ɵɵdirectiveInject(Dep));');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile Pipes with generic types', () => {
|
it('should compile Pipes with generic types', () => {
|
||||||
@ -888,7 +889,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(jsContents).toContain('TestPipe.ngPipeDef =');
|
expect(jsContents).toContain('TestPipe.ngPipeDef =');
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain('static ngPipeDef: i0.ΔPipeDefWithMeta<TestPipe<any>, "test-pipe">;');
|
.toContain('static ngPipeDef: i0.ɵɵPipeDefWithMeta<TestPipe<any>, "test-pipe">;');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should include @Pipes in @NgModule scopes', () => {
|
it('should include @Pipes in @NgModule scopes', () => {
|
||||||
@ -914,7 +915,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'i0.ΔNgModuleDefWithMeta<TestModule, [typeof TestPipe, typeof TestCmp], never, never>');
|
'i0.ɵɵNgModuleDefWithMeta<TestModule, [typeof TestPipe, typeof TestCmp], never, never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('empty and missing selectors', () => {
|
describe('empty and missing selectors', () => {
|
||||||
@ -1029,7 +1030,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(dtsContents).toContain('ComponentDefWithMeta<TestCmp');
|
expect(dtsContents).toContain('ComponentDefWithMeta<TestCmp');
|
||||||
expect(dtsContents).toContain('DirectiveDefWithMeta<TestDir');
|
expect(dtsContents).toContain('DirectiveDefWithMeta<TestDir');
|
||||||
expect(dtsContents).toContain('PipeDefWithMeta<TestPipe');
|
expect(dtsContents).toContain('PipeDefWithMeta<TestPipe');
|
||||||
expect(dtsContents).toContain('ΔNgModuleDefWithMeta<TestNgModule');
|
expect(dtsContents).toContain('ɵɵNgModuleDefWithMeta<TestNgModule');
|
||||||
|
|
||||||
// Validate that each class's .d.ts declaration also has an injectable definition.
|
// Validate that each class's .d.ts declaration also has an injectable definition.
|
||||||
expect(dtsContents).toContain('InjectableDef<TestCmp');
|
expect(dtsContents).toContain('InjectableDef<TestCmp');
|
||||||
@ -1254,7 +1255,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
env.driveMain();
|
env.driveMain();
|
||||||
expect(env.getContents('test.js')).toContain('i0.ΔpureFunction1');
|
expect(env.getContents('test.js')).toContain('i0.ɵɵpureFunction1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should compile array literals inside function arguments', () => {
|
it('should compile array literals inside function arguments', () => {
|
||||||
@ -1276,7 +1277,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
env.driveMain();
|
env.driveMain();
|
||||||
expect(env.getContents('test.js')).toContain('i0.ΔpureFunction1');
|
expect(env.getContents('test.js')).toContain('i0.ɵɵpureFunction1');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1292,11 +1293,11 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
env.write('node_modules/router/index.d.ts', `
|
env.write('node_modules/router/index.d.ts', `
|
||||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ModuleWithProviders, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
declare class RouterModule {
|
declare class RouterModule {
|
||||||
static forRoot(): ModuleWithProviders<RouterModule>;
|
static forRoot(): ModuleWithProviders<RouterModule>;
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@ -1308,7 +1309,8 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain('i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
.toContain(
|
||||||
|
'i0.ɵɵNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should extract the generic type if it is provided as qualified type name', () => {
|
it('should extract the generic type if it is provided as qualified type name', () => {
|
||||||
@ -1333,9 +1335,9 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
env.write('node_modules/router/internal.d.ts', `
|
env.write('node_modules/router/internal.d.ts', `
|
||||||
import {ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
export declare class InternalRouterModule {
|
export declare class InternalRouterModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<InternalRouterModule, never, never, never>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<InternalRouterModule, never, never, never>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@ -1348,18 +1350,18 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.InternalRouterModule], never>');
|
'i0.ɵɵNgModuleDefWithMeta<TestModule, never, [typeof i1.InternalRouterModule], never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not reference a constant with a ModuleWithProviders value in ngModuleDef imports',
|
it('should not reference a constant with a ModuleWithProviders value in ngModuleDef imports',
|
||||||
() => {
|
() => {
|
||||||
env.tsconfig();
|
env.tsconfig();
|
||||||
env.write('dep.d.ts', `
|
env.write('dep.d.ts', `
|
||||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta as ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ModuleWithProviders, ɵɵNgModuleDefWithMeta as ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export declare class DepModule {
|
export declare class DepModule {
|
||||||
static forRoot(arg1: any, arg2: any): ModuleWithProviders<DepModule>;
|
static forRoot(arg1: any, arg2: any): ModuleWithProviders<DepModule>;
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<DepModule, never, never, never>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<DepModule, never, never, never>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
env.write('test.ts', `
|
env.write('test.ts', `
|
||||||
@ -1394,13 +1396,13 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
env.write('node_modules/router/index.d.ts', `
|
env.write('node_modules/router/index.d.ts', `
|
||||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ModuleWithProviders, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export interface MyType extends ModuleWithProviders {}
|
export interface MyType extends ModuleWithProviders {}
|
||||||
|
|
||||||
declare class RouterModule {
|
declare class RouterModule {
|
||||||
static forRoot(): (MyType)&{ngModule:RouterModule};
|
static forRoot(): (MyType)&{ngModule:RouterModule};
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@ -1413,7 +1415,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
'i0.ɵɵNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should unwrap a namespace imported ModuleWithProviders function if a generic type is provided for it',
|
it('should unwrap a namespace imported ModuleWithProviders function if a generic type is provided for it',
|
||||||
@ -1433,7 +1435,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
|
|
||||||
declare class RouterModule {
|
declare class RouterModule {
|
||||||
static forRoot(): core.ModuleWithProviders<RouterModule>;
|
static forRoot(): core.ModuleWithProviders<RouterModule>;
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@ -1446,7 +1448,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
expect(dtsContents).toContain(`import * as i1 from "router";`);
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
'i0.ɵɵNgModuleDefWithMeta<TestModule, never, [typeof i1.RouterModule], never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should inject special types according to the metadata', () => {
|
it('should inject special types according to the metadata', () => {
|
||||||
@ -1484,7 +1486,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
`factory: function FooCmp_Factory(t) { return new (t || FooCmp)(i0.ΔinjectAttribute("test"), i0.ΔdirectiveInject(i0.ChangeDetectorRef), i0.ΔdirectiveInject(i0.ElementRef), i0.ΔdirectiveInject(i0.Injector), i0.ΔdirectiveInject(i0.Renderer2), i0.ΔdirectiveInject(i0.TemplateRef), i0.ΔdirectiveInject(i0.ViewContainerRef)); }`);
|
`factory: function FooCmp_Factory(t) { return new (t || FooCmp)(i0.ɵɵinjectAttribute("test"), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); }`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should generate queries for components', () => {
|
it('should generate queries for components', () => {
|
||||||
@ -1514,9 +1516,9 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(jsContents).toMatch(varRegExp('test1'));
|
expect(jsContents).toMatch(varRegExp('test1'));
|
||||||
expect(jsContents).toMatch(varRegExp('test2'));
|
expect(jsContents).toMatch(varRegExp('test2'));
|
||||||
expect(jsContents).toMatch(varRegExp('accessor'));
|
expect(jsContents).toMatch(varRegExp('accessor'));
|
||||||
// match `i0.ΔcontentQuery(dirIndex, _c1, true, TemplateRef)`
|
// match `i0.ɵɵcontentQuery(dirIndex, _c1, true, TemplateRef)`
|
||||||
expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef'));
|
expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef'));
|
||||||
// match `i0.ΔviewQuery(_c2, true, null)`
|
// match `i0.ɵɵviewQuery(_c2, true, null)`
|
||||||
expect(jsContents).toMatch(viewQueryRegExp(true));
|
expect(jsContents).toMatch(viewQueryRegExp(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1546,10 +1548,10 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
expect(jsContents).toMatch(varRegExp('test1'));
|
expect(jsContents).toMatch(varRegExp('test1'));
|
||||||
expect(jsContents).toMatch(varRegExp('test2'));
|
expect(jsContents).toMatch(varRegExp('test2'));
|
||||||
expect(jsContents).toMatch(varRegExp('accessor'));
|
expect(jsContents).toMatch(varRegExp('accessor'));
|
||||||
// match `i0.ΔcontentQuery(dirIndex, _c1, true, TemplateRef)`
|
// match `i0.ɵɵcontentQuery(dirIndex, _c1, true, TemplateRef)`
|
||||||
expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef'));
|
expect(jsContents).toMatch(contentQueryRegExp('\\w+', true, 'TemplateRef'));
|
||||||
|
|
||||||
// match `i0.ΔviewQuery(_c2, true, null)`
|
// match `i0.ɵɵviewQuery(_c2, true, null)`
|
||||||
// Note that while ViewQuery doesn't necessarily make sense on a directive, because it doesn't
|
// Note that while ViewQuery doesn't necessarily make sense on a directive, because it doesn't
|
||||||
// have a view, we still need to handle it because a component could extend the directive.
|
// have a view, we still need to handle it because a component could extend the directive.
|
||||||
expect(jsContents).toMatch(viewQueryRegExp(true));
|
expect(jsContents).toMatch(viewQueryRegExp(true));
|
||||||
@ -1573,9 +1575,9 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
|
|
||||||
env.driveMain();
|
env.driveMain();
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
// match `i0.ΔcontentQuery(dirIndex, TemplateRef, true, null)`
|
// match `i0.ɵɵcontentQuery(dirIndex, TemplateRef, true, null)`
|
||||||
expect(jsContents).toMatch(contentQueryRegExp('TemplateRef', true));
|
expect(jsContents).toMatch(contentQueryRegExp('TemplateRef', true));
|
||||||
// match `i0.ΔcontentQuery(dirIndex, ViewContainerRef, true, null)`
|
// match `i0.ɵɵcontentQuery(dirIndex, ViewContainerRef, true, null)`
|
||||||
expect(jsContents).toMatch(contentQueryRegExp('ViewContainerRef', true));
|
expect(jsContents).toMatch(contentQueryRegExp('ViewContainerRef', true));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1624,9 +1626,9 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const hostBindingsFn = `
|
const hostBindingsFn = `
|
||||||
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick(); });
|
i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick(); });
|
||||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onDocumentClick($event.target); }, false, i0.ΔresolveDocument);
|
i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onDocumentClick($event.target); }, false, i0.ɵɵresolveDocument);
|
||||||
i0.Δlistener("scroll", function FooCmp_scroll_HostBindingHandler($event) { return ctx.onWindowScroll(); }, false, i0.ΔresolveWindow);
|
i0.ɵɵlistener("scroll", function FooCmp_scroll_HostBindingHandler($event) { return ctx.onWindowScroll(); }, false, i0.ɵɵresolveWindow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -1722,17 +1724,17 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const hostBindingsFn = `
|
const hostBindingsFn = `
|
||||||
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
i0.ΔallocHostVars(2);
|
i0.ɵɵallocHostVars(2);
|
||||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick($event); });
|
i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onClick($event); });
|
||||||
i0.Δlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onBodyClick($event); }, false, i0.ΔresolveBody);
|
i0.ɵɵlistener("click", function FooCmp_click_HostBindingHandler($event) { return ctx.onBodyClick($event); }, false, i0.ɵɵresolveBody);
|
||||||
i0.Δlistener("change", function FooCmp_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg1, ctx.arg2, ctx.arg3); });
|
i0.ɵɵlistener("change", function FooCmp_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg1, ctx.arg2, ctx.arg3); });
|
||||||
i0.ΔelementHostStyling(_c0);
|
i0.ɵɵelementHostStyling(_c0);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
i0.ΔelementAttribute(elIndex, "hello", i0.Δbind(ctx.foo));
|
i0.ɵɵelementAttribute(elIndex, "hello", i0.ɵɵbind(ctx.foo));
|
||||||
i0.ΔelementProperty(elIndex, "prop", i0.Δbind(ctx.bar), null, true);
|
i0.ɵɵelementProperty(elIndex, "prop", i0.ɵɵbind(ctx.bar), null, true);
|
||||||
i0.ΔelementHostClassProp(0, ctx.someClass);
|
i0.ɵɵelementHostClassProp(0, ctx.someClass);
|
||||||
i0.ΔelementHostStylingApply();
|
i0.ɵɵelementHostStylingApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -1761,7 +1763,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
env.driveMain();
|
env.driveMain();
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔelementHostAttrs(["test", test])');
|
expect(jsContents).toContain('i0.ɵɵelementHostAttrs(["test", test])');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should accept enum values as host bindings', () => {
|
it('should accept enum values as host bindings', () => {
|
||||||
@ -1786,7 +1788,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
|
|
||||||
env.driveMain();
|
env.driveMain();
|
||||||
expect(env.getContents('test.js')).toContain('"hello", i0.Δbind(ctx.foo)');
|
expect(env.getContents('test.js')).toContain('"hello", i0.ɵɵbind(ctx.foo)');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should generate host listeners for directives within hostBindings section', () => {
|
it('should generate host listeners for directives within hostBindings section', () => {
|
||||||
@ -1808,7 +1810,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const hostBindingsFn = `
|
const hostBindingsFn = `
|
||||||
hostBindings: function Dir_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function Dir_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
i0.Δlistener("change", function Dir_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg); });
|
i0.ɵɵlistener("change", function Dir_change_HostBindingHandler($event) { return ctx.onChange(ctx.arg); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -2003,7 +2005,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
`);
|
`);
|
||||||
env.driveMain();
|
env.driveMain();
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).not.toContain('i0.ΔelementProperty');
|
expect(jsContents).not.toContain('i0.ɵɵelementProperty');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should correctly recognize local symbols', () => {
|
it('should correctly recognize local symbols', () => {
|
||||||
@ -2258,8 +2260,8 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
|
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain('function Base_Factory(t) { return new (t || Base)(i0.Δinject(Dep)); }');
|
.toContain('function Base_Factory(t) { return new (t || Base)(i0.ɵɵinject(Dep)); }');
|
||||||
expect(jsContents).toContain('var ɵChild_BaseFactory = i0.ΔgetInheritedFactory(Child)');
|
expect(jsContents).toContain('var ɵChild_BaseFactory = i0.ɵɵgetInheritedFactory(Child)');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain('function Child_Factory(t) { return ɵChild_BaseFactory((t || Child)); }');
|
.toContain('function Child_Factory(t) { return ɵChild_BaseFactory((t || Child)); }');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
@ -2284,7 +2286,7 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
|
|
||||||
expect(jsContents).toContain('var ɵDir_BaseFactory = i0.ΔgetInheritedFactory(Dir)');
|
expect(jsContents).toContain('var ɵDir_BaseFactory = i0.ɵɵgetInheritedFactory(Dir)');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should wrap "directives" in component metadata in a closure when forward references are present',
|
it('should wrap "directives" in component metadata in a closure when forward references are present',
|
||||||
@ -2425,8 +2427,8 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const jsContents = trim(env.getContents('test.js'));
|
const jsContents = trim(env.getContents('test.js'));
|
||||||
expect(jsContents).toContain(`import Default from './types';`);
|
expect(jsContents).toContain(`import Default from './types';`);
|
||||||
expect(jsContents).toContain(`import * as i1 from "./types";`);
|
expect(jsContents).toContain(`import * as i1 from "./types";`);
|
||||||
expect(jsContents).toContain('i0.ΔdirectiveInject(Default)');
|
expect(jsContents).toContain('i0.ɵɵdirectiveInject(Default)');
|
||||||
expect(jsContents).toContain('i0.ΔdirectiveInject(i1.Other)');
|
expect(jsContents).toContain('i0.ɵɵdirectiveInject(i1.Other)');
|
||||||
expect(jsContents).toMatch(setClassMetadataRegExp('type: Default'));
|
expect(jsContents).toMatch(setClassMetadataRegExp('type: Default'));
|
||||||
expect(jsContents).toMatch(setClassMetadataRegExp('type: i1.Other'));
|
expect(jsContents).toMatch(setClassMetadataRegExp('type: i1.Other'));
|
||||||
});
|
});
|
||||||
@ -2537,8 +2539,8 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toMatch(
|
.toMatch(
|
||||||
/i\d\.ΔsetComponentScope\(NormalComponent,\s+\[NormalComponent,\s+CyclicComponent\],\s+\[\]\)/);
|
/i\d\.ɵɵsetComponentScope\(NormalComponent,\s+\[NormalComponent,\s+CyclicComponent\],\s+\[\]\)/);
|
||||||
expect(jsContents).not.toContain('/*__PURE__*/ i0.ΔsetComponentScope');
|
expect(jsContents).not.toContain('/*__PURE__*/ i0.ɵɵsetComponentScope');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should detect a cycle added entirely during compilation', () => {
|
it('should detect a cycle added entirely during compilation', () => {
|
||||||
@ -2729,14 +2731,14 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
it('should not emit multiple references to the same directive', () => {
|
it('should not emit multiple references to the same directive', () => {
|
||||||
env.tsconfig();
|
env.tsconfig();
|
||||||
env.write('node_modules/external/index.d.ts', `
|
env.write('node_modules/external/index.d.ts', `
|
||||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export declare class ExternalDir {
|
export declare class ExternalDir {
|
||||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
static ngDirectiveDef: ɵɵDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class ExternalModule {
|
export declare class ExternalModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
env.write('test.ts', `
|
env.write('test.ts', `
|
||||||
@ -2765,19 +2767,19 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
it('should import directives by their external name', () => {
|
it('should import directives by their external name', () => {
|
||||||
env.tsconfig();
|
env.tsconfig();
|
||||||
env.write('node_modules/external/index.d.ts', `
|
env.write('node_modules/external/index.d.ts', `
|
||||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
import {InternalDir} from './internal';
|
import {InternalDir} from './internal';
|
||||||
|
|
||||||
export {InternalDir as ExternalDir} from './internal';
|
export {InternalDir as ExternalDir} from './internal';
|
||||||
|
|
||||||
export declare class ExternalModule {
|
export declare class ExternalModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof InternalDir], never, [typeof InternalDir]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<ExternalModule, [typeof InternalDir], never, [typeof InternalDir]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
env.write('node_modules/external/internal.d.ts', `
|
env.write('node_modules/external/internal.d.ts', `
|
||||||
|
|
||||||
export declare class InternalDir {
|
export declare class InternalDir {
|
||||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<InternalDir, '[test]', never, never, never, never>;
|
static ngDirectiveDef: ɵɵDirectiveDefWithMeta<InternalDir, '[test]', never, never, never, never>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
env.write('test.ts', `
|
env.write('test.ts', `
|
||||||
@ -2986,14 +2988,14 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
export class Module {}
|
export class Module {}
|
||||||
`);
|
`);
|
||||||
env.write('node_modules/external/index.d.ts', `
|
env.write('node_modules/external/index.d.ts', `
|
||||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export declare class ExternalDir {
|
export declare class ExternalDir {
|
||||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
static ngDirectiveDef: ɵɵDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class ExternalModule {
|
export declare class ExternalModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@ -3173,15 +3175,15 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const hostBindingsFn = `
|
const hostBindingsFn = `
|
||||||
hostBindings: function UnsafeAttrsDirective_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function UnsafeAttrsDirective_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
i0.ΔallocHostVars(6);
|
i0.ɵɵallocHostVars(6);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
i0.ΔelementAttribute(elIndex, "href", i0.Δbind(ctx.attrHref), i0.ΔsanitizeUrlOrResourceUrl);
|
i0.ɵɵelementAttribute(elIndex, "href", i0.ɵɵbind(ctx.attrHref), i0.ɵɵsanitizeUrlOrResourceUrl);
|
||||||
i0.ΔelementAttribute(elIndex, "src", i0.Δbind(ctx.attrSrc), i0.ΔsanitizeUrlOrResourceUrl);
|
i0.ɵɵelementAttribute(elIndex, "src", i0.ɵɵbind(ctx.attrSrc), i0.ɵɵsanitizeUrlOrResourceUrl);
|
||||||
i0.ΔelementAttribute(elIndex, "action", i0.Δbind(ctx.attrAction), i0.ΔsanitizeUrl);
|
i0.ɵɵelementAttribute(elIndex, "action", i0.ɵɵbind(ctx.attrAction), i0.ɵɵsanitizeUrl);
|
||||||
i0.ΔelementAttribute(elIndex, "profile", i0.Δbind(ctx.attrProfile), i0.ΔsanitizeResourceUrl);
|
i0.ɵɵelementAttribute(elIndex, "profile", i0.ɵɵbind(ctx.attrProfile), i0.ɵɵsanitizeResourceUrl);
|
||||||
i0.ΔelementAttribute(elIndex, "innerHTML", i0.Δbind(ctx.attrInnerHTML), i0.ΔsanitizeHtml);
|
i0.ɵɵelementAttribute(elIndex, "innerHTML", i0.ɵɵbind(ctx.attrInnerHTML), i0.ɵɵsanitizeHtml);
|
||||||
i0.ΔelementAttribute(elIndex, "title", i0.Δbind(ctx.attrSafeTitle));
|
i0.ɵɵelementAttribute(elIndex, "title", i0.ɵɵbind(ctx.attrSafeTitle));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -3228,15 +3230,15 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const hostBindingsFn = `
|
const hostBindingsFn = `
|
||||||
hostBindings: function UnsafePropsDirective_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function UnsafePropsDirective_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
i0.ΔallocHostVars(6);
|
i0.ɵɵallocHostVars(6);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
i0.ΔelementProperty(elIndex, "href", i0.Δbind(ctx.propHref), i0.ΔsanitizeUrlOrResourceUrl, true);
|
i0.ɵɵelementProperty(elIndex, "href", i0.ɵɵbind(ctx.propHref), i0.ɵɵsanitizeUrlOrResourceUrl, true);
|
||||||
i0.ΔelementProperty(elIndex, "src", i0.Δbind(ctx.propSrc), i0.ΔsanitizeUrlOrResourceUrl, true);
|
i0.ɵɵelementProperty(elIndex, "src", i0.ɵɵbind(ctx.propSrc), i0.ɵɵsanitizeUrlOrResourceUrl, true);
|
||||||
i0.ΔelementProperty(elIndex, "action", i0.Δbind(ctx.propAction), i0.ΔsanitizeUrl, true);
|
i0.ɵɵelementProperty(elIndex, "action", i0.ɵɵbind(ctx.propAction), i0.ɵɵsanitizeUrl, true);
|
||||||
i0.ΔelementProperty(elIndex, "profile", i0.Δbind(ctx.propProfile), i0.ΔsanitizeResourceUrl, true);
|
i0.ɵɵelementProperty(elIndex, "profile", i0.ɵɵbind(ctx.propProfile), i0.ɵɵsanitizeResourceUrl, true);
|
||||||
i0.ΔelementProperty(elIndex, "innerHTML", i0.Δbind(ctx.propInnerHTML), i0.ΔsanitizeHtml, true);
|
i0.ɵɵelementProperty(elIndex, "innerHTML", i0.ɵɵbind(ctx.propInnerHTML), i0.ɵɵsanitizeHtml, true);
|
||||||
i0.ΔelementProperty(elIndex, "title", i0.Δbind(ctx.propSafeTitle), null, true);
|
i0.ɵɵelementProperty(elIndex, "title", i0.ɵɵbind(ctx.propSafeTitle), null, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -3268,15 +3270,15 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
const hostBindingsFn = `
|
const hostBindingsFn = `
|
||||||
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
hostBindings: function FooCmp_HostBindings(rf, ctx, elIndex) {
|
||||||
if (rf & 1) {
|
if (rf & 1) {
|
||||||
i0.ΔallocHostVars(6);
|
i0.ɵɵallocHostVars(6);
|
||||||
}
|
}
|
||||||
if (rf & 2) {
|
if (rf & 2) {
|
||||||
i0.ΔelementProperty(elIndex, "src", i0.Δbind(ctx.srcProp), null, true);
|
i0.ɵɵelementProperty(elIndex, "src", i0.ɵɵbind(ctx.srcProp), null, true);
|
||||||
i0.ΔelementProperty(elIndex, "href", i0.Δbind(ctx.hrefProp), null, true);
|
i0.ɵɵelementProperty(elIndex, "href", i0.ɵɵbind(ctx.hrefProp), null, true);
|
||||||
i0.ΔelementProperty(elIndex, "title", i0.Δbind(ctx.titleProp), null, true);
|
i0.ɵɵelementProperty(elIndex, "title", i0.ɵɵbind(ctx.titleProp), null, true);
|
||||||
i0.ΔelementAttribute(elIndex, "src", i0.Δbind(ctx.srcAttr));
|
i0.ɵɵelementAttribute(elIndex, "src", i0.ɵɵbind(ctx.srcAttr));
|
||||||
i0.ΔelementAttribute(elIndex, "href", i0.Δbind(ctx.hrefAttr));
|
i0.ɵɵelementAttribute(elIndex, "href", i0.ɵɵbind(ctx.hrefAttr));
|
||||||
i0.ΔelementAttribute(elIndex, "title", i0.Δbind(ctx.titleAttr));
|
i0.ɵɵelementAttribute(elIndex, "title", i0.ɵɵbind(ctx.titleAttr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@ -3306,13 +3308,13 @@ describe('ngtsc behavioral tests', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
env.tsconfig();
|
env.tsconfig();
|
||||||
env.write('node_modules/@angular/router/index.d.ts', `
|
env.write('node_modules/@angular/router/index.d.ts', `
|
||||||
import {ModuleWithProviders, ΔNgModuleDefWithMeta as ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ModuleWithProviders, ɵɵNgModuleDefWithMeta as ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export declare var ROUTES;
|
export declare var ROUTES;
|
||||||
export declare class RouterModule {
|
export declare class RouterModule {
|
||||||
static forRoot(arg1: any, arg2: any): ModuleWithProviders<RouterModule>;
|
static forRoot(arg1: any, arg2: any): ModuleWithProviders<RouterModule>;
|
||||||
static forChild(arg1: any): ModuleWithProviders<RouterModule>;
|
static forChild(arg1: any): ModuleWithProviders<RouterModule>;
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<RouterModule, never, never, never>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<RouterModule, never, never, never>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
@ -3942,24 +3944,24 @@ export const Foo = Foo__PRE_R3__;
|
|||||||
|
|
||||||
// 'alpha' declares the directive which will ultimately be imported.
|
// 'alpha' declares the directive which will ultimately be imported.
|
||||||
env.write('alpha.d.ts', `
|
env.write('alpha.d.ts', `
|
||||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export declare class ExternalDir {
|
export declare class ExternalDir {
|
||||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
static ngDirectiveDef: ɵɵDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class AlphaModule {
|
export declare class AlphaModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<AlphaModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<AlphaModule, [typeof ExternalDir], never, [typeof ExternalDir]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
// 'beta' re-exports AlphaModule from alpha.
|
// 'beta' re-exports AlphaModule from alpha.
|
||||||
env.write('beta.d.ts', `
|
env.write('beta.d.ts', `
|
||||||
import {ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
import {AlphaModule} from './alpha';
|
import {AlphaModule} from './alpha';
|
||||||
|
|
||||||
export declare class BetaModule {
|
export declare class BetaModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<AlphaModule, never, never, [typeof AlphaModule]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<AlphaModule, never, never, [typeof AlphaModule]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
@ -3991,26 +3993,26 @@ export const Foo = Foo__PRE_R3__;
|
|||||||
it('should write alias ES2015 exports for NgModule exported directives', () => {
|
it('should write alias ES2015 exports for NgModule exported directives', () => {
|
||||||
env.tsconfig({'_useHostForImportGeneration': true});
|
env.tsconfig({'_useHostForImportGeneration': true});
|
||||||
env.write('external.d.ts', `
|
env.write('external.d.ts', `
|
||||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
import {LibModule} from './lib';
|
import {LibModule} from './lib';
|
||||||
|
|
||||||
export declare class ExternalDir {
|
export declare class ExternalDir {
|
||||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
static ngDirectiveDef: ɵɵDirectiveDefWithMeta<ExternalDir, '[test]', never, never, never, never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class ExternalModule {
|
export declare class ExternalModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir, typeof LibModule]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<ExternalModule, [typeof ExternalDir], never, [typeof ExternalDir, typeof LibModule]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
env.write('lib.d.ts', `
|
env.write('lib.d.ts', `
|
||||||
import {ΔDirectiveDefWithMeta, ΔNgModuleDefWithMeta} from '@angular/core';
|
import {ɵɵDirectiveDefWithMeta, ɵɵNgModuleDefWithMeta} from '@angular/core';
|
||||||
|
|
||||||
export declare class LibDir {
|
export declare class LibDir {
|
||||||
static ngDirectiveDef: ΔDirectiveDefWithMeta<LibDir, '[lib]', never, never, never, never>;
|
static ngDirectiveDef: ɵɵDirectiveDefWithMeta<LibDir, '[lib]', never, never, never, never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class LibModule {
|
export declare class LibModule {
|
||||||
static ngModuleDef: ΔNgModuleDefWithMeta<LibModule, [typeof LibDir], never, [typeof LibDir]>;
|
static ngModuleDef: ɵɵNgModuleDefWithMeta<LibModule, [typeof LibDir], never, [typeof LibDir]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
env.write('foo.ts', `
|
env.write('foo.ts', `
|
||||||
|
@ -36,15 +36,15 @@ describe('ngtsc module scopes', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { imports: [OtherModule] });');
|
'/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { imports: [OtherModule] });');
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, never, [typeof OtherModule], never>');
|
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, never, [typeof OtherModule], never>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should produce an error when an invalid class is imported', () => {
|
it('should produce an error when an invalid class is imported', () => {
|
||||||
@ -98,15 +98,15 @@ describe('ngtsc module scopes', () => {
|
|||||||
env.driveMain();
|
env.driveMain();
|
||||||
|
|
||||||
const jsContents = env.getContents('test.js');
|
const jsContents = env.getContents('test.js');
|
||||||
expect(jsContents).toContain('i0.ΔdefineNgModule({ type: TestModule });');
|
expect(jsContents).toContain('i0.ɵɵdefineNgModule({ type: TestModule });');
|
||||||
expect(jsContents)
|
expect(jsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'/*@__PURE__*/ i0.ΔsetNgModuleScope(TestModule, { exports: [OtherModule] });');
|
'/*@__PURE__*/ i0.ɵɵsetNgModuleScope(TestModule, { exports: [OtherModule] });');
|
||||||
|
|
||||||
const dtsContents = env.getContents('test.d.ts');
|
const dtsContents = env.getContents('test.d.ts');
|
||||||
expect(dtsContents)
|
expect(dtsContents)
|
||||||
.toContain(
|
.toContain(
|
||||||
'static ngModuleDef: i0.ΔNgModuleDefWithMeta<TestModule, never, never, [typeof OtherModule]>');
|
'static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<TestModule, never, never, [typeof OtherModule]>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should produce an error when a non-NgModule class is exported', () => {
|
it('should produce an error when a non-NgModule class is exported', () => {
|
||||||
|
@ -23,17 +23,17 @@ describe('template source-mapping', () => {
|
|||||||
it('should map simple element with content', () => {
|
it('should map simple element with content', () => {
|
||||||
const mappings = compileAndMap('<h1>Heading 1</h1>');
|
const mappings = compileAndMap('<h1>Heading 1</h1>');
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<h1>', generated: 'i0.ΔelementStart(0, "h1")', sourceUrl: '../test.ts'});
|
{source: '<h1>', generated: 'i0.ɵɵelementStart(0, "h1")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'Heading 1', generated: 'i0.Δtext(1, "Heading 1")', sourceUrl: '../test.ts'});
|
{source: 'Heading 1', generated: 'i0.ɵɵtext(1, "Heading 1")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</h1>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</h1>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should map void element', () => {
|
it('should map void element', () => {
|
||||||
const mappings = compileAndMap('<hr>');
|
const mappings = compileAndMap('<hr>');
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<hr>', generated: 'i0.Δelement(0, "hr")', sourceUrl: '../test.ts'});
|
{source: '<hr>', generated: 'i0.ɵɵelement(0, "hr")', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -41,40 +41,40 @@ describe('template source-mapping', () => {
|
|||||||
it('should map a mix of interpolated and static content', () => {
|
it('should map a mix of interpolated and static content', () => {
|
||||||
const mappings = compileAndMap('<h3>Hello {{ name }}</h3>');
|
const mappings = compileAndMap('<h3>Hello {{ name }}</h3>');
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<h3>', generated: 'i0.ΔelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
{source: '<h3>', generated: 'i0.ɵɵelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: 'Hello {{ name }}',
|
source: 'Hello {{ name }}',
|
||||||
generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("Hello ", ctx.name, ""))',
|
generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("Hello ", ctx.name, ""))',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</h3>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</h3>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should map a complex interpolated expression', () => {
|
it('should map a complex interpolated expression', () => {
|
||||||
const mappings = compileAndMap('<h2>{{ greeting + " " + name }}</h2>');
|
const mappings = compileAndMap('<h2>{{ greeting + " " + name }}</h2>');
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<h2>', generated: 'i0.ΔelementStart(0, "h2")', sourceUrl: '../test.ts'});
|
{source: '<h2>', generated: 'i0.ɵɵelementStart(0, "h2")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '{{ greeting + " " + name }}',
|
source: '{{ greeting + " " + name }}',
|
||||||
generated:
|
generated:
|
||||||
'i0.ΔtextBinding(1, i0.Δinterpolation1("", ((ctx.greeting + " ") + ctx.name), ""))',
|
'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ((ctx.greeting + " ") + ctx.name), ""))',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</h2>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</h2>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should map interpolated properties', () => {
|
it('should map interpolated properties', () => {
|
||||||
const mappings = compileAndMap('<div id="{{name}}"></div>');
|
const mappings = compileAndMap('<div id="{{name}}"></div>');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<div id="{{name}}"></div>',
|
source: '<div id="{{name}}"></div>',
|
||||||
generated: 'i0.Δelement(0, "div", _c0)',
|
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: 'id="{{name}}"',
|
source: 'id="{{name}}"',
|
||||||
generated: 'i0.ΔelementProperty(0, "id", i0.Δinterpolation1("", ctx.name, ""))',
|
generated: 'i0.ɵɵelementProperty(0, "id", i0.ɵɵinterpolation1("", ctx.name, ""))',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -82,15 +82,15 @@ describe('template source-mapping', () => {
|
|||||||
it('should map interpolation with pipe', () => {
|
it('should map interpolation with pipe', () => {
|
||||||
const mappings = compileAndMap('<div>{{200.3 | percent : 2 }}</div>');
|
const mappings = compileAndMap('<div>{{200.3 | percent : 2 }}</div>');
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<div>', generated: 'i0.ΔelementStart(0, "div")', sourceUrl: '../test.ts'});
|
{source: '<div>', generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '{{200.3 | percent : 2 }}',
|
source: '{{200.3 | percent : 2 }}',
|
||||||
generated:
|
generated:
|
||||||
'i0.ΔtextBinding(1, i0.Δinterpolation1("", i0.ΔpipeBind2(2, 1, 200.3, 2), ""))',
|
'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", i0.ɵɵpipeBind2(2, 1, 200.3, 2), ""))',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -99,12 +99,12 @@ describe('template source-mapping', () => {
|
|||||||
const mappings = compileAndMap('<div [attr]="name"></div>');
|
const mappings = compileAndMap('<div [attr]="name"></div>');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<div [attr]="name"></div>',
|
source: '<div [attr]="name"></div>',
|
||||||
generated: 'i0.Δelement(0, "div", _c0)',
|
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '[attr]="name"',
|
source: '[attr]="name"',
|
||||||
generated: 'i0.ΔelementProperty(0, "attr", i0.Δbind(ctx.name))',
|
generated: 'i0.ɵɵelementProperty(0, "attr", i0.ɵɵbind(ctx.name))',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -113,12 +113,12 @@ describe('template source-mapping', () => {
|
|||||||
const mappings = compileAndMap('<div [attr]="greeting + name"></div>');
|
const mappings = compileAndMap('<div [attr]="greeting + name"></div>');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<div [attr]="greeting + name"></div>',
|
source: '<div [attr]="greeting + name"></div>',
|
||||||
generated: 'i0.Δelement(0, "div", _c0)',
|
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '[attr]="greeting + name"',
|
source: '[attr]="greeting + name"',
|
||||||
generated: 'i0.ΔelementProperty(0, "attr", i0.Δbind((ctx.greeting + ctx.name)))',
|
generated: 'i0.ɵɵelementProperty(0, "attr", i0.ɵɵbind((ctx.greeting + ctx.name)))',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -127,12 +127,12 @@ describe('template source-mapping', () => {
|
|||||||
const mappings = compileAndMap('<div bind-attr="name"></div>');
|
const mappings = compileAndMap('<div bind-attr="name"></div>');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<div bind-attr="name"></div>',
|
source: '<div bind-attr="name"></div>',
|
||||||
generated: 'i0.Δelement(0, "div", _c0)',
|
generated: 'i0.ɵɵelement(0, "div", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: 'bind-attr="name"',
|
source: 'bind-attr="name"',
|
||||||
generated: 'i0.ΔelementProperty(0, "attr", i0.Δbind(ctx.name))',
|
generated: 'i0.ɵɵelementProperty(0, "attr", i0.ɵɵbind(ctx.name))',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -141,15 +141,15 @@ describe('template source-mapping', () => {
|
|||||||
const mappings = compileAndMap('<button (click)="doSomething()">Do it</button>');
|
const mappings = compileAndMap('<button (click)="doSomething()">Do it</button>');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<button (click)="doSomething()">',
|
source: '<button (click)="doSomething()">',
|
||||||
generated: 'i0.ΔelementStart(0, "button", _c0)',
|
generated: 'i0.ɵɵelementStart(0, "button", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'Do it', generated: 'i0.Δtext(1, "Do it")', sourceUrl: '../test.ts'});
|
{source: 'Do it', generated: 'i0.ɵɵtext(1, "Do it")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'doSomething()', generated: 'ctx.doSomething()', sourceUrl: '../test.ts'});
|
{source: 'doSomething()', generated: 'ctx.doSomething()', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</button>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</button>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should map a complex output binding expression', () => {
|
it('should map a complex output binding expression', () => {
|
||||||
@ -157,11 +157,11 @@ describe('template source-mapping', () => {
|
|||||||
compileAndMap(`<button (click)="items.push('item' + items.length)">Add Item</button>`);
|
compileAndMap(`<button (click)="items.push('item' + items.length)">Add Item</button>`);
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: `<button (click)="items.push('item' + items.length)">`,
|
source: `<button (click)="items.push('item' + items.length)">`,
|
||||||
generated: 'i0.ΔelementStart(0, "button", _c0)',
|
generated: 'i0.ɵɵelementStart(0, "button", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'Add Item', generated: 'i0.Δtext(1, "Add Item")', sourceUrl: '../test.ts'});
|
{source: 'Add Item', generated: 'i0.ɵɵtext(1, "Add Item")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'items.push(', generated: 'ctx.items.push((', sourceUrl: '../test.ts'});
|
{source: 'items.push(', generated: 'ctx.items.push((', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
@ -172,41 +172,41 @@ describe('template source-mapping', () => {
|
|||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</button>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</button>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should map a longhand output binding expression', () => {
|
it('should map a longhand output binding expression', () => {
|
||||||
const mappings = compileAndMap('<button on-click="doSomething()">Do it</button>');
|
const mappings = compileAndMap('<button on-click="doSomething()">Do it</button>');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<button on-click="doSomething()">',
|
source: '<button on-click="doSomething()">',
|
||||||
generated: 'i0.ΔelementStart(0, "button", _c0)',
|
generated: 'i0.ɵɵelementStart(0, "button", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'Do it', generated: 'i0.Δtext(1, "Do it")', sourceUrl: '../test.ts'});
|
{source: 'Do it', generated: 'i0.ɵɵtext(1, "Do it")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'doSomething()', generated: 'ctx.doSomething()', sourceUrl: '../test.ts'});
|
{source: 'doSomething()', generated: 'ctx.doSomething()', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</button>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</button>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should map a two-way binding expression', () => {
|
it('should map a two-way binding expression', () => {
|
||||||
const mappings = compileAndMap('Name: <input [(ngModel)]="name">');
|
const mappings = compileAndMap('Name: <input [(ngModel)]="name">');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<input [(ngModel)]="name">',
|
source: '<input [(ngModel)]="name">',
|
||||||
generated: 'i0.ΔelementStart(1, "input", _c0)',
|
generated: 'i0.ɵɵelementStart(1, "input", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
// TODO: improve mappings here
|
// TODO: improve mappings here
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '[(ngModel)]="name"',
|
source: '[(ngModel)]="name"',
|
||||||
generated:
|
generated:
|
||||||
'i0.Δlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
'i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<input [(ngModel)]="name">',
|
source: '<input [(ngModel)]="name">',
|
||||||
generated: 'i0.ΔelementEnd()',
|
generated: 'i0.ɵɵelementEnd()',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -215,19 +215,19 @@ describe('template source-mapping', () => {
|
|||||||
const mappings = compileAndMap('Name: <input bindon-ngModel="name">');
|
const mappings = compileAndMap('Name: <input bindon-ngModel="name">');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<input bindon-ngModel="name">',
|
source: '<input bindon-ngModel="name">',
|
||||||
generated: 'i0.ΔelementStart(1, "input", _c0)',
|
generated: 'i0.ɵɵelementStart(1, "input", _c0)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
// TODO: improve mappings here
|
// TODO: improve mappings here
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: 'bindon-ngModel="name"',
|
source: 'bindon-ngModel="name"',
|
||||||
generated:
|
generated:
|
||||||
'i0.Δlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
'i0.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) { return ctx.name = $event; })',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<input bindon-ngModel="name">',
|
source: '<input bindon-ngModel="name">',
|
||||||
generated: 'i0.ΔelementEnd()',
|
generated: 'i0.ɵɵelementEnd()',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -236,17 +236,17 @@ describe('template source-mapping', () => {
|
|||||||
const mappings = compileAndMap('<div [class.initial]="isInitial">Message</div>');
|
const mappings = compileAndMap('<div [class.initial]="isInitial">Message</div>');
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<div [class.initial]="isInitial">',
|
source: '<div [class.initial]="isInitial">',
|
||||||
generated: 'i0.ΔelementStart(0, "div")',
|
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: Add better mappings for binding
|
// TODO: Add better mappings for binding
|
||||||
|
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: 'Message', generated: 'i0.Δtext(1, "Message")', sourceUrl: '../test.ts'});
|
{source: 'Message', generated: 'i0.ɵɵtext(1, "Message")', sourceUrl: '../test.ts'});
|
||||||
|
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -256,20 +256,20 @@ describe('template source-mapping', () => {
|
|||||||
|
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<div *ngIf="showMessage()">',
|
source: '<div *ngIf="showMessage()">',
|
||||||
generated: 'i0.ΔelementStart(0, "div")',
|
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO - map the bindings better
|
// TODO - map the bindings better
|
||||||
|
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
|
|
||||||
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
|
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
|
||||||
|
|
||||||
// expect(mappings).toContain({
|
// expect(mappings).toContain({
|
||||||
// source: '{{ name }}',
|
// source: '{{ name }}',
|
||||||
// generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("", ctx_r0.name, ""))',
|
// generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ctx_r0.name, ""))',
|
||||||
// sourceUrl: '../test.ts'
|
// sourceUrl: '../test.ts'
|
||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
@ -282,18 +282,18 @@ describe('template source-mapping', () => {
|
|||||||
`</ng-template>`);
|
`</ng-template>`);
|
||||||
|
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<div>', generated: 'i0.ΔelementStart(0, "div")', sourceUrl: '../test.ts'});
|
{source: '<div>', generated: 'i0.ɵɵelementStart(0, "div")', sourceUrl: '../test.ts'});
|
||||||
|
|
||||||
// TODO - map the bindings better
|
// TODO - map the bindings better
|
||||||
|
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
|
|
||||||
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
|
// TODO: the `ctx_r...` appears to be dependent upon previous tests!!!
|
||||||
|
|
||||||
// expect(mappings).toContain({
|
// expect(mappings).toContain({
|
||||||
// source: '{{ name }}',
|
// source: '{{ name }}',
|
||||||
// generated: 'i0.ΔtextBinding(1, i0.Δinterpolation1("", ctx_r0.name, ""))',
|
// generated: 'i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1("", ctx_r0.name, ""))',
|
||||||
// sourceUrl: '../test.ts'
|
// sourceUrl: '../test.ts'
|
||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
@ -304,14 +304,14 @@ describe('template source-mapping', () => {
|
|||||||
|
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<div *ngFor="let item of items; index as i; trackBy: trackByFn">',
|
source: '<div *ngFor="let item of items; index as i; trackBy: trackByFn">',
|
||||||
generated: 'i0.ΔelementStart(0, "div")',
|
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO - map the bindings better
|
// TODO - map the bindings better
|
||||||
|
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -330,20 +330,20 @@ describe('template source-mapping', () => {
|
|||||||
`<div><ng-content></ng-content></div>`);
|
`<div><ng-content></ng-content></div>`);
|
||||||
|
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<h3>', generated: 'i0.ΔelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
{source: '<h3>', generated: 'i0.ɵɵelementStart(0, "h3")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
source: '<ng-content select="title">',
|
source: '<ng-content select="title">',
|
||||||
generated: 'i0.Δprojection(1, 1)',
|
generated: 'i0.ɵɵprojection(1, 1)',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</h3>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</h3>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<div>', generated: 'i0.ΔelementStart(2, "div")', sourceUrl: '../test.ts'});
|
{source: '<div>', generated: 'i0.ɵɵelementStart(2, "div")', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '<ng-content>', generated: 'i0.Δprojection(3)', sourceUrl: '../test.ts'});
|
{source: '<ng-content>', generated: 'i0.ɵɵprojection(3)', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{source: '</div>', generated: 'i0.ΔelementEnd()', sourceUrl: '../test.ts'});
|
{source: '</div>', generated: 'i0.ɵɵelementEnd()', sourceUrl: '../test.ts'});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -352,24 +352,24 @@ describe('template source-mapping', () => {
|
|||||||
|
|
||||||
// Creation mode
|
// Creation mode
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.Δtext(1, "this is a test")',
|
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||||
source: 'this is a test',
|
source: 'this is a test',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||||
|
|
||||||
// Update mode
|
// Update mode
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||||
source: '{{ 1 + 2 }}',
|
source: '{{ 1 + 2 }}',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
@ -380,24 +380,24 @@ describe('template source-mapping', () => {
|
|||||||
|
|
||||||
// Creation mode
|
// Creation mode
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementStart(0, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.Δtext(1, "this is a test")',
|
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||||
source: 'this is a test',
|
source: 'this is a test',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementStart(2, "div")', source: '<div>', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../test.ts'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../test.ts'});
|
||||||
|
|
||||||
// Update mode
|
// Update mode
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||||
source: '{{ 1 + 2 }}',
|
source: '{{ 1 + 2 }}',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
@ -409,7 +409,7 @@ describe('template source-mapping', () => {
|
|||||||
const mappings = compileAndMap('<div class=\\"some-class\\">this is a test</div>');
|
const mappings = compileAndMap('<div class=\\"some-class\\">this is a test</div>');
|
||||||
|
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔelementStart(0, "div", _c0)',
|
generated: 'i0.ɵɵelementStart(0, "div", _c0)',
|
||||||
source: '<div class=\\"some-class\\">',
|
source: '<div class=\\"some-class\\">',
|
||||||
sourceUrl: '../test.ts'
|
sourceUrl: '../test.ts'
|
||||||
});
|
});
|
||||||
@ -428,30 +428,30 @@ describe('template source-mapping', () => {
|
|||||||
|
|
||||||
// Creation mode
|
// Creation mode
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔelementStart(0, "div")',
|
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||||
source: '<div>',
|
source: '<div>',
|
||||||
sourceUrl: '../dir/test.html'
|
sourceUrl: '../dir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.Δtext(1, "this is a test")',
|
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||||
source: 'this is a test',
|
source: 'this is a test',
|
||||||
sourceUrl: '../dir/test.html'
|
sourceUrl: '../dir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔelementStart(2, "div")',
|
generated: 'i0.ɵɵelementStart(2, "div")',
|
||||||
source: '<div>',
|
source: '<div>',
|
||||||
sourceUrl: '../dir/test.html'
|
sourceUrl: '../dir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.Δtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../dir/test.html'});
|
{generated: 'i0.ɵɵtext(3)', source: '{{ 1 + 2 }}', sourceUrl: '../dir/test.html'});
|
||||||
expect(mappings).toContain(
|
expect(mappings).toContain(
|
||||||
{generated: 'i0.ΔelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
{generated: 'i0.ɵɵelementEnd()', source: '</div>', sourceUrl: '../dir/test.html'});
|
||||||
|
|
||||||
// Update mode
|
// Update mode
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||||
source: '{{ 1 + 2 }}',
|
source: '{{ 1 + 2 }}',
|
||||||
sourceUrl: '../dir/test.html'
|
sourceUrl: '../dir/test.html'
|
||||||
});
|
});
|
||||||
@ -463,39 +463,39 @@ describe('template source-mapping', () => {
|
|||||||
|
|
||||||
// Creation mode
|
// Creation mode
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔelementStart(0, "div")',
|
generated: 'i0.ɵɵelementStart(0, "div")',
|
||||||
source: '<div>',
|
source: '<div>',
|
||||||
sourceUrl: '../extraRootDir/test.html'
|
sourceUrl: '../extraRootDir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.Δtext(1, "this is a test")',
|
generated: 'i0.ɵɵtext(1, "this is a test")',
|
||||||
source: 'this is a test',
|
source: 'this is a test',
|
||||||
sourceUrl: '../extraRootDir/test.html'
|
sourceUrl: '../extraRootDir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔelementEnd()',
|
generated: 'i0.ɵɵelementEnd()',
|
||||||
source: '</div>',
|
source: '</div>',
|
||||||
sourceUrl: '../extraRootDir/test.html'
|
sourceUrl: '../extraRootDir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔelementStart(2, "div")',
|
generated: 'i0.ɵɵelementStart(2, "div")',
|
||||||
source: '<div>',
|
source: '<div>',
|
||||||
sourceUrl: '../extraRootDir/test.html'
|
sourceUrl: '../extraRootDir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.Δtext(3)',
|
generated: 'i0.ɵɵtext(3)',
|
||||||
source: '{{ 1 + 2 }}',
|
source: '{{ 1 + 2 }}',
|
||||||
sourceUrl: '../extraRootDir/test.html'
|
sourceUrl: '../extraRootDir/test.html'
|
||||||
});
|
});
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔelementEnd()',
|
generated: 'i0.ɵɵelementEnd()',
|
||||||
source: '</div>',
|
source: '</div>',
|
||||||
sourceUrl: '../extraRootDir/test.html'
|
sourceUrl: '../extraRootDir/test.html'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update mode
|
// Update mode
|
||||||
expect(mappings).toContain({
|
expect(mappings).toContain({
|
||||||
generated: 'i0.ΔtextBinding(3, i0.Δinterpolation1("", (1 + 2), ""))',
|
generated: 'i0.ɵɵtextBinding(3, i0.ɵɵinterpolation1("", (1 + 2), ""))',
|
||||||
source: '{{ 1 + 2 }}',
|
source: '{{ 1 + 2 }}',
|
||||||
sourceUrl: '../extraRootDir/test.html'
|
sourceUrl: '../extraRootDir/test.html'
|
||||||
});
|
});
|
||||||
|
@ -26,17 +26,17 @@ export declare class NgForOfContext<T> {
|
|||||||
export declare class NgForOf<T> {
|
export declare class NgForOf<T> {
|
||||||
ngForOf: T[];
|
ngForOf: T[];
|
||||||
static ngTemplateContextGuard<T>(dir: NgForOf<T>, ctx: any): ctx is NgForOfContext<T>;
|
static ngTemplateContextGuard<T>(dir: NgForOf<T>, ctx: any): ctx is NgForOfContext<T>;
|
||||||
static ngDirectiveDef: i0.ΔDirectiveDefWithMeta<NgForOf<any>, '[ngFor][ngForOf]', never, {'ngForOf': 'ngForOf'}, {}, never>;
|
static ngDirectiveDef: i0.ɵɵDirectiveDefWithMeta<NgForOf<any>, '[ngFor][ngForOf]', never, {'ngForOf': 'ngForOf'}, {}, never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class NgIf {
|
export declare class NgIf {
|
||||||
ngIf: any;
|
ngIf: any;
|
||||||
static ngTemplateGuard_ngIf<E>(dir: NgIf, expr: E): expr is NonNullable<E>
|
static ngTemplateGuard_ngIf<E>(dir: NgIf, expr: E): expr is NonNullable<E>
|
||||||
static ngDirectiveDef: i0.ΔDirectiveDefWithMeta<NgForOf<any>, '[ngIf]', never, {'ngIf': 'ngIf'}, {}, never>;
|
static ngDirectiveDef: i0.ɵɵDirectiveDefWithMeta<NgForOf<any>, '[ngIf]', never, {'ngIf': 'ngIf'}, {}, never>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class CommonModule {
|
export declare class CommonModule {
|
||||||
static ngModuleDef: i0.ΔNgModuleDefWithMeta<CommonModule, [typeof NgIf, typeof NgForOf], never, [typeof NgIf, typeof NgForOf]>;
|
static ngModuleDef: i0.ɵɵNgModuleDefWithMeta<CommonModule, [typeof NgIf, typeof NgForOf], never, [typeof NgIf, typeof NgForOf]>;
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
@ -81,18 +81,18 @@ In `ngtsc` this is instead emitted as,
|
|||||||
```js
|
```js
|
||||||
const i0 = require("@angular/core");
|
const i0 = require("@angular/core");
|
||||||
class GreetComponent {}
|
class GreetComponent {}
|
||||||
GreetComponent.ngComponentDef = i0.ΔdefineComponent({
|
GreetComponent.ngComponentDef = i0.ɵɵdefineComponent({
|
||||||
type: GreetComponent,
|
type: GreetComponent,
|
||||||
tag: 'greet',
|
tag: 'greet',
|
||||||
factory: () => new GreetComponent(),
|
factory: () => new GreetComponent(),
|
||||||
template: function (rf, ctx) {
|
template: function (rf, ctx) {
|
||||||
if (rf & RenderFlags.Create) {
|
if (rf & RenderFlags.Create) {
|
||||||
i0.ΔelementStart(0, 'div');
|
i0.ɵɵelementStart(0, 'div');
|
||||||
i0.Δtext(1);
|
i0.ɵɵtext(1);
|
||||||
i0.ΔelementEnd();
|
i0.ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & RenderFlags.Update) {
|
if (rf & RenderFlags.Update) {
|
||||||
i0.ΔtextBinding(1, i0.Δinterpolation1('Hello ', ctx.name, '!'));
|
i0.ɵɵtextBinding(1, i0.ɵɵinterpolation1('Hello ', ctx.name, '!'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -161,7 +161,7 @@ export class MyComponent {
|
|||||||
```js
|
```js
|
||||||
export class MyComponent {
|
export class MyComponent {
|
||||||
name: string;
|
name: string;
|
||||||
static ngComponentDef = ΔdefineComponent({...});
|
static ngComponentDef = ɵɵdefineComponent({...});
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ export class MyDirective {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.dirId = 'some id';
|
this.dirId = 'some id';
|
||||||
}
|
}
|
||||||
static ngDirectiveDef = ΔdefineDirective({...});
|
static ngDirectiveDef = ɵɵdefineDirective({...});
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ export class MyPipe implements PipeTransform {
|
|||||||
```js
|
```js
|
||||||
export class MyPipe {
|
export class MyPipe {
|
||||||
transform(...) ...
|
transform(...) ...
|
||||||
static ngPipeDef = ΔdefinePipe({...});
|
static ngPipeDef = ɵɵdefinePipe({...});
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ export class MyModule {}
|
|||||||
*my.module.js*
|
*my.module.js*
|
||||||
```js
|
```js
|
||||||
export class MyModule {
|
export class MyModule {
|
||||||
static ngInjectorDef = ΔdefineInjector(...);
|
static ngInjectorDef = ɵɵdefineInjector(...);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -389,7 +389,7 @@ manually written as:
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
export class MyModule {
|
export class MyModule {
|
||||||
static ngInjectorDef = ΔdefineInjector({
|
static ngInjectorDef = ɵɵdefineInjector({
|
||||||
providers: [{
|
providers: [{
|
||||||
provide: Service, useClass: ServiceImpl
|
provide: Service, useClass: ServiceImpl
|
||||||
}],
|
}],
|
||||||
@ -411,7 +411,7 @@ export class MyModule {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
except for the call to `ΔdefineInjector` would generate a `{ __symbolic: 'error' }`
|
except for the call to `ɵɵdefineInjector` would generate a `{ __symbolic: 'error' }`
|
||||||
value which is ignored by the ivy compiler. This allows the system to ignore
|
value which is ignored by the ivy compiler. This allows the system to ignore
|
||||||
the difference between manually and mechanically created module definitions.
|
the difference between manually and mechanically created module definitions.
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ properties by including a `// @__BUILD_OPTIMIZER_REMOVE_` comment:
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
export class MyModule {
|
export class MyModule {
|
||||||
static ngInjectorDef = ΔdefineInjector({
|
static ngInjectorDef = ɵɵdefineInjector({
|
||||||
providers: [{
|
providers: [{
|
||||||
provide: Service, useClass: ServiceImpl
|
provide: Service, useClass: ServiceImpl
|
||||||
}],
|
}],
|
||||||
|
@ -62,11 +62,11 @@ export class Identifiers {
|
|||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
|
|
||||||
};
|
};
|
||||||
static inject: o.ExternalReference = {name: 'Δinject', moduleName: CORE};
|
static inject: o.ExternalReference = {name: 'ɵɵinject', moduleName: CORE};
|
||||||
static INJECTOR: o.ExternalReference = {name: 'INJECTOR', moduleName: CORE};
|
static INJECTOR: o.ExternalReference = {name: 'INJECTOR', moduleName: CORE};
|
||||||
static Injector: o.ExternalReference = {name: 'Injector', moduleName: CORE};
|
static Injector: o.ExternalReference = {name: 'Injector', moduleName: CORE};
|
||||||
static ΔdefineInjectable: o.ExternalReference = {name: 'ΔdefineInjectable', moduleName: CORE};
|
static ɵɵdefineInjectable: o.ExternalReference = {name: 'ɵɵdefineInjectable', moduleName: CORE};
|
||||||
static InjectableDef: o.ExternalReference = {name: 'ΔInjectableDef', moduleName: CORE};
|
static InjectableDef: o.ExternalReference = {name: 'ɵɵInjectableDef', moduleName: CORE};
|
||||||
static ViewEncapsulation: o.ExternalReference = {
|
static ViewEncapsulation: o.ExternalReference = {
|
||||||
name: 'ViewEncapsulation',
|
name: 'ViewEncapsulation',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
@ -92,7 +92,7 @@ export class Identifiers {
|
|||||||
name: 'ɵinlineInterpolate',
|
name: 'ɵinlineInterpolate',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
static interpolate: o.ExternalReference = {name: 'Δinterpolate', moduleName: CORE};
|
static interpolate: o.ExternalReference = {name: 'ɵɵinterpolate', moduleName: CORE};
|
||||||
static EMPTY_ARRAY: o.ExternalReference = {name: 'ɵEMPTY_ARRAY', moduleName: CORE};
|
static EMPTY_ARRAY: o.ExternalReference = {name: 'ɵEMPTY_ARRAY', moduleName: CORE};
|
||||||
static EMPTY_MAP: o.ExternalReference = {name: 'ɵEMPTY_MAP', moduleName: CORE};
|
static EMPTY_MAP: o.ExternalReference = {name: 'ɵEMPTY_MAP', moduleName: CORE};
|
||||||
static Renderer: o.ExternalReference = {name: 'Renderer', moduleName: CORE};
|
static Renderer: o.ExternalReference = {name: 'Renderer', moduleName: CORE};
|
||||||
|
@ -116,7 +116,7 @@ export class InjectableCompiler {
|
|||||||
mapEntry('token', ctx.importExpr(injectable.type.reference)),
|
mapEntry('token', ctx.importExpr(injectable.type.reference)),
|
||||||
mapEntry('providedIn', providedIn),
|
mapEntry('providedIn', providedIn),
|
||||||
];
|
];
|
||||||
return o.importExpr(Identifiers.ΔdefineInjectable).callFn([o.literalMap(def)]);
|
return o.importExpr(Identifiers.ɵɵdefineInjectable).callFn([o.literalMap(def)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
compile(injectable: CompileInjectableMetadata, ctx: OutputContext): void {
|
compile(injectable: CompileInjectableMetadata, ctx: OutputContext): void {
|
||||||
|
@ -100,7 +100,7 @@ export function compileInjectable(meta: R3InjectableMetadata): InjectableDef {
|
|||||||
const token = meta.type;
|
const token = meta.type;
|
||||||
const providedIn = meta.providedIn;
|
const providedIn = meta.providedIn;
|
||||||
|
|
||||||
const expression = o.importExpr(Identifiers.ΔdefineInjectable).callFn([mapToMapExpression(
|
const expression = o.importExpr(Identifiers.ɵɵdefineInjectable).callFn([mapToMapExpression(
|
||||||
{token, factory: result.factory, providedIn})]);
|
{token, factory: result.factory, providedIn})]);
|
||||||
const type = new o.ExpressionType(o.importExpr(
|
const type = new o.ExpressionType(o.importExpr(
|
||||||
Identifiers.InjectableDef, [typeWithParameters(meta.type, meta.typeArgumentCount)]));
|
Identifiers.InjectableDef, [typeWithParameters(meta.type, meta.typeArgumentCount)]));
|
||||||
|
@ -17,227 +17,227 @@ export class Identifiers {
|
|||||||
static PATCH_DEPS = 'patchedDeps';
|
static PATCH_DEPS = 'patchedDeps';
|
||||||
|
|
||||||
/* Instructions */
|
/* Instructions */
|
||||||
static namespaceHTML: o.ExternalReference = {name: 'ΔnamespaceHTML', moduleName: CORE};
|
static namespaceHTML: o.ExternalReference = {name: 'ɵɵnamespaceHTML', moduleName: CORE};
|
||||||
|
|
||||||
static namespaceMathML: o.ExternalReference = {name: 'ΔnamespaceMathML', moduleName: CORE};
|
static namespaceMathML: o.ExternalReference = {name: 'ɵɵnamespaceMathML', moduleName: CORE};
|
||||||
|
|
||||||
static namespaceSVG: o.ExternalReference = {name: 'ΔnamespaceSVG', moduleName: CORE};
|
static namespaceSVG: o.ExternalReference = {name: 'ɵɵnamespaceSVG', moduleName: CORE};
|
||||||
|
|
||||||
static element: o.ExternalReference = {name: 'Δelement', moduleName: CORE};
|
static element: o.ExternalReference = {name: 'ɵɵelement', moduleName: CORE};
|
||||||
|
|
||||||
static elementStart: o.ExternalReference = {name: 'ΔelementStart', moduleName: CORE};
|
static elementStart: o.ExternalReference = {name: 'ɵɵelementStart', moduleName: CORE};
|
||||||
|
|
||||||
static elementEnd: o.ExternalReference = {name: 'ΔelementEnd', moduleName: CORE};
|
static elementEnd: o.ExternalReference = {name: 'ɵɵelementEnd', moduleName: CORE};
|
||||||
|
|
||||||
static elementProperty: o.ExternalReference = {name: 'ΔelementProperty', moduleName: CORE};
|
static elementProperty: o.ExternalReference = {name: 'ɵɵelementProperty', moduleName: CORE};
|
||||||
|
|
||||||
static select: o.ExternalReference = {name: 'Δselect', moduleName: CORE};
|
static select: o.ExternalReference = {name: 'ɵɵselect', moduleName: CORE};
|
||||||
|
|
||||||
static componentHostSyntheticProperty:
|
static componentHostSyntheticProperty:
|
||||||
o.ExternalReference = {name: 'ΔcomponentHostSyntheticProperty', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵcomponentHostSyntheticProperty', moduleName: CORE};
|
||||||
|
|
||||||
static componentHostSyntheticListener:
|
static componentHostSyntheticListener:
|
||||||
o.ExternalReference = {name: 'ΔcomponentHostSyntheticListener', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵcomponentHostSyntheticListener', moduleName: CORE};
|
||||||
|
|
||||||
static elementAttribute: o.ExternalReference = {name: 'ΔelementAttribute', moduleName: CORE};
|
static elementAttribute: o.ExternalReference = {name: 'ɵɵelementAttribute', moduleName: CORE};
|
||||||
|
|
||||||
static elementClassProp: o.ExternalReference = {name: 'ΔelementClassProp', moduleName: CORE};
|
static elementClassProp: o.ExternalReference = {name: 'ɵɵelementClassProp', moduleName: CORE};
|
||||||
|
|
||||||
static elementContainerStart:
|
static elementContainerStart:
|
||||||
o.ExternalReference = {name: 'ΔelementContainerStart', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵelementContainerStart', moduleName: CORE};
|
||||||
|
|
||||||
static elementContainerEnd:
|
static elementContainerEnd:
|
||||||
o.ExternalReference = {name: 'ΔelementContainerEnd', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵelementContainerEnd', moduleName: CORE};
|
||||||
|
|
||||||
static elementStyling: o.ExternalReference = {name: 'ΔelementStyling', moduleName: CORE};
|
static elementStyling: o.ExternalReference = {name: 'ɵɵelementStyling', moduleName: CORE};
|
||||||
|
|
||||||
static elementStylingMap: o.ExternalReference = {name: 'ΔelementStylingMap', moduleName: CORE};
|
static elementStylingMap: o.ExternalReference = {name: 'ɵɵelementStylingMap', moduleName: CORE};
|
||||||
|
|
||||||
static elementStyleProp: o.ExternalReference = {name: 'ΔelementStyleProp', moduleName: CORE};
|
static elementStyleProp: o.ExternalReference = {name: 'ɵɵelementStyleProp', moduleName: CORE};
|
||||||
|
|
||||||
static elementStylingApply:
|
static elementStylingApply:
|
||||||
o.ExternalReference = {name: 'ΔelementStylingApply', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵelementStylingApply', moduleName: CORE};
|
||||||
|
|
||||||
static elementHostAttrs: o.ExternalReference = {name: 'ΔelementHostAttrs', moduleName: CORE};
|
static elementHostAttrs: o.ExternalReference = {name: 'ɵɵelementHostAttrs', moduleName: CORE};
|
||||||
|
|
||||||
static elementHostStyling: o.ExternalReference = {name: 'ΔelementHostStyling', moduleName: CORE};
|
static elementHostStyling: o.ExternalReference = {name: 'ɵɵelementHostStyling', moduleName: CORE};
|
||||||
|
|
||||||
static elementHostStylingMap:
|
static elementHostStylingMap:
|
||||||
o.ExternalReference = {name: 'ΔelementHostStylingMap', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵelementHostStylingMap', moduleName: CORE};
|
||||||
|
|
||||||
static elementHostStyleProp:
|
static elementHostStyleProp:
|
||||||
o.ExternalReference = {name: 'ΔelementHostStyleProp', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵelementHostStyleProp', moduleName: CORE};
|
||||||
|
|
||||||
static elementHostClassProp:
|
static elementHostClassProp:
|
||||||
o.ExternalReference = {name: 'ΔelementHostClassProp', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵelementHostClassProp', moduleName: CORE};
|
||||||
|
|
||||||
static elementHostStylingApply:
|
static elementHostStylingApply:
|
||||||
o.ExternalReference = {name: 'ΔelementHostStylingApply', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵelementHostStylingApply', moduleName: CORE};
|
||||||
|
|
||||||
static containerCreate: o.ExternalReference = {name: 'Δcontainer', moduleName: CORE};
|
static containerCreate: o.ExternalReference = {name: 'ɵɵcontainer', moduleName: CORE};
|
||||||
|
|
||||||
static nextContext: o.ExternalReference = {name: 'ΔnextContext', moduleName: CORE};
|
static nextContext: o.ExternalReference = {name: 'ɵɵnextContext', moduleName: CORE};
|
||||||
|
|
||||||
static templateCreate: o.ExternalReference = {name: 'Δtemplate', moduleName: CORE};
|
static templateCreate: o.ExternalReference = {name: 'ɵɵtemplate', moduleName: CORE};
|
||||||
|
|
||||||
static text: o.ExternalReference = {name: 'Δtext', moduleName: CORE};
|
static text: o.ExternalReference = {name: 'ɵɵtext', moduleName: CORE};
|
||||||
|
|
||||||
static textBinding: o.ExternalReference = {name: 'ΔtextBinding', moduleName: CORE};
|
static textBinding: o.ExternalReference = {name: 'ɵɵtextBinding', moduleName: CORE};
|
||||||
|
|
||||||
static bind: o.ExternalReference = {name: 'Δbind', moduleName: CORE};
|
static bind: o.ExternalReference = {name: 'ɵɵbind', moduleName: CORE};
|
||||||
|
|
||||||
static enableBindings: o.ExternalReference = {name: 'ΔenableBindings', moduleName: CORE};
|
static enableBindings: o.ExternalReference = {name: 'ɵɵenableBindings', moduleName: CORE};
|
||||||
|
|
||||||
static disableBindings: o.ExternalReference = {name: 'ΔdisableBindings', moduleName: CORE};
|
static disableBindings: o.ExternalReference = {name: 'ɵɵdisableBindings', moduleName: CORE};
|
||||||
|
|
||||||
static allocHostVars: o.ExternalReference = {name: 'ΔallocHostVars', moduleName: CORE};
|
static allocHostVars: o.ExternalReference = {name: 'ɵɵallocHostVars', moduleName: CORE};
|
||||||
|
|
||||||
static getCurrentView: o.ExternalReference = {name: 'ΔgetCurrentView', moduleName: CORE};
|
static getCurrentView: o.ExternalReference = {name: 'ɵɵgetCurrentView', moduleName: CORE};
|
||||||
|
|
||||||
static restoreView: o.ExternalReference = {name: 'ΔrestoreView', moduleName: CORE};
|
static restoreView: o.ExternalReference = {name: 'ɵɵrestoreView', moduleName: CORE};
|
||||||
|
|
||||||
static interpolation1: o.ExternalReference = {name: 'Δinterpolation1', moduleName: CORE};
|
static interpolation1: o.ExternalReference = {name: 'ɵɵinterpolation1', moduleName: CORE};
|
||||||
static interpolation2: o.ExternalReference = {name: 'Δinterpolation2', moduleName: CORE};
|
static interpolation2: o.ExternalReference = {name: 'ɵɵinterpolation2', moduleName: CORE};
|
||||||
static interpolation3: o.ExternalReference = {name: 'Δinterpolation3', moduleName: CORE};
|
static interpolation3: o.ExternalReference = {name: 'ɵɵinterpolation3', moduleName: CORE};
|
||||||
static interpolation4: o.ExternalReference = {name: 'Δinterpolation4', moduleName: CORE};
|
static interpolation4: o.ExternalReference = {name: 'ɵɵinterpolation4', moduleName: CORE};
|
||||||
static interpolation5: o.ExternalReference = {name: 'Δinterpolation5', moduleName: CORE};
|
static interpolation5: o.ExternalReference = {name: 'ɵɵinterpolation5', moduleName: CORE};
|
||||||
static interpolation6: o.ExternalReference = {name: 'Δinterpolation6', moduleName: CORE};
|
static interpolation6: o.ExternalReference = {name: 'ɵɵinterpolation6', moduleName: CORE};
|
||||||
static interpolation7: o.ExternalReference = {name: 'Δinterpolation7', moduleName: CORE};
|
static interpolation7: o.ExternalReference = {name: 'ɵɵinterpolation7', moduleName: CORE};
|
||||||
static interpolation8: o.ExternalReference = {name: 'Δinterpolation8', moduleName: CORE};
|
static interpolation8: o.ExternalReference = {name: 'ɵɵinterpolation8', moduleName: CORE};
|
||||||
static interpolationV: o.ExternalReference = {name: 'ΔinterpolationV', moduleName: CORE};
|
static interpolationV: o.ExternalReference = {name: 'ɵɵinterpolationV', moduleName: CORE};
|
||||||
|
|
||||||
static pureFunction0: o.ExternalReference = {name: 'ΔpureFunction0', moduleName: CORE};
|
static pureFunction0: o.ExternalReference = {name: 'ɵɵpureFunction0', moduleName: CORE};
|
||||||
static pureFunction1: o.ExternalReference = {name: 'ΔpureFunction1', moduleName: CORE};
|
static pureFunction1: o.ExternalReference = {name: 'ɵɵpureFunction1', moduleName: CORE};
|
||||||
static pureFunction2: o.ExternalReference = {name: 'ΔpureFunction2', moduleName: CORE};
|
static pureFunction2: o.ExternalReference = {name: 'ɵɵpureFunction2', moduleName: CORE};
|
||||||
static pureFunction3: o.ExternalReference = {name: 'ΔpureFunction3', moduleName: CORE};
|
static pureFunction3: o.ExternalReference = {name: 'ɵɵpureFunction3', moduleName: CORE};
|
||||||
static pureFunction4: o.ExternalReference = {name: 'ΔpureFunction4', moduleName: CORE};
|
static pureFunction4: o.ExternalReference = {name: 'ɵɵpureFunction4', moduleName: CORE};
|
||||||
static pureFunction5: o.ExternalReference = {name: 'ΔpureFunction5', moduleName: CORE};
|
static pureFunction5: o.ExternalReference = {name: 'ɵɵpureFunction5', moduleName: CORE};
|
||||||
static pureFunction6: o.ExternalReference = {name: 'ΔpureFunction6', moduleName: CORE};
|
static pureFunction6: o.ExternalReference = {name: 'ɵɵpureFunction6', moduleName: CORE};
|
||||||
static pureFunction7: o.ExternalReference = {name: 'ΔpureFunction7', moduleName: CORE};
|
static pureFunction7: o.ExternalReference = {name: 'ɵɵpureFunction7', moduleName: CORE};
|
||||||
static pureFunction8: o.ExternalReference = {name: 'ΔpureFunction8', moduleName: CORE};
|
static pureFunction8: o.ExternalReference = {name: 'ɵɵpureFunction8', moduleName: CORE};
|
||||||
static pureFunctionV: o.ExternalReference = {name: 'ΔpureFunctionV', moduleName: CORE};
|
static pureFunctionV: o.ExternalReference = {name: 'ɵɵpureFunctionV', moduleName: CORE};
|
||||||
|
|
||||||
static pipeBind1: o.ExternalReference = {name: 'ΔpipeBind1', moduleName: CORE};
|
static pipeBind1: o.ExternalReference = {name: 'ɵɵpipeBind1', moduleName: CORE};
|
||||||
static pipeBind2: o.ExternalReference = {name: 'ΔpipeBind2', moduleName: CORE};
|
static pipeBind2: o.ExternalReference = {name: 'ɵɵpipeBind2', moduleName: CORE};
|
||||||
static pipeBind3: o.ExternalReference = {name: 'ΔpipeBind3', moduleName: CORE};
|
static pipeBind3: o.ExternalReference = {name: 'ɵɵpipeBind3', moduleName: CORE};
|
||||||
static pipeBind4: o.ExternalReference = {name: 'ΔpipeBind4', moduleName: CORE};
|
static pipeBind4: o.ExternalReference = {name: 'ɵɵpipeBind4', moduleName: CORE};
|
||||||
static pipeBindV: o.ExternalReference = {name: 'ΔpipeBindV', moduleName: CORE};
|
static pipeBindV: o.ExternalReference = {name: 'ɵɵpipeBindV', moduleName: CORE};
|
||||||
|
|
||||||
static i18n: o.ExternalReference = {name: 'Δi18n', moduleName: CORE};
|
static i18n: o.ExternalReference = {name: 'ɵɵi18n', moduleName: CORE};
|
||||||
static i18nAttributes: o.ExternalReference = {name: 'Δi18nAttributes', moduleName: CORE};
|
static i18nAttributes: o.ExternalReference = {name: 'ɵɵi18nAttributes', moduleName: CORE};
|
||||||
static i18nExp: o.ExternalReference = {name: 'Δi18nExp', moduleName: CORE};
|
static i18nExp: o.ExternalReference = {name: 'ɵɵi18nExp', moduleName: CORE};
|
||||||
static i18nStart: o.ExternalReference = {name: 'Δi18nStart', moduleName: CORE};
|
static i18nStart: o.ExternalReference = {name: 'ɵɵi18nStart', moduleName: CORE};
|
||||||
static i18nEnd: o.ExternalReference = {name: 'Δi18nEnd', moduleName: CORE};
|
static i18nEnd: o.ExternalReference = {name: 'ɵɵi18nEnd', moduleName: CORE};
|
||||||
static i18nApply: o.ExternalReference = {name: 'Δi18nApply', moduleName: CORE};
|
static i18nApply: o.ExternalReference = {name: 'ɵɵi18nApply', moduleName: CORE};
|
||||||
static i18nPostprocess: o.ExternalReference = {name: 'Δi18nPostprocess', moduleName: CORE};
|
static i18nPostprocess: o.ExternalReference = {name: 'ɵɵi18nPostprocess', moduleName: CORE};
|
||||||
static i18nLocalize: o.ExternalReference = {name: 'Δi18nLocalize', moduleName: CORE};
|
static i18nLocalize: o.ExternalReference = {name: 'ɵɵi18nLocalize', moduleName: CORE};
|
||||||
|
|
||||||
static load: o.ExternalReference = {name: 'Δload', moduleName: CORE};
|
static load: o.ExternalReference = {name: 'ɵɵload', moduleName: CORE};
|
||||||
|
|
||||||
static pipe: o.ExternalReference = {name: 'Δpipe', moduleName: CORE};
|
static pipe: o.ExternalReference = {name: 'ɵɵpipe', moduleName: CORE};
|
||||||
|
|
||||||
static projection: o.ExternalReference = {name: 'Δprojection', moduleName: CORE};
|
static projection: o.ExternalReference = {name: 'ɵɵprojection', moduleName: CORE};
|
||||||
static projectionDef: o.ExternalReference = {name: 'ΔprojectionDef', moduleName: CORE};
|
static projectionDef: o.ExternalReference = {name: 'ɵɵprojectionDef', moduleName: CORE};
|
||||||
|
|
||||||
static reference: o.ExternalReference = {name: 'Δreference', moduleName: CORE};
|
static reference: o.ExternalReference = {name: 'ɵɵreference', moduleName: CORE};
|
||||||
|
|
||||||
static inject: o.ExternalReference = {name: 'Δinject', moduleName: CORE};
|
static inject: o.ExternalReference = {name: 'ɵɵinject', moduleName: CORE};
|
||||||
|
|
||||||
static injectAttribute: o.ExternalReference = {name: 'ΔinjectAttribute', moduleName: CORE};
|
static injectAttribute: o.ExternalReference = {name: 'ɵɵinjectAttribute', moduleName: CORE};
|
||||||
|
|
||||||
static directiveInject: o.ExternalReference = {name: 'ΔdirectiveInject', moduleName: CORE};
|
static directiveInject: o.ExternalReference = {name: 'ɵɵdirectiveInject', moduleName: CORE};
|
||||||
|
|
||||||
static templateRefExtractor:
|
static templateRefExtractor:
|
||||||
o.ExternalReference = {name: 'ΔtemplateRefExtractor', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵtemplateRefExtractor', moduleName: CORE};
|
||||||
|
|
||||||
static resolveWindow: o.ExternalReference = {name: 'ΔresolveWindow', moduleName: CORE};
|
static resolveWindow: o.ExternalReference = {name: 'ɵɵresolveWindow', moduleName: CORE};
|
||||||
static resolveDocument: o.ExternalReference = {name: 'ΔresolveDocument', moduleName: CORE};
|
static resolveDocument: o.ExternalReference = {name: 'ɵɵresolveDocument', moduleName: CORE};
|
||||||
static resolveBody: o.ExternalReference = {name: 'ΔresolveBody', moduleName: CORE};
|
static resolveBody: o.ExternalReference = {name: 'ɵɵresolveBody', moduleName: CORE};
|
||||||
|
|
||||||
static defineBase: o.ExternalReference = {name: 'ΔdefineBase', moduleName: CORE};
|
static defineBase: o.ExternalReference = {name: 'ɵɵdefineBase', moduleName: CORE};
|
||||||
|
|
||||||
static BaseDef: o.ExternalReference = {
|
static BaseDef: o.ExternalReference = {
|
||||||
name: 'ΔBaseDef',
|
name: 'ɵɵBaseDef',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defineComponent: o.ExternalReference = {name: 'ΔdefineComponent', moduleName: CORE};
|
static defineComponent: o.ExternalReference = {name: 'ɵɵdefineComponent', moduleName: CORE};
|
||||||
|
|
||||||
static setComponentScope: o.ExternalReference = {name: 'ΔsetComponentScope', moduleName: CORE};
|
static setComponentScope: o.ExternalReference = {name: 'ɵɵsetComponentScope', moduleName: CORE};
|
||||||
|
|
||||||
static ComponentDefWithMeta: o.ExternalReference = {
|
static ComponentDefWithMeta: o.ExternalReference = {
|
||||||
name: 'ΔComponentDefWithMeta',
|
name: 'ɵɵComponentDefWithMeta',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defineDirective: o.ExternalReference = {
|
static defineDirective: o.ExternalReference = {
|
||||||
name: 'ΔdefineDirective',
|
name: 'ɵɵdefineDirective',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static DirectiveDefWithMeta: o.ExternalReference = {
|
static DirectiveDefWithMeta: o.ExternalReference = {
|
||||||
name: 'ΔDirectiveDefWithMeta',
|
name: 'ɵɵDirectiveDefWithMeta',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static InjectorDef: o.ExternalReference = {
|
static InjectorDef: o.ExternalReference = {
|
||||||
name: 'ΔInjectorDef',
|
name: 'ɵɵInjectorDef',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defineInjector: o.ExternalReference = {
|
static defineInjector: o.ExternalReference = {
|
||||||
name: 'ΔdefineInjector',
|
name: 'ɵɵdefineInjector',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static NgModuleDefWithMeta: o.ExternalReference = {
|
static NgModuleDefWithMeta: o.ExternalReference = {
|
||||||
name: 'ΔNgModuleDefWithMeta',
|
name: 'ɵɵNgModuleDefWithMeta',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defineNgModule: o.ExternalReference = {name: 'ΔdefineNgModule', moduleName: CORE};
|
static defineNgModule: o.ExternalReference = {name: 'ɵɵdefineNgModule', moduleName: CORE};
|
||||||
static setNgModuleScope: o.ExternalReference = {name: 'ΔsetNgModuleScope', moduleName: CORE};
|
static setNgModuleScope: o.ExternalReference = {name: 'ɵɵsetNgModuleScope', moduleName: CORE};
|
||||||
|
|
||||||
static PipeDefWithMeta: o.ExternalReference = {name: 'ΔPipeDefWithMeta', moduleName: CORE};
|
static PipeDefWithMeta: o.ExternalReference = {name: 'ɵɵPipeDefWithMeta', moduleName: CORE};
|
||||||
|
|
||||||
static definePipe: o.ExternalReference = {name: 'ΔdefinePipe', moduleName: CORE};
|
static definePipe: o.ExternalReference = {name: 'ɵɵdefinePipe', moduleName: CORE};
|
||||||
|
|
||||||
static queryRefresh: o.ExternalReference = {name: 'ΔqueryRefresh', moduleName: CORE};
|
static queryRefresh: o.ExternalReference = {name: 'ɵɵqueryRefresh', moduleName: CORE};
|
||||||
static viewQuery: o.ExternalReference = {name: 'ΔviewQuery', moduleName: CORE};
|
static viewQuery: o.ExternalReference = {name: 'ɵɵviewQuery', moduleName: CORE};
|
||||||
static staticViewQuery: o.ExternalReference = {name: 'ΔstaticViewQuery', moduleName: CORE};
|
static staticViewQuery: o.ExternalReference = {name: 'ɵɵstaticViewQuery', moduleName: CORE};
|
||||||
static staticContentQuery: o.ExternalReference = {name: 'ΔstaticContentQuery', moduleName: CORE};
|
static staticContentQuery: o.ExternalReference = {name: 'ɵɵstaticContentQuery', moduleName: CORE};
|
||||||
static loadViewQuery: o.ExternalReference = {name: 'ΔloadViewQuery', moduleName: CORE};
|
static loadViewQuery: o.ExternalReference = {name: 'ɵɵloadViewQuery', moduleName: CORE};
|
||||||
static contentQuery: o.ExternalReference = {name: 'ΔcontentQuery', moduleName: CORE};
|
static contentQuery: o.ExternalReference = {name: 'ɵɵcontentQuery', moduleName: CORE};
|
||||||
static loadContentQuery: o.ExternalReference = {name: 'ΔloadContentQuery', moduleName: CORE};
|
static loadContentQuery: o.ExternalReference = {name: 'ɵɵloadContentQuery', moduleName: CORE};
|
||||||
|
|
||||||
static NgOnChangesFeature: o.ExternalReference = {name: 'ΔNgOnChangesFeature', moduleName: CORE};
|
static NgOnChangesFeature: o.ExternalReference = {name: 'ɵɵNgOnChangesFeature', moduleName: CORE};
|
||||||
|
|
||||||
static InheritDefinitionFeature:
|
static InheritDefinitionFeature:
|
||||||
o.ExternalReference = {name: 'ΔInheritDefinitionFeature', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵInheritDefinitionFeature', moduleName: CORE};
|
||||||
|
|
||||||
static ProvidersFeature: o.ExternalReference = {name: 'ΔProvidersFeature', moduleName: CORE};
|
static ProvidersFeature: o.ExternalReference = {name: 'ɵɵProvidersFeature', moduleName: CORE};
|
||||||
|
|
||||||
static listener: o.ExternalReference = {name: 'Δlistener', moduleName: CORE};
|
static listener: o.ExternalReference = {name: 'ɵɵlistener', moduleName: CORE};
|
||||||
|
|
||||||
static getFactoryOf: o.ExternalReference = {
|
static getFactoryOf: o.ExternalReference = {
|
||||||
name: 'ΔgetFactoryOf',
|
name: 'ɵɵgetFactoryOf',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static getInheritedFactory: o.ExternalReference = {
|
static getInheritedFactory: o.ExternalReference = {
|
||||||
name: 'ΔgetInheritedFactory',
|
name: 'ɵɵgetInheritedFactory',
|
||||||
moduleName: CORE,
|
moduleName: CORE,
|
||||||
};
|
};
|
||||||
|
|
||||||
// sanitization-related functions
|
// sanitization-related functions
|
||||||
static sanitizeHtml: o.ExternalReference = {name: 'ΔsanitizeHtml', moduleName: CORE};
|
static sanitizeHtml: o.ExternalReference = {name: 'ɵɵsanitizeHtml', moduleName: CORE};
|
||||||
static sanitizeStyle: o.ExternalReference = {name: 'ΔsanitizeStyle', moduleName: CORE};
|
static sanitizeStyle: o.ExternalReference = {name: 'ɵɵsanitizeStyle', moduleName: CORE};
|
||||||
static defaultStyleSanitizer:
|
static defaultStyleSanitizer:
|
||||||
o.ExternalReference = {name: 'ΔdefaultStyleSanitizer', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵdefaultStyleSanitizer', moduleName: CORE};
|
||||||
static sanitizeResourceUrl:
|
static sanitizeResourceUrl:
|
||||||
o.ExternalReference = {name: 'ΔsanitizeResourceUrl', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵsanitizeResourceUrl', moduleName: CORE};
|
||||||
static sanitizeScript: o.ExternalReference = {name: 'ΔsanitizeScript', moduleName: CORE};
|
static sanitizeScript: o.ExternalReference = {name: 'ɵɵsanitizeScript', moduleName: CORE};
|
||||||
static sanitizeUrl: o.ExternalReference = {name: 'ΔsanitizeUrl', moduleName: CORE};
|
static sanitizeUrl: o.ExternalReference = {name: 'ɵɵsanitizeUrl', moduleName: CORE};
|
||||||
static sanitizeUrlOrResourceUrl:
|
static sanitizeUrlOrResourceUrl:
|
||||||
o.ExternalReference = {name: 'ΔsanitizeUrlOrResourceUrl', moduleName: CORE};
|
o.ExternalReference = {name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE};
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If requested to emit scope information inline, pass the declarations, imports and exports to
|
// If requested to emit scope information inline, pass the declarations, imports and exports to
|
||||||
// the `ΔdefineNgModule` call. The JIT compilation uses this.
|
// the `ɵɵdefineNgModule` call. The JIT compilation uses this.
|
||||||
if (emitInline) {
|
if (emitInline) {
|
||||||
if (declarations.length) {
|
if (declarations.length) {
|
||||||
definitionMap.declarations = refsToArray(declarations, containsForwardDecls);
|
definitionMap.declarations = refsToArray(declarations, containsForwardDecls);
|
||||||
@ -117,7 +117,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If not emitting inline, the scope information is not passed into `ΔdefineNgModule` as it would
|
// If not emitting inline, the scope information is not passed into `ɵɵdefineNgModule` as it would
|
||||||
// prevent tree-shaking of the declarations, imports and exports references.
|
// prevent tree-shaking of the declarations, imports and exports references.
|
||||||
else {
|
else {
|
||||||
const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);
|
const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);
|
||||||
@ -141,7 +141,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a function call to `ΔsetNgModuleScope` with all necessary information so that the
|
* Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the
|
||||||
* transitive module scope can be computed during runtime in JIT mode. This call is marked pure
|
* transitive module scope can be computed during runtime in JIT mode. This call is marked pure
|
||||||
* such that the references to declarations, imports and exports may be elided causing these
|
* such that the references to declarations, imports and exports may be elided causing these
|
||||||
* symbols to become tree-shakeable.
|
* symbols to become tree-shakeable.
|
||||||
|
@ -848,7 +848,7 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
|
|||||||
return trimTrailingNulls(parameters);
|
return trimTrailingNulls(parameters);
|
||||||
});
|
});
|
||||||
|
|
||||||
// handle property bindings e.g. ΔelementProperty(1, 'ngForOf', Δbind(ctx.items));
|
// handle property bindings e.g. ɵɵelementProperty(1, 'ngForOf', ɵɵbind(ctx.items));
|
||||||
const context = o.variable(CONTEXT_NAME);
|
const context = o.variable(CONTEXT_NAME);
|
||||||
this.templatePropertyBindings(template, templateIndex, context, template.templateAttrs);
|
this.templatePropertyBindings(template, templateIndex, context, template.templateAttrs);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {ΔdefineInjectable} from '../../di/interface/defs';
|
import {ɵɵdefineInjectable} from '../../di/interface/defs';
|
||||||
import {StaticProvider} from '../../di/interface/provider';
|
import {StaticProvider} from '../../di/interface/provider';
|
||||||
import {Optional, SkipSelf} from '../../di/metadata';
|
import {Optional, SkipSelf} from '../../di/metadata';
|
||||||
import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';
|
import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';
|
||||||
@ -143,7 +143,7 @@ export interface IterableDifferFactory {
|
|||||||
*/
|
*/
|
||||||
export class IterableDiffers {
|
export class IterableDiffers {
|
||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ngInjectableDef = ΔdefineInjectable({
|
static ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])
|
factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Optional, SkipSelf, StaticProvider, ΔdefineInjectable} from '../../di';
|
import {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';
|
||||||
import {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';
|
import {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';
|
||||||
|
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ export interface KeyValueDifferFactory {
|
|||||||
*/
|
*/
|
||||||
export class KeyValueDiffers {
|
export class KeyValueDiffers {
|
||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ngInjectableDef = ΔdefineInjectable({
|
static ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])
|
factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])
|
||||||
});
|
});
|
||||||
|
@ -13,8 +13,8 @@ export {devModeEqual as ɵdevModeEqual} from './change_detection/change_detectio
|
|||||||
export {isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util';
|
export {isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util';
|
||||||
export {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants';
|
export {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants';
|
||||||
export {Console as ɵConsole} from './console';
|
export {Console as ɵConsole} from './console';
|
||||||
export {inject, setCurrentInjector as ɵsetCurrentInjector, Δinject} from './di/injector_compatibility';
|
export {inject, setCurrentInjector as ɵsetCurrentInjector, ɵɵinject} from './di/injector_compatibility';
|
||||||
export {getInjectableDef as ɵgetInjectableDef, ΔInjectableDef as ΔInjectableDef, ΔInjectorDef} from './di/interface/defs';
|
export {getInjectableDef as ɵgetInjectableDef, ɵɵInjectableDef as ɵɵInjectableDef, ɵɵInjectorDef} from './di/interface/defs';
|
||||||
export {APP_ROOT as ɵAPP_ROOT} from './di/scope';
|
export {APP_ROOT as ɵAPP_ROOT} from './di/scope';
|
||||||
export {ivyEnabled as ɵivyEnabled} from './ivy_switch';
|
export {ivyEnabled as ɵivyEnabled} from './ivy_switch';
|
||||||
export {ComponentFactory as ɵComponentFactory} from './linker/component_factory';
|
export {ComponentFactory as ɵComponentFactory} from './linker/component_factory';
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
export {
|
export {
|
||||||
ΔdefineBase,
|
ɵɵdefineBase,
|
||||||
ΔdefineComponent,
|
ɵɵdefineComponent,
|
||||||
ΔdefineDirective,
|
ɵɵdefineDirective,
|
||||||
ΔdefinePipe,
|
ɵɵdefinePipe,
|
||||||
ΔdefineNgModule,
|
ɵɵdefineNgModule,
|
||||||
detectChanges as ɵdetectChanges,
|
detectChanges as ɵdetectChanges,
|
||||||
renderComponent as ɵrenderComponent,
|
renderComponent as ɵrenderComponent,
|
||||||
AttributeMarker as ɵAttributeMarker,
|
AttributeMarker as ɵAttributeMarker,
|
||||||
@ -21,16 +21,16 @@ export {
|
|||||||
ComponentRef as ɵRender3ComponentRef,
|
ComponentRef as ɵRender3ComponentRef,
|
||||||
DirectiveType as ɵDirectiveType,
|
DirectiveType as ɵDirectiveType,
|
||||||
RenderFlags as ɵRenderFlags,
|
RenderFlags as ɵRenderFlags,
|
||||||
ΔdirectiveInject,
|
ɵɵdirectiveInject,
|
||||||
ΔinjectAttribute,
|
ɵɵinjectAttribute,
|
||||||
ΔgetFactoryOf,
|
ɵɵgetFactoryOf,
|
||||||
ΔgetInheritedFactory,
|
ɵɵgetInheritedFactory,
|
||||||
ΔsetComponentScope,
|
ɵɵsetComponentScope,
|
||||||
ΔsetNgModuleScope,
|
ɵɵsetNgModuleScope,
|
||||||
ΔtemplateRefExtractor,
|
ɵɵtemplateRefExtractor,
|
||||||
ΔProvidersFeature,
|
ɵɵProvidersFeature,
|
||||||
ΔInheritDefinitionFeature,
|
ɵɵInheritDefinitionFeature,
|
||||||
ΔNgOnChangesFeature,
|
ɵɵNgOnChangesFeature,
|
||||||
LifecycleHooksFeature as ɵLifecycleHooksFeature,
|
LifecycleHooksFeature as ɵLifecycleHooksFeature,
|
||||||
NgModuleType as ɵNgModuleType,
|
NgModuleType as ɵNgModuleType,
|
||||||
NgModuleRef as ɵRender3NgModuleRef,
|
NgModuleRef as ɵRender3NgModuleRef,
|
||||||
@ -38,108 +38,108 @@ export {
|
|||||||
markDirty as ɵmarkDirty,
|
markDirty as ɵmarkDirty,
|
||||||
NgModuleFactory as ɵNgModuleFactory,
|
NgModuleFactory as ɵNgModuleFactory,
|
||||||
NO_CHANGE as ɵNO_CHANGE,
|
NO_CHANGE as ɵNO_CHANGE,
|
||||||
Δcontainer,
|
ɵɵcontainer,
|
||||||
ΔnextContext,
|
ɵɵnextContext,
|
||||||
ΔelementStart,
|
ɵɵelementStart,
|
||||||
ΔnamespaceHTML,
|
ɵɵnamespaceHTML,
|
||||||
ΔnamespaceMathML,
|
ɵɵnamespaceMathML,
|
||||||
ΔnamespaceSVG,
|
ɵɵnamespaceSVG,
|
||||||
Δelement,
|
ɵɵelement,
|
||||||
Δlistener,
|
ɵɵlistener,
|
||||||
Δtext,
|
ɵɵtext,
|
||||||
ΔembeddedViewStart,
|
ɵɵembeddedViewStart,
|
||||||
Δprojection,
|
ɵɵprojection,
|
||||||
Δbind,
|
ɵɵbind,
|
||||||
Δinterpolation1,
|
ɵɵinterpolation1,
|
||||||
Δinterpolation2,
|
ɵɵinterpolation2,
|
||||||
Δinterpolation3,
|
ɵɵinterpolation3,
|
||||||
Δinterpolation4,
|
ɵɵinterpolation4,
|
||||||
Δinterpolation5,
|
ɵɵinterpolation5,
|
||||||
Δinterpolation6,
|
ɵɵinterpolation6,
|
||||||
Δinterpolation7,
|
ɵɵinterpolation7,
|
||||||
Δinterpolation8,
|
ɵɵinterpolation8,
|
||||||
ΔinterpolationV,
|
ɵɵinterpolationV,
|
||||||
ΔpipeBind1,
|
ɵɵpipeBind1,
|
||||||
ΔpipeBind2,
|
ɵɵpipeBind2,
|
||||||
ΔpipeBind3,
|
ɵɵpipeBind3,
|
||||||
ΔpipeBind4,
|
ɵɵpipeBind4,
|
||||||
ΔpipeBindV,
|
ɵɵpipeBindV,
|
||||||
ΔpureFunction0,
|
ɵɵpureFunction0,
|
||||||
ΔpureFunction1,
|
ɵɵpureFunction1,
|
||||||
ΔpureFunction2,
|
ɵɵpureFunction2,
|
||||||
ΔpureFunction3,
|
ɵɵpureFunction3,
|
||||||
ΔpureFunction4,
|
ɵɵpureFunction4,
|
||||||
ΔpureFunction5,
|
ɵɵpureFunction5,
|
||||||
ΔpureFunction6,
|
ɵɵpureFunction6,
|
||||||
ΔpureFunction7,
|
ɵɵpureFunction7,
|
||||||
ΔpureFunction8,
|
ɵɵpureFunction8,
|
||||||
ΔpureFunctionV,
|
ɵɵpureFunctionV,
|
||||||
ΔgetCurrentView,
|
ɵɵgetCurrentView,
|
||||||
getDirectives as ɵgetDirectives,
|
getDirectives as ɵgetDirectives,
|
||||||
getHostElement as ɵgetHostElement,
|
getHostElement as ɵgetHostElement,
|
||||||
ΔrestoreView,
|
ɵɵrestoreView,
|
||||||
ΔcontainerRefreshStart,
|
ɵɵcontainerRefreshStart,
|
||||||
ΔcontainerRefreshEnd,
|
ɵɵcontainerRefreshEnd,
|
||||||
ΔqueryRefresh,
|
ɵɵqueryRefresh,
|
||||||
ΔviewQuery,
|
ɵɵviewQuery,
|
||||||
ΔstaticViewQuery,
|
ɵɵstaticViewQuery,
|
||||||
ΔstaticContentQuery,
|
ɵɵstaticContentQuery,
|
||||||
ΔloadViewQuery,
|
ɵɵloadViewQuery,
|
||||||
ΔcontentQuery,
|
ɵɵcontentQuery,
|
||||||
ΔloadContentQuery,
|
ɵɵloadContentQuery,
|
||||||
ΔelementEnd,
|
ɵɵelementEnd,
|
||||||
ΔelementProperty,
|
ɵɵelementProperty,
|
||||||
ΔcomponentHostSyntheticProperty,
|
ɵɵcomponentHostSyntheticProperty,
|
||||||
ΔcomponentHostSyntheticListener,
|
ɵɵcomponentHostSyntheticListener,
|
||||||
ΔprojectionDef,
|
ɵɵprojectionDef,
|
||||||
Δreference,
|
ɵɵreference,
|
||||||
ΔenableBindings,
|
ɵɵenableBindings,
|
||||||
ΔdisableBindings,
|
ɵɵdisableBindings,
|
||||||
ΔallocHostVars,
|
ɵɵallocHostVars,
|
||||||
ΔelementAttribute,
|
ɵɵelementAttribute,
|
||||||
ΔelementContainerStart,
|
ɵɵelementContainerStart,
|
||||||
ΔelementContainerEnd,
|
ɵɵelementContainerEnd,
|
||||||
ΔelementStyling,
|
ɵɵelementStyling,
|
||||||
ΔelementStylingMap,
|
ɵɵelementStylingMap,
|
||||||
ΔelementStyleProp,
|
ɵɵelementStyleProp,
|
||||||
ΔelementStylingApply,
|
ɵɵelementStylingApply,
|
||||||
ΔelementClassProp,
|
ɵɵelementClassProp,
|
||||||
|
|
||||||
ΔelementHostAttrs,
|
ɵɵelementHostAttrs,
|
||||||
ΔelementHostStyling,
|
ɵɵelementHostStyling,
|
||||||
ΔelementHostStylingMap,
|
ɵɵelementHostStylingMap,
|
||||||
ΔelementHostStyleProp,
|
ɵɵelementHostStyleProp,
|
||||||
ΔelementHostClassProp,
|
ɵɵelementHostClassProp,
|
||||||
ΔelementHostStylingApply,
|
ɵɵelementHostStylingApply,
|
||||||
|
|
||||||
Δselect,
|
ɵɵselect,
|
||||||
ΔtextBinding,
|
ɵɵtextBinding,
|
||||||
Δtemplate,
|
ɵɵtemplate,
|
||||||
ΔembeddedViewEnd,
|
ɵɵembeddedViewEnd,
|
||||||
store as ɵstore,
|
store as ɵstore,
|
||||||
Δload,
|
ɵɵload,
|
||||||
Δpipe,
|
ɵɵpipe,
|
||||||
ΔBaseDef,
|
ɵɵBaseDef,
|
||||||
ComponentDef as ɵComponentDef,
|
ComponentDef as ɵComponentDef,
|
||||||
ΔComponentDefWithMeta,
|
ɵɵComponentDefWithMeta,
|
||||||
DirectiveDef as ɵDirectiveDef,
|
DirectiveDef as ɵDirectiveDef,
|
||||||
ΔDirectiveDefWithMeta,
|
ɵɵDirectiveDefWithMeta,
|
||||||
PipeDef as ɵPipeDef,
|
PipeDef as ɵPipeDef,
|
||||||
ΔPipeDefWithMeta,
|
ɵɵPipeDefWithMeta,
|
||||||
whenRendered as ɵwhenRendered,
|
whenRendered as ɵwhenRendered,
|
||||||
Δi18n,
|
ɵɵi18n,
|
||||||
Δi18nAttributes,
|
ɵɵi18nAttributes,
|
||||||
Δi18nExp,
|
ɵɵi18nExp,
|
||||||
Δi18nStart,
|
ɵɵi18nStart,
|
||||||
Δi18nEnd,
|
ɵɵi18nEnd,
|
||||||
Δi18nApply,
|
ɵɵi18nApply,
|
||||||
Δi18nPostprocess,
|
ɵɵi18nPostprocess,
|
||||||
i18nConfigureLocalize as ɵi18nConfigureLocalize,
|
i18nConfigureLocalize as ɵi18nConfigureLocalize,
|
||||||
Δi18nLocalize,
|
ɵɵi18nLocalize,
|
||||||
setClassMetadata as ɵsetClassMetadata,
|
setClassMetadata as ɵsetClassMetadata,
|
||||||
ΔresolveWindow,
|
ɵɵresolveWindow,
|
||||||
ΔresolveDocument,
|
ɵɵresolveDocument,
|
||||||
ΔresolveBody,
|
ɵɵresolveBody,
|
||||||
} from './render3/index';
|
} from './render3/index';
|
||||||
|
|
||||||
|
|
||||||
@ -161,18 +161,18 @@ export {
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
NgModuleDef as ɵNgModuleDef,
|
NgModuleDef as ɵNgModuleDef,
|
||||||
ΔNgModuleDefWithMeta,
|
ɵɵNgModuleDefWithMeta,
|
||||||
NgModuleTransitiveScopes as ɵNgModuleTransitiveScopes,
|
NgModuleTransitiveScopes as ɵNgModuleTransitiveScopes,
|
||||||
} from './metadata/ng_module';
|
} from './metadata/ng_module';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ΔsanitizeHtml,
|
ɵɵsanitizeHtml,
|
||||||
ΔsanitizeStyle,
|
ɵɵsanitizeStyle,
|
||||||
ΔdefaultStyleSanitizer,
|
ɵɵdefaultStyleSanitizer,
|
||||||
ΔsanitizeScript,
|
ɵɵsanitizeScript,
|
||||||
ΔsanitizeUrl,
|
ɵɵsanitizeUrl,
|
||||||
ΔsanitizeResourceUrl,
|
ɵɵsanitizeResourceUrl,
|
||||||
ΔsanitizeUrlOrResourceUrl,
|
ɵɵsanitizeUrlOrResourceUrl,
|
||||||
} from './sanitization/sanitization';
|
} from './sanitization/sanitization';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
|
|
||||||
export * from './metadata';
|
export * from './metadata';
|
||||||
export {InjectFlags} from './interface/injector';
|
export {InjectFlags} from './interface/injector';
|
||||||
export {ΔdefineInjectable, defineInjectable, ΔdefineInjector, InjectableType, InjectorType} from './interface/defs';
|
export {ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, InjectableType, InjectorType} from './interface/defs';
|
||||||
export {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref';
|
export {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref';
|
||||||
export {Injectable, InjectableDecorator, InjectableProvider} from './injectable';
|
export {Injectable, InjectableDecorator, InjectableProvider} from './injectable';
|
||||||
export {INJECTOR, Injector} from './injector';
|
export {INJECTOR, Injector} from './injector';
|
||||||
export {Δinject, inject} from './injector_compatibility';
|
export {ɵɵinject, inject} from './injector_compatibility';
|
||||||
export {ReflectiveInjector} from './reflective_injector';
|
export {ReflectiveInjector} from './reflective_injector';
|
||||||
export {StaticProvider, ValueProvider, ConstructorSansProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ClassProvider} from './interface/provider';
|
export {StaticProvider, ValueProvider, ConstructorSansProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ClassProvider} from './interface/provider';
|
||||||
export {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider';
|
export {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider';
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import {Type} from '../interface/type';
|
import {Type} from '../interface/type';
|
||||||
import {TypeDecorator, makeDecorator} from '../util/decorators';
|
import {TypeDecorator, makeDecorator} from '../util/decorators';
|
||||||
|
|
||||||
import {InjectableType, getInjectableDef, ΔInjectableDef, ΔdefineInjectable} from './interface/defs';
|
import {InjectableType, getInjectableDef, ɵɵInjectableDef, ɵɵdefineInjectable} from './interface/defs';
|
||||||
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';
|
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';
|
||||||
import {compileInjectable as render3CompileInjectable} from './jit/injectable';
|
import {compileInjectable as render3CompileInjectable} from './jit/injectable';
|
||||||
import {convertInjectableProviderToFactory} from './util';
|
import {convertInjectableProviderToFactory} from './util';
|
||||||
@ -80,7 +80,7 @@ export const Injectable: InjectableDecorator = makeDecorator(
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export interface InjectableType<T> extends Type<T> { ngInjectableDef: ΔInjectableDef<T>; }
|
export interface InjectableType<T> extends Type<T> { ngInjectableDef: ɵɵInjectableDef<T>; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supports @Injectable() in JIT mode for Render2.
|
* Supports @Injectable() in JIT mode for Render2.
|
||||||
@ -89,7 +89,7 @@ function render2CompileInjectable(
|
|||||||
injectableType: InjectableType<any>,
|
injectableType: InjectableType<any>,
|
||||||
options: {providedIn?: Type<any>| 'root' | null} & InjectableProvider): void {
|
options: {providedIn?: Type<any>| 'root' | null} & InjectableProvider): void {
|
||||||
if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {
|
if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {
|
||||||
injectableType.ngInjectableDef = ΔdefineInjectable({
|
injectableType.ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: options.providedIn,
|
providedIn: options.providedIn,
|
||||||
factory: convertInjectableProviderToFactory(injectableType, options),
|
factory: convertInjectableProviderToFactory(injectableType, options),
|
||||||
});
|
});
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import {Type} from '../interface/type';
|
import {Type} from '../interface/type';
|
||||||
|
|
||||||
import {ΔdefineInjectable} from './interface/defs';
|
import {ɵɵdefineInjectable} from './interface/defs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a token that can be used in a DI Provider.
|
* Creates a token that can be used in a DI Provider.
|
||||||
@ -67,7 +67,7 @@ export class InjectionToken<T> {
|
|||||||
// We are using it to assign `-1` which is used to identify `Injector`.
|
// We are using it to assign `-1` which is used to identify `Injector`.
|
||||||
(this as any).__NG_ELEMENT_ID__ = options;
|
(this as any).__NG_ELEMENT_ID__ = options;
|
||||||
} else if (options !== undefined) {
|
} else if (options !== undefined) {
|
||||||
this.ngInjectableDef = ΔdefineInjectable({
|
this.ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: options.providedIn || 'root',
|
providedIn: options.providedIn || 'root',
|
||||||
factory: options.factory,
|
factory: options.factory,
|
||||||
});
|
});
|
||||||
|
@ -11,8 +11,8 @@ import {getClosureSafeProperty} from '../util/property';
|
|||||||
import {stringify} from '../util/stringify';
|
import {stringify} from '../util/stringify';
|
||||||
import {resolveForwardRef} from './forward_ref';
|
import {resolveForwardRef} from './forward_ref';
|
||||||
import {InjectionToken} from './injection_token';
|
import {InjectionToken} from './injection_token';
|
||||||
import {Δinject} from './injector_compatibility';
|
import {ɵɵinject} from './injector_compatibility';
|
||||||
import {ΔdefineInjectable} from './interface/defs';
|
import {ɵɵdefineInjectable} from './interface/defs';
|
||||||
import {InjectFlags} from './interface/injector';
|
import {InjectFlags} from './interface/injector';
|
||||||
import {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';
|
import {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';
|
||||||
import {Inject, Optional, Self, SkipSelf} from './metadata';
|
import {Inject, Optional, Self, SkipSelf} from './metadata';
|
||||||
@ -107,9 +107,9 @@ export abstract class Injector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ngInjectableDef = ΔdefineInjectable({
|
static ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: 'any' as any,
|
providedIn: 'any' as any,
|
||||||
factory: () => Δinject(INJECTOR),
|
factory: () => ɵɵinject(INJECTOR),
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@ import {stringify} from '../util/stringify';
|
|||||||
|
|
||||||
import {InjectionToken} from './injection_token';
|
import {InjectionToken} from './injection_token';
|
||||||
import {Injector} from './injector';
|
import {Injector} from './injector';
|
||||||
import {getInjectableDef, ΔInjectableDef} from './interface/defs';
|
import {getInjectableDef, ɵɵInjectableDef} from './interface/defs';
|
||||||
import {InjectFlags} from './interface/injector';
|
import {InjectFlags} from './interface/injector';
|
||||||
import {Inject, Optional, Self, SkipSelf} from './metadata';
|
import {Inject, Optional, Self, SkipSelf} from './metadata';
|
||||||
|
|
||||||
@ -97,17 +97,18 @@ export function injectInjectorOnly<T>(
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function Δinject<T>(token: Type<T>| InjectionToken<T>): T;
|
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>): T;
|
||||||
export function Δinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;
|
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;
|
||||||
export function Δinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {
|
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|
|
||||||
|
null {
|
||||||
return (_injectImplementation || injectInjectorOnly)(token, flags);
|
return (_injectImplementation || injectInjectorOnly)(token, flags);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @deprecated in v8, delete after v10. This API should be used only be generated code, and that
|
* @deprecated in v8, delete after v10. This API should be used only be generated code, and that
|
||||||
* code should now use Δinject instead.
|
* code should now use ɵɵinject instead.
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export const inject = Δinject;
|
export const inject = ɵɵinject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects `root` tokens in limp mode.
|
* Injects `root` tokens in limp mode.
|
||||||
@ -118,7 +119,7 @@ export const inject = Δinject;
|
|||||||
*/
|
*/
|
||||||
export function injectRootLimpMode<T>(
|
export function injectRootLimpMode<T>(
|
||||||
token: Type<T>| InjectionToken<T>, notFoundValue: T | undefined, flags: InjectFlags): T|null {
|
token: Type<T>| InjectionToken<T>, notFoundValue: T | undefined, flags: InjectFlags): T|null {
|
||||||
const injectableDef: ΔInjectableDef<T>|null = getInjectableDef(token);
|
const injectableDef: ɵɵInjectableDef<T>|null = getInjectableDef(token);
|
||||||
if (injectableDef && injectableDef.providedIn == 'root') {
|
if (injectableDef && injectableDef.providedIn == 'root') {
|
||||||
return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
|
return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :
|
||||||
injectableDef.value;
|
injectableDef.value;
|
||||||
@ -154,9 +155,9 @@ export function injectArgs(types: (Type<any>| InjectionToken<any>| any[])[]): an
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
args.push(Δinject(type !, flags));
|
args.push(ɵɵinject(type !, flags));
|
||||||
} else {
|
} else {
|
||||||
args.push(Δinject(arg));
|
args.push(ɵɵinject(arg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
|
@ -26,7 +26,7 @@ import {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, S
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export interface ΔInjectableDef<T> {
|
export interface ɵɵInjectableDef<T> {
|
||||||
/**
|
/**
|
||||||
* Specifies that the given type belongs to a particular injector:
|
* Specifies that the given type belongs to a particular injector:
|
||||||
* - `InjectorType` such as `NgModule`,
|
* - `InjectorType` such as `NgModule`,
|
||||||
@ -60,7 +60,7 @@ export interface ΔInjectableDef<T> {
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export interface ΔInjectorDef<T> {
|
export interface ɵɵInjectorDef<T> {
|
||||||
factory: () => T;
|
factory: () => T;
|
||||||
|
|
||||||
// TODO(alxhub): Narrow down the type here once decorators properly change the return type of the
|
// TODO(alxhub): Narrow down the type here once decorators properly change the return type of the
|
||||||
@ -131,21 +131,21 @@ export interface InjectorTypeWithProviders<T> {
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔdefineInjectable<T>(opts: {
|
export function ɵɵdefineInjectable<T>(opts: {
|
||||||
providedIn?: Type<any>| 'root' | 'any' | null,
|
providedIn?: Type<any>| 'root' | 'any' | null,
|
||||||
factory: () => T,
|
factory: () => T,
|
||||||
}): never {
|
}): never {
|
||||||
return ({
|
return ({
|
||||||
providedIn: opts.providedIn as any || null, factory: opts.factory, value: undefined,
|
providedIn: opts.providedIn as any || null, factory: opts.factory, value: undefined,
|
||||||
} as ΔInjectableDef<T>) as never;
|
} as ɵɵInjectableDef<T>) as never;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated in v8, delete after v10. This API should be used only be generated code, and that
|
* @deprecated in v8, delete after v10. This API should be used only be generated code, and that
|
||||||
* code should now use ΔdefineInjectable instead.
|
* code should now use ɵɵdefineInjectable instead.
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export const defineInjectable = ΔdefineInjectable;
|
export const defineInjectable = ɵɵdefineInjectable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct an `InjectorDef` which configures an injector.
|
* Construct an `InjectorDef` which configures an injector.
|
||||||
@ -167,11 +167,11 @@ export const defineInjectable = ΔdefineInjectable;
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):
|
export function ɵɵdefineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):
|
||||||
never {
|
never {
|
||||||
return ({
|
return ({
|
||||||
factory: options.factory, providers: options.providers || [], imports: options.imports || [],
|
factory: options.factory, providers: options.providers || [], imports: options.imports || [],
|
||||||
} as ΔInjectorDef<any>) as never;
|
} as ɵɵInjectorDef<any>) as never;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -179,7 +179,7 @@ export function ΔdefineInjector(options: {factory: () => any, providers?: any[]
|
|||||||
*
|
*
|
||||||
* @param type type which may have `ngInjectableDef`
|
* @param type type which may have `ngInjectableDef`
|
||||||
*/
|
*/
|
||||||
export function getInjectableDef<T>(type: any): ΔInjectableDef<T>|null {
|
export function getInjectableDef<T>(type: any): ɵɵInjectableDef<T>|null {
|
||||||
return type && type.hasOwnProperty(NG_INJECTABLE_DEF) ? (type as any)[NG_INJECTABLE_DEF] : null;
|
return type && type.hasOwnProperty(NG_INJECTABLE_DEF) ? (type as any)[NG_INJECTABLE_DEF] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ export function getInjectableDef<T>(type: any): ΔInjectableDef<T>|null {
|
|||||||
*
|
*
|
||||||
* @param type type which may have `ngInjectorDef`
|
* @param type type which may have `ngInjectorDef`
|
||||||
*/
|
*/
|
||||||
export function getInjectorDef<T>(type: any): ΔInjectorDef<T>|null {
|
export function getInjectorDef<T>(type: any): ɵɵInjectorDef<T>|null {
|
||||||
return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? (type as any)[NG_INJECTOR_DEF] : null;
|
return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? (type as any)[NG_INJECTOR_DEF] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {Type} from '../../interface/type';
|
import {Type} from '../../interface/type';
|
||||||
import {Δinject} from '../injector_compatibility';
|
import {ɵɵinject} from '../injector_compatibility';
|
||||||
import {getInjectableDef, getInjectorDef, ΔdefineInjectable, ΔdefineInjector} from '../interface/defs';
|
import {getInjectableDef, getInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -18,10 +18,10 @@ import {getInjectableDef, getInjectorDef, ΔdefineInjectable, ΔdefineInjector}
|
|||||||
* This should be kept up to date with the public exports of @angular/core.
|
* This should be kept up to date with the public exports of @angular/core.
|
||||||
*/
|
*/
|
||||||
export const angularCoreDiEnv: {[name: string]: Function} = {
|
export const angularCoreDiEnv: {[name: string]: Function} = {
|
||||||
'ΔdefineInjectable': ΔdefineInjectable,
|
'ɵɵdefineInjectable': ɵɵdefineInjectable,
|
||||||
'ΔdefineInjector': ΔdefineInjector,
|
'ɵɵdefineInjector': ɵɵdefineInjector,
|
||||||
'Δinject': Δinject,
|
'ɵɵinject': ɵɵinject,
|
||||||
'ΔgetFactoryOf': getFactoryOf,
|
'ɵɵgetFactoryOf': getFactoryOf,
|
||||||
};
|
};
|
||||||
|
|
||||||
function getFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)|null {
|
function getFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)|null {
|
||||||
|
@ -13,8 +13,8 @@ import {stringify} from '../util/stringify';
|
|||||||
import {resolveForwardRef} from './forward_ref';
|
import {resolveForwardRef} from './forward_ref';
|
||||||
import {InjectionToken} from './injection_token';
|
import {InjectionToken} from './injection_token';
|
||||||
import {INJECTOR, Injector, NG_TEMP_TOKEN_PATH, NullInjector, USE_VALUE, catchInjectorError} from './injector';
|
import {INJECTOR, Injector, NG_TEMP_TOKEN_PATH, NullInjector, USE_VALUE, catchInjectorError} from './injector';
|
||||||
import {injectArgs, setCurrentInjector, Δinject} from './injector_compatibility';
|
import {injectArgs, setCurrentInjector, ɵɵinject} from './injector_compatibility';
|
||||||
import {InjectableType, InjectorType, InjectorTypeWithProviders, getInjectableDef, getInjectorDef, ΔInjectableDef} from './interface/defs';
|
import {InjectableType, InjectorType, InjectorTypeWithProviders, getInjectableDef, getInjectorDef, ɵɵInjectableDef} from './interface/defs';
|
||||||
import {InjectFlags} from './interface/injector';
|
import {InjectFlags} from './interface/injector';
|
||||||
import {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';
|
import {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';
|
||||||
import {APP_ROOT} from './scope';
|
import {APP_ROOT} from './scope';
|
||||||
@ -356,7 +356,7 @@ export class R3Injector {
|
|||||||
return record.value as T;
|
return record.value as T;
|
||||||
}
|
}
|
||||||
|
|
||||||
private injectableDefInScope(def: ΔInjectableDef<any>): boolean {
|
private injectableDefInScope(def: ɵɵInjectableDef<any>): boolean {
|
||||||
if (!def.providedIn) {
|
if (!def.providedIn) {
|
||||||
return false;
|
return false;
|
||||||
} else if (typeof def.providedIn === 'string') {
|
} else if (typeof def.providedIn === 'string') {
|
||||||
@ -413,7 +413,7 @@ export function providerToFactory(
|
|||||||
if (isValueProvider(provider)) {
|
if (isValueProvider(provider)) {
|
||||||
factory = () => resolveForwardRef(provider.useValue);
|
factory = () => resolveForwardRef(provider.useValue);
|
||||||
} else if (isExistingProvider(provider)) {
|
} else if (isExistingProvider(provider)) {
|
||||||
factory = () => Δinject(resolveForwardRef(provider.useExisting));
|
factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));
|
||||||
} else if (isFactoryProvider(provider)) {
|
} else if (isFactoryProvider(provider)) {
|
||||||
factory = () => provider.useFactory(...injectArgs(provider.deps || []));
|
factory = () => provider.useFactory(...injectArgs(provider.deps || []));
|
||||||
} else {
|
} else {
|
||||||
|
@ -10,7 +10,7 @@ import {Type} from '../interface/type';
|
|||||||
import {ReflectionCapabilities} from '../reflection/reflection_capabilities';
|
import {ReflectionCapabilities} from '../reflection/reflection_capabilities';
|
||||||
import {getClosureSafeProperty} from '../util/property';
|
import {getClosureSafeProperty} from '../util/property';
|
||||||
|
|
||||||
import {injectArgs, Δinject} from './injector_compatibility';
|
import {injectArgs, ɵɵinject} from './injector_compatibility';
|
||||||
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';
|
import {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';
|
||||||
|
|
||||||
const USE_VALUE =
|
const USE_VALUE =
|
||||||
@ -32,7 +32,7 @@ export function convertInjectableProviderToFactory(
|
|||||||
return () => valueProvider.useValue;
|
return () => valueProvider.useValue;
|
||||||
} else if ((provider as ExistingSansProvider).useExisting) {
|
} else if ((provider as ExistingSansProvider).useExisting) {
|
||||||
const existingProvider = (provider as ExistingSansProvider);
|
const existingProvider = (provider as ExistingSansProvider);
|
||||||
return () => Δinject(existingProvider.useExisting);
|
return () => ɵɵinject(existingProvider.useExisting);
|
||||||
} else if ((provider as FactorySansProvider).useFactory) {
|
} else if ((provider as FactorySansProvider).useFactory) {
|
||||||
const factoryProvider = (provider as FactorySansProvider);
|
const factoryProvider = (provider as FactorySansProvider);
|
||||||
return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));
|
return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {ApplicationRef} from '../application_ref';
|
import {ApplicationRef} from '../application_ref';
|
||||||
import {InjectorType, ΔdefineInjector} from '../di/interface/defs';
|
import {InjectorType, ɵɵdefineInjector} from '../di/interface/defs';
|
||||||
import {Provider} from '../di/interface/provider';
|
import {Provider} from '../di/interface/provider';
|
||||||
import {convertInjectableProviderToFactory} from '../di/util';
|
import {convertInjectableProviderToFactory} from '../di/util';
|
||||||
import {Type} from '../interface/type';
|
import {Type} from '../interface/type';
|
||||||
@ -35,7 +35,7 @@ export interface NgModuleTransitiveScopes {
|
|||||||
/**
|
/**
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export type ΔNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;
|
export type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleDef<T>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runtime link information for NgModules.
|
* Runtime link information for NgModules.
|
||||||
@ -43,7 +43,7 @@ export type ΔNgModuleDefWithMeta<T, Declarations, Imports, Exports> = NgModuleD
|
|||||||
* This is the internal data structure used by the runtime to assemble components, directives,
|
* This is the internal data structure used by the runtime to assemble components, directives,
|
||||||
* pipes, and injectors.
|
* pipes, and injectors.
|
||||||
*
|
*
|
||||||
* NOTE: Always use `ΔdefineNgModule` function to create this object,
|
* NOTE: Always use `ɵɵdefineNgModule` function to create this object,
|
||||||
* never create the object directly since the shape of this object
|
* never create the object directly since the shape of this object
|
||||||
* can change between versions.
|
* can change between versions.
|
||||||
*/
|
*/
|
||||||
@ -347,7 +347,7 @@ function preR3NgModuleCompile(moduleType: InjectorType<any>, metadata: NgModule)
|
|||||||
imports = [...imports, metadata.exports];
|
imports = [...imports, metadata.exports];
|
||||||
}
|
}
|
||||||
|
|
||||||
moduleType.ngInjectorDef = ΔdefineInjector({
|
moduleType.ngInjectorDef = ɵɵdefineInjector({
|
||||||
factory: convertInjectableProviderToFactory(moduleType, {useClass: moduleType}),
|
factory: convertInjectableProviderToFactory(moduleType, {useClass: moduleType}),
|
||||||
providers: metadata && metadata.providers,
|
providers: metadata && metadata.providers,
|
||||||
imports: imports,
|
imports: imports,
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
* The below symbols are used for @Injectable and @NgModule compilation.
|
* The below symbols are used for @Injectable and @NgModule compilation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export {Δinject} from './di/injector_compatibility';
|
export {ɵɵinject} from './di/injector_compatibility';
|
||||||
export {ΔInjectableDef, ΔInjectorDef, ΔdefineInjectable, ΔdefineInjector} from './di/interface/defs';
|
export {ɵɵInjectableDef, ɵɵInjectorDef, ɵɵdefineInjectable, ɵɵdefineInjector} from './di/interface/defs';
|
||||||
export {NgModuleDef, ΔNgModuleDefWithMeta} from './metadata/ng_module';
|
export {NgModuleDef, ɵɵNgModuleDefWithMeta} from './metadata/ng_module';
|
||||||
export {ΔdefineNgModule} from './render3/definition';
|
export {ɵɵdefineNgModule} from './render3/definition';
|
||||||
export {setClassMetadata} from './render3/metadata';
|
export {setClassMetadata} from './render3/metadata';
|
||||||
export {NgModuleFactory} from './render3/ng_module_ref';
|
export {NgModuleFactory} from './render3/ng_module_ref';
|
||||||
|
|
||||||
|
11
packages/core/src/render3/CODE_GEN_API.md
Normal file
11
packages/core/src/render3/CODE_GEN_API.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Code Gen API
|
||||||
|
|
||||||
|
### Prefix ɵɵ
|
||||||
|
|
||||||
|
Ivy exports a number of functions prefixed with `ɵɵ`, for example `ɵɵelementStart`, or `ɵɵinject`, et al. These functions are part of API required for code generation by the Angular compiler. These functions are called by generated code, and they must be publicly exposed in order to be consumed by this generated code. **They are not meant for developer consumption**. The reason they are prefixed with `ɵɵ` is not only to identify them as different from other functions, but also to make them not show up at the top of IDE code completion in environments such as Visual Studio code.
|
||||||
|
|
||||||
|
|
||||||
|
### Guidance
|
||||||
|
|
||||||
|
- Do not use `ɵɵ` functions directly. They are meant to be used in generated code.
|
||||||
|
- Do not create new `ɵɵ` functions, it's not a convention that Angular consumes, and it is liable to confuse other developers into thinking consuming Angular's `ɵɵ` functions is a good pattern to follow.
|
@ -1,9 +0,0 @@
|
|||||||
# Delta Instructions
|
|
||||||
|
|
||||||
Ivy exports a number of functions prefixed with `Δ`, for example `ΔelementStart`, or `Δinject`, et al. These functions are referred to an "instructions" or "delta" instructions. They are functions that are called by code generated by the Ivy compiler that must be publicly exposed in order to be consumed by this generated code. **They are not meant for developer consumption**. The reason they are prefixed with `Δ` is not only to identify them as different from other functions, but also to make them not show up at the top of IDE code completion in environments such as Visual Studio code.
|
|
||||||
|
|
||||||
|
|
||||||
### Guidance
|
|
||||||
|
|
||||||
- Do not use `Δ` functions directly. They are meant to be used in generated code.
|
|
||||||
- Do not create new `Δ` functions, it's not a convention that Angular consumes, and it is liable to confuse other developers into thinking consuming Angular's `Δ` functions is a good pattern to follow.
|
|
@ -10,8 +10,8 @@ We currently expect Ivy to remain behind the flag until it's feature complete an
|
|||||||
|
|
||||||
The work can be divided into three categories:
|
The work can be divided into three categories:
|
||||||
- `@angular/compiler-cli`: TypeScript transformer pipeline which includes two command line tools:
|
- `@angular/compiler-cli`: TypeScript transformer pipeline which includes two command line tools:
|
||||||
- `ngtsc`: (Angular TypeScript Compiler) Angular compiler which strips out `@Component` (and friends) and replaces it with `ΔdefineComponent` (and friends).
|
- `ngtsc`: (Angular TypeScript Compiler) Angular compiler which strips out `@Component` (and friends) and replaces it with `ɵɵdefineComponent` (and friends).
|
||||||
- `ngcc`: (Angular Compatibility Compiler) NPM upgrade compiler which reads the `STORING_METADATA_IN_D.TS.json` files and `.js` files and adds `ΔdefineComponent` (and friends) into the `node_module`. This in effect converts a pre-ivy module into ivy module.
|
- `ngcc`: (Angular Compatibility Compiler) NPM upgrade compiler which reads the `STORING_METADATA_IN_D.TS.json` files and `.js` files and adds `ɵɵdefineComponent` (and friends) into the `node_module`. This in effect converts a pre-ivy module into ivy module.
|
||||||
- `@angular/compiler`: Ivy Compiler which converts decorator into ivy
|
- `@angular/compiler`: Ivy Compiler which converts decorator into ivy
|
||||||
- `@angular/core`: Decorators which can be patched with `@angular/compiler`.
|
- `@angular/core`: Decorators which can be patched with `@angular/compiler`.
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ The work can be divided into three categories:
|
|||||||
### `ngtsc` TSC compiler transformer
|
### `ngtsc` TSC compiler transformer
|
||||||
|
|
||||||
TSC transformer which removes and converts `@Pipe`, `@Component`, `@Directive` and `@NgModule`
|
TSC transformer which removes and converts `@Pipe`, `@Component`, `@Directive` and `@NgModule`
|
||||||
to the corresponding `ΔdefinePipe`, `ΔdefineComponent`, `ΔdefineDirective` and `ΔdefineInjector`.
|
to the corresponding `ɵɵdefinePipe`, `ɵɵdefineComponent`, `ɵɵdefineDirective` and `ɵɵdefineInjector`.
|
||||||
|
|
||||||
- ✅ Basic setup of the transformer into `tsc`
|
- ✅ Basic setup of the transformer into `tsc`
|
||||||
- ✅ Can read STORING_METADATA_IN_D.TS from `.d.ts` (see: [STORING_METADATA_IN_D.TS.md](./STORING_METADATA_IN_D.TS.md))
|
- ✅ Can read STORING_METADATA_IN_D.TS from `.d.ts` (see: [STORING_METADATA_IN_D.TS.md](./STORING_METADATA_IN_D.TS.md))
|
||||||
@ -40,19 +40,19 @@ A tool which "upgrades" `node_module` compiled with non-ivy `ngc` into ivy compl
|
|||||||
|
|
||||||
## `@angular/compiler` changes
|
## `@angular/compiler` changes
|
||||||
|
|
||||||
- ✅ Component compilation: Translates `@Component` => `ΔdefineComponent`
|
- ✅ Component compilation: Translates `@Component` => `ɵɵdefineComponent`
|
||||||
- ✅ `TemplateCompiler` (current known as `ViewCompiler`)
|
- ✅ `TemplateCompiler` (current known as `ViewCompiler`)
|
||||||
- ✅ `StyleCompiler`
|
- ✅ `StyleCompiler`
|
||||||
- ✅ `PipeCompiler`: Translates `@Pipe` => `ΔdefinePipe`
|
- ✅ `PipeCompiler`: Translates `@Pipe` => `ɵɵdefinePipe`
|
||||||
- ✅ `DirectiveCompiler`: Translates `@Directive` => `ΔdefineDirective`
|
- ✅ `DirectiveCompiler`: Translates `@Directive` => `ɵɵdefineDirective`
|
||||||
- ✅ `InjectableCompiler`: Translates `@Injectable` => `ΔdefineInjectable`
|
- ✅ `InjectableCompiler`: Translates `@Injectable` => `ɵɵdefineInjectable`
|
||||||
- ✅ `NgModuleCompiler`: Translates `@NgModule` => `ΔdefineInjector` (and `ΔdefineNgModule` only in jit)
|
- ✅ `NgModuleCompiler`: Translates `@NgModule` => `ɵɵdefineInjector` (and `ɵɵdefineNgModule` only in jit)
|
||||||
- ❌ Documentation
|
- ❌ Documentation
|
||||||
|
|
||||||
|
|
||||||
## `@angular/core` changes
|
## `@angular/core` changes
|
||||||
|
|
||||||
The goal is for the `@Component` (and friends) to be the compiler of template. Since decorators are functions which execute during parsing of the `.js` file, the decorator can compile the template into Ivy. The AoT compiler's job is to remove the `@Component` and replace it with call to `ΔdefineComponent`.
|
The goal is for the `@Component` (and friends) to be the compiler of template. Since decorators are functions which execute during parsing of the `.js` file, the decorator can compile the template into Ivy. The AoT compiler's job is to remove the `@Component` and replace it with call to `ɵɵdefineComponent`.
|
||||||
|
|
||||||
- ✅ `@angular/compiler` can patch itself onto:
|
- ✅ `@angular/compiler` can patch itself onto:
|
||||||
- ✅ `@Injectable`
|
- ✅ `@Injectable`
|
||||||
@ -70,13 +70,13 @@ The goal is for the `@Component` (and friends) to be the compiler of template. S
|
|||||||
## Decorators
|
## Decorators
|
||||||
| Annotation | `defineXXX()` | Run time | Spec | Compiler |
|
| Annotation | `defineXXX()` | Run time | Spec | Compiler |
|
||||||
| -------------------- | ------------------------------ | ------- | -------- | -------- |
|
| -------------------- | ------------------------------ | ------- | -------- | -------- |
|
||||||
| `@Component` | ✅ `ΔdefineComponent()` | ✅ | ✅ | ✅ |
|
| `@Component` | ✅ `ɵɵdefineComponent()` | ✅ | ✅ | ✅ |
|
||||||
| `@Directive` | ✅ `ΔdefineDirective()` | ✅ | ✅ | ✅ |
|
| `@Directive` | ✅ `ɵɵdefineDirective()` | ✅ | ✅ | ✅ |
|
||||||
| `@Directive` | ✅ `ΔdefineBase()` | ✅ | ✅ | ✅ |
|
| `@Directive` | ✅ `ɵɵdefineBase()` | ✅ | ✅ | ✅ |
|
||||||
| `@Pipe` | ✅ `ΔdefinePipe()` | ✅ | ✅ | ✅ |
|
| `@Pipe` | ✅ `ɵɵdefinePipe()` | ✅ | ✅ | ✅ |
|
||||||
| `@Injectable` | ✅ `ΔdefineInjectable()` | ✅ | ✅ | ✅ |
|
| `@Injectable` | ✅ `ɵɵdefineInjectable()` | ✅ | ✅ | ✅ |
|
||||||
| `@NgModule` | ✅ `ΔdefineInjector()` | ✅ | ✅ | ✅ |
|
| `@NgModule` | ✅ `ɵɵdefineInjector()` | ✅ | ✅ | ✅ |
|
||||||
| `@ConfigureInjector` | ✅ `ΔdefineInjector()` | ❌ | ❌ | ❌ |
|
| `@ConfigureInjector` | ✅ `ɵɵdefineInjector()` | ❌ | ❌ | ❌ |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Here is an abbreviated example of breakage of tree-shake-ability.
|
|||||||
})
|
})
|
||||||
export class TooltipDirective {
|
export class TooltipDirective {
|
||||||
// ngtsc generates this:
|
// ngtsc generates this:
|
||||||
static ngDirectiveDef = ΔdefineDirective(...);
|
static ngDirectiveDef = ɵɵdefineDirective(...);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -22,7 +22,7 @@ export class TooltipDirective {
|
|||||||
})
|
})
|
||||||
class MyAppComponent {
|
class MyAppComponent {
|
||||||
// ngtsc generates this:
|
// ngtsc generates this:
|
||||||
static ngDirectiveDef = ΔdefineComponent({
|
static ngDirectiveDef = ɵɵdefineComponent({
|
||||||
...
|
...
|
||||||
directives: [
|
directives: [
|
||||||
// BREAKS TREE-SHAKING!!!
|
// BREAKS TREE-SHAKING!!!
|
||||||
@ -41,7 +41,7 @@ class MyAppComponent {
|
|||||||
})
|
})
|
||||||
class MyAppModule {
|
class MyAppModule {
|
||||||
// ngtsc generates this:
|
// ngtsc generates this:
|
||||||
static ngDirectiveDef = ΔdefineNgModule(...);
|
static ngDirectiveDef = ɵɵdefineNgModule(...);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -36,18 +36,18 @@ The size of the `CONSTS` section is declared in the property `consts` of the com
|
|||||||
})
|
})
|
||||||
class MyApp {
|
class MyApp {
|
||||||
|
|
||||||
static ngComponentDef = ΔdefineComponent({
|
static ngComponentDef = ɵɵdefineComponent({
|
||||||
...,
|
...,
|
||||||
consts: 5,
|
consts: 5,
|
||||||
template: function(rf: RenderFlags, ctx: MyApp) {
|
template: function(rf: RenderFlags, ctx: MyApp) {
|
||||||
if (rf & RenderFlags.Create) {
|
if (rf & RenderFlags.Create) {
|
||||||
ΔelementStart(0, 'div');
|
ɵɵelementStart(0, 'div');
|
||||||
Δtext(1, 'Hello ');
|
ɵɵtext(1, 'Hello ');
|
||||||
ΔelementStart(2, 'b');
|
ɵɵelementStart(2, 'b');
|
||||||
Δtext(3, 'World');
|
ɵɵtext(3, 'World');
|
||||||
ΔelementEnd();
|
ɵɵelementEnd();
|
||||||
Δtext(4, '!');
|
ɵɵtext(4, '!');
|
||||||
ΔelementEnd();
|
ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
@ -87,19 +87,19 @@ The size of the `VARS `section is declared in the property `vars` of the compone
|
|||||||
class MyApp {
|
class MyApp {
|
||||||
name = 'World';
|
name = 'World';
|
||||||
|
|
||||||
static ngComponentDef = ΔdefineComponent({
|
static ngComponentDef = ɵɵdefineComponent({
|
||||||
...,
|
...,
|
||||||
consts: 2, // Two DOM Elements.
|
consts: 2, // Two DOM Elements.
|
||||||
vars: 2, // Two bindings.
|
vars: 2, // Two bindings.
|
||||||
template: function(rf: RenderFlags, ctx: MyApp) {
|
template: function(rf: RenderFlags, ctx: MyApp) {
|
||||||
if (rf & RenderFlags.Create) {
|
if (rf & RenderFlags.Create) {
|
||||||
ΔelementStart(0, 'div');
|
ɵɵelementStart(0, 'div');
|
||||||
Δtext(1);
|
ɵɵtext(1);
|
||||||
ΔelementEnd();
|
ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
if (rf & RenderFlags.Update) {
|
if (rf & RenderFlags.Update) {
|
||||||
ΔelementProperty(0, 'title', Δbind(ctx.name));
|
ɵɵelementProperty(0, 'title', ɵɵbind(ctx.name));
|
||||||
ΔtextBinding(1, Δinterpolation1('Hello ', ctx.name, '!'));
|
ɵɵtextBinding(1, ɵɵinterpolation1('Hello ', ctx.name, '!'));
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
@ -139,12 +139,12 @@ Examples include:
|
|||||||
})
|
})
|
||||||
class MyApp {
|
class MyApp {
|
||||||
|
|
||||||
static ngComponentDef = ΔdefineComponent({
|
static ngComponentDef = ɵɵdefineComponent({
|
||||||
...,
|
...,
|
||||||
consts: 1,
|
consts: 1,
|
||||||
template: function(rf: RenderFlags, ctx: MyApp) {
|
template: function(rf: RenderFlags, ctx: MyApp) {
|
||||||
if (rf & RenderFlags.Create) {
|
if (rf & RenderFlags.Create) {
|
||||||
Δelement(0, 'child', ['tooltip', null]);
|
ɵɵelement(0, 'child', ['tooltip', null]);
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
},
|
},
|
||||||
@ -159,7 +159,7 @@ class MyApp {
|
|||||||
})
|
})
|
||||||
class Child {
|
class Child {
|
||||||
@HostBinding('tooltip') hostTitle = 'Hello World!';
|
@HostBinding('tooltip') hostTitle = 'Hello World!';
|
||||||
static ngComponentDef = ΔdefineComponent({
|
static ngComponentDef = ɵɵdefineComponent({
|
||||||
...
|
...
|
||||||
hostVars: 1
|
hostVars: 1
|
||||||
});
|
});
|
||||||
@ -171,7 +171,7 @@ class Child {
|
|||||||
})
|
})
|
||||||
class Tooltip {
|
class Tooltip {
|
||||||
@HostBinding('title') hostTitle = 'greeting';
|
@HostBinding('title') hostTitle = 'greeting';
|
||||||
static ngDirectiveDef = ΔdefineDirective({
|
static ngDirectiveDef = ɵɵdefineDirective({
|
||||||
...
|
...
|
||||||
hostVars: 1
|
hostVars: 1
|
||||||
});
|
});
|
||||||
@ -273,12 +273,12 @@ Injection tokens are sorted into three sections:
|
|||||||
})
|
})
|
||||||
class MyApp {
|
class MyApp {
|
||||||
|
|
||||||
static ngComponentDef = ΔdefineComponent({
|
static ngComponentDef = ɵɵdefineComponent({
|
||||||
...,
|
...,
|
||||||
consts: 1,
|
consts: 1,
|
||||||
template: function(rf: RenderFlags, ctx: MyApp) {
|
template: function(rf: RenderFlags, ctx: MyApp) {
|
||||||
if (rf & RenderFlags.Create) {
|
if (rf & RenderFlags.Create) {
|
||||||
Δelement(0, 'child');
|
ɵɵelement(0, 'child');
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
},
|
},
|
||||||
@ -301,7 +301,7 @@ class MyApp {
|
|||||||
})
|
})
|
||||||
class Child {
|
class Child {
|
||||||
construction(injector: Injector) {}
|
construction(injector: Injector) {}
|
||||||
static ngComponentDef = ΔdefineComponent({
|
static ngComponentDef = ɵɵdefineComponent({
|
||||||
...
|
...
|
||||||
features: [
|
features: [
|
||||||
ProvidesFeature(
|
ProvidesFeature(
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';
|
import {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';
|
||||||
import {InjectionToken} from '../di/injection_token';
|
import {InjectionToken} from '../di/injection_token';
|
||||||
import {Injector} from '../di/injector';
|
import {Injector} from '../di/injector';
|
||||||
import {Δinject} from '../di/injector_compatibility';
|
import {ɵɵinject} from '../di/injector_compatibility';
|
||||||
import {InjectFlags} from '../di/interface/injector';
|
import {InjectFlags} from '../di/interface/injector';
|
||||||
import {Type} from '../interface/type';
|
import {Type} from '../interface/type';
|
||||||
import {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';
|
import {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';
|
||||||
@ -66,7 +66,7 @@ function toRefArray(map: {[key: string]: string}): {propName: string; templateNa
|
|||||||
*/
|
*/
|
||||||
export const ROOT_CONTEXT = new InjectionToken<RootContext>(
|
export const ROOT_CONTEXT = new InjectionToken<RootContext>(
|
||||||
'ROOT_CONTEXT_TOKEN',
|
'ROOT_CONTEXT_TOKEN',
|
||||||
{providedIn: 'root', factory: () => createRootContext(Δinject(SCHEDULER))});
|
{providedIn: 'root', factory: () => createRootContext(ɵɵinject(SCHEDULER))});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A change detection scheduler token for {@link RootContext}. This token is the default value used
|
* A change detection scheduler token for {@link RootContext}. This token is the default value used
|
||||||
|
@ -18,7 +18,7 @@ import {stringify} from '../util/stringify';
|
|||||||
|
|
||||||
import {EMPTY_ARRAY, EMPTY_OBJ} from './empty';
|
import {EMPTY_ARRAY, EMPTY_OBJ} from './empty';
|
||||||
import {NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from './fields';
|
import {NG_COMPONENT_DEF, NG_DIRECTIVE_DEF, NG_MODULE_DEF, NG_PIPE_DEF} from './fields';
|
||||||
import {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ΔBaseDef} from './interfaces/definition';
|
import {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveTypesOrFactory, FactoryFn, HostBindingsFunction, PipeDef, PipeType, PipeTypesOrFactory, ViewQueriesFunction, ɵɵBaseDef} from './interfaces/definition';
|
||||||
// while SelectorFlags is unused here, it's required so that types don't get resolved lazily
|
// while SelectorFlags is unused here, it's required so that types don't get resolved lazily
|
||||||
// see: https://github.com/Microsoft/web-build-tools/issues/1050
|
// see: https://github.com/Microsoft/web-build-tools/issues/1050
|
||||||
import {CssSelectorList, SelectorFlags} from './interfaces/projection';
|
import {CssSelectorList, SelectorFlags} from './interfaces/projection';
|
||||||
@ -41,7 +41,7 @@ let _renderCompCount = 0;
|
|||||||
* ```
|
* ```
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔdefineComponent<T>(componentDefinition: {
|
export function ɵɵdefineComponent<T>(componentDefinition: {
|
||||||
/**
|
/**
|
||||||
* Directive type, needed to configure the injector.
|
* Directive type, needed to configure the injector.
|
||||||
*/
|
*/
|
||||||
@ -307,7 +307,7 @@ export function ΔdefineComponent<T>(componentDefinition: {
|
|||||||
/**
|
/**
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔsetComponentScope(
|
export function ɵɵsetComponentScope(
|
||||||
type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {
|
type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {
|
||||||
const def = (type.ngComponentDef as ComponentDef<any>);
|
const def = (type.ngComponentDef as ComponentDef<any>);
|
||||||
def.directiveDefs = () => directives.map(extractDirectiveDef);
|
def.directiveDefs = () => directives.map(extractDirectiveDef);
|
||||||
@ -334,7 +334,7 @@ export function extractPipeDef(type: PipeType<any>): PipeDef<any> {
|
|||||||
/**
|
/**
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔdefineNgModule<T>(def: {
|
export function ɵɵdefineNgModule<T>(def: {
|
||||||
/** Token representing the module. Used by DI. */
|
/** Token representing the module. Used by DI. */
|
||||||
type: T;
|
type: T;
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ export function ΔdefineNgModule<T>(def: {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔsetNgModuleScope(type: any, scope: {
|
export function ɵɵsetNgModuleScope(type: any, scope: {
|
||||||
/** List of components, directives, and pipes declared by this module. */
|
/** List of components, directives, and pipes declared by this module. */
|
||||||
declarations?: Type<any>[] | (() => Type<any>[]);
|
declarations?: Type<any>[] | (() => Type<any>[]);
|
||||||
|
|
||||||
@ -480,7 +480,7 @@ function invertObject<T>(
|
|||||||
* # Example
|
* # Example
|
||||||
* ```ts
|
* ```ts
|
||||||
* class ShouldBeInherited {
|
* class ShouldBeInherited {
|
||||||
* static ngBaseDef = ΔdefineBase({
|
* static ngBaseDef = ɵɵdefineBase({
|
||||||
* ...
|
* ...
|
||||||
* })
|
* })
|
||||||
* }
|
* }
|
||||||
@ -490,7 +490,7 @@ function invertObject<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔdefineBase<T>(baseDefinition: {
|
export function ɵɵdefineBase<T>(baseDefinition: {
|
||||||
/**
|
/**
|
||||||
* A map of input names.
|
* A map of input names.
|
||||||
*
|
*
|
||||||
@ -547,7 +547,7 @@ export function ΔdefineBase<T>(baseDefinition: {
|
|||||||
* of properties.
|
* of properties.
|
||||||
*/
|
*/
|
||||||
outputs?: {[P in keyof T]?: string};
|
outputs?: {[P in keyof T]?: string};
|
||||||
}): ΔBaseDef<T> {
|
}): ɵɵBaseDef<T> {
|
||||||
const declaredInputs: {[P in keyof T]: string} = {} as any;
|
const declaredInputs: {[P in keyof T]: string} = {} as any;
|
||||||
return {
|
return {
|
||||||
inputs: invertObject<T>(baseDefinition.inputs as any, declaredInputs),
|
inputs: invertObject<T>(baseDefinition.inputs as any, declaredInputs),
|
||||||
@ -564,7 +564,7 @@ export function ΔdefineBase<T>(baseDefinition: {
|
|||||||
* class MyDirective {
|
* class MyDirective {
|
||||||
* // Generated by Angular Template Compiler
|
* // Generated by Angular Template Compiler
|
||||||
* // [Symbol] syntax will not be supported by TypeScript until v2.7
|
* // [Symbol] syntax will not be supported by TypeScript until v2.7
|
||||||
* static ngDirectiveDef = ΔdefineDirective({
|
* static ngDirectiveDef = ɵɵdefineDirective({
|
||||||
* ...
|
* ...
|
||||||
* });
|
* });
|
||||||
* }
|
* }
|
||||||
@ -572,7 +572,7 @@ export function ΔdefineBase<T>(baseDefinition: {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export const ΔdefineDirective = ΔdefineComponent as any as<T>(directiveDefinition: {
|
export const ɵɵdefineDirective = ɵɵdefineComponent as any as<T>(directiveDefinition: {
|
||||||
/**
|
/**
|
||||||
* Directive type, needed to configure the injector.
|
* Directive type, needed to configure the injector.
|
||||||
*/
|
*/
|
||||||
@ -690,7 +690,7 @@ export const ΔdefineDirective = ΔdefineComponent as any as<T>(directiveDefinit
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔdefinePipe<T>(pipeDef: {
|
export function ɵɵdefinePipe<T>(pipeDef: {
|
||||||
/** Name of the pipe. Used for matching pipes in template to pipe defs. */
|
/** Name of the pipe. Used for matching pipes in template to pipe defs. */
|
||||||
name: string,
|
name: string,
|
||||||
|
|
||||||
|
@ -637,7 +637,7 @@ export class NodeInjector implements Injector {
|
|||||||
/**
|
/**
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔgetFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)|null {
|
export function ɵɵgetFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)|null {
|
||||||
const typeAny = type as any;
|
const typeAny = type as any;
|
||||||
const def = getComponentDef<T>(typeAny) || getDirectiveDef<T>(typeAny) ||
|
const def = getComponentDef<T>(typeAny) || getDirectiveDef<T>(typeAny) ||
|
||||||
getPipeDef<T>(typeAny) || getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);
|
getPipeDef<T>(typeAny) || getInjectableDef<T>(typeAny) || getInjectorDef<T>(typeAny);
|
||||||
@ -650,9 +650,9 @@ export function ΔgetFactoryOf<T>(type: Type<any>): ((type: Type<T>| null) => T)
|
|||||||
/**
|
/**
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {
|
export function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {
|
||||||
const proto = Object.getPrototypeOf(type.prototype).constructor as Type<any>;
|
const proto = Object.getPrototypeOf(type.prototype).constructor as Type<any>;
|
||||||
const factory = ΔgetFactoryOf<T>(proto);
|
const factory = ɵɵgetFactoryOf<T>(proto);
|
||||||
if (factory !== null) {
|
if (factory !== null) {
|
||||||
return factory;
|
return factory;
|
||||||
} else {
|
} else {
|
||||||
|
@ -12,7 +12,7 @@ import {ClassProvider, Provider} from '../di/interface/provider';
|
|||||||
import {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';
|
import {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';
|
||||||
|
|
||||||
import {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';
|
import {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';
|
||||||
import {ΔdirectiveInject} from './instructions/all';
|
import {ɵɵdirectiveInject} from './instructions/all';
|
||||||
import {DirectiveDef} from './interfaces/definition';
|
import {DirectiveDef} from './interfaces/definition';
|
||||||
import {NodeInjectorFactory} from './interfaces/injector';
|
import {NodeInjectorFactory} from './interfaces/injector';
|
||||||
import {TContainerNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';
|
import {TContainerNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';
|
||||||
@ -93,7 +93,7 @@ function resolveProvider(
|
|||||||
|
|
||||||
if (isTypeProvider(provider) || !provider.multi) {
|
if (isTypeProvider(provider) || !provider.multi) {
|
||||||
// Single provider case: the factory is created and pushed immediately
|
// Single provider case: the factory is created and pushed immediately
|
||||||
const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ΔdirectiveInject);
|
const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);
|
||||||
const existingFactoryIndex = indexOf(
|
const existingFactoryIndex = indexOf(
|
||||||
token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,
|
token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,
|
||||||
endIndex);
|
endIndex);
|
||||||
@ -255,7 +255,7 @@ function multiFactory(
|
|||||||
this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode) => any,
|
this: NodeInjectorFactory, _: null, tData: TData, lData: LView, tNode: TElementNode) => any,
|
||||||
index: number, isViewProvider: boolean, isComponent: boolean,
|
index: number, isViewProvider: boolean, isComponent: boolean,
|
||||||
f: () => any): NodeInjectorFactory {
|
f: () => any): NodeInjectorFactory {
|
||||||
const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ΔdirectiveInject);
|
const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);
|
||||||
factory.multi = [];
|
factory.multi = [];
|
||||||
factory.index = index;
|
factory.index = index;
|
||||||
factory.componentProviders = 0;
|
factory.componentProviders = 0;
|
||||||
|
@ -13,7 +13,7 @@ import {ComponentDef, DirectiveDef, DirectiveDefFeature, RenderFlags} from '../i
|
|||||||
import {adjustActiveDirectiveSuperClassDepthPosition} from '../state';
|
import {adjustActiveDirectiveSuperClassDepthPosition} from '../state';
|
||||||
import {isComponentDef} from '../util/view_utils';
|
import {isComponentDef} from '../util/view_utils';
|
||||||
|
|
||||||
import {ΔNgOnChangesFeature} from './ng_onchanges_feature';
|
import {ɵɵNgOnChangesFeature} from './ng_onchanges_feature';
|
||||||
|
|
||||||
function getSuperType(type: Type<any>): Type<any>&
|
function getSuperType(type: Type<any>): Type<any>&
|
||||||
{ngComponentDef?: ComponentDef<any>, ngDirectiveDef?: DirectiveDef<any>} {
|
{ngComponentDef?: ComponentDef<any>, ngDirectiveDef?: DirectiveDef<any>} {
|
||||||
@ -26,7 +26,7 @@ function getSuperType(type: Type<any>): Type<any>&
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔInheritDefinitionFeature(definition: DirectiveDef<any>| ComponentDef<any>): void {
|
export function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any>| ComponentDef<any>): void {
|
||||||
let superType = getSuperType(definition.type);
|
let superType = getSuperType(definition.type);
|
||||||
|
|
||||||
while (superType) {
|
while (superType) {
|
||||||
@ -161,7 +161,7 @@ export function ΔInheritDefinitionFeature(definition: DirectiveDef<any>| Compon
|
|||||||
definition.onInit = definition.onInit || superPrototype.ngOnInit;
|
definition.onInit = definition.onInit || superPrototype.ngOnInit;
|
||||||
|
|
||||||
if (superPrototype.ngOnChanges) {
|
if (superPrototype.ngOnChanges) {
|
||||||
ΔNgOnChangesFeature()(definition);
|
ɵɵNgOnChangesFeature()(definition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ type OnChangesExpando = OnChanges & {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔNgOnChangesFeature<T>(): DirectiveDefFeature {
|
export function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {
|
||||||
// This option ensures that the ngOnChanges lifecycle hook will be inherited
|
// This option ensures that the ngOnChanges lifecycle hook will be inherited
|
||||||
// from superclasses (in InheritDefinitionFeature).
|
// from superclasses (in InheritDefinitionFeature).
|
||||||
(NgOnChangesFeatureImpl as DirectiveDefFeature).ngInherit = true;
|
(NgOnChangesFeatureImpl as DirectiveDefFeature).ngInherit = true;
|
||||||
|
@ -39,7 +39,7 @@ import {DirectiveDef} from '../interfaces/definition';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {
|
export function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {
|
||||||
return (definition: DirectiveDef<T>) => {
|
return (definition: DirectiveDef<T>) => {
|
||||||
definition.providersResolver =
|
definition.providersResolver =
|
||||||
(def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {
|
(def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {
|
||||||
|
@ -16,7 +16,7 @@ import {assertDefined, assertEqual, assertGreaterThan} from '../util/assert';
|
|||||||
|
|
||||||
import {attachPatchData} from './context_discovery';
|
import {attachPatchData} from './context_discovery';
|
||||||
import {attachI18nOpCodesDebug} from './debug';
|
import {attachI18nOpCodesDebug} from './debug';
|
||||||
import {ΔelementAttribute, Δload, ΔtextBinding} from './instructions/all';
|
import {ɵɵelementAttribute, ɵɵload, ɵɵtextBinding} from './instructions/all';
|
||||||
import {allocExpando, createNodeAtIndex} from './instructions/shared';
|
import {allocExpando, createNodeAtIndex} from './instructions/shared';
|
||||||
import {LContainer, NATIVE} from './interfaces/container';
|
import {LContainer, NATIVE} from './interfaces/container';
|
||||||
import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n';
|
import {COMMENT_MARKER, ELEMENT_MARKER, I18nMutateOpCode, I18nMutateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, IcuType, TI18n, TIcu} from './interfaces/i18n';
|
||||||
@ -351,7 +351,7 @@ const parentIndexStack: number[] = [];
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δi18nStart(index: number, message: string, subTemplateIndex?: number): void {
|
export function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void {
|
||||||
const tView = getLView()[TVIEW];
|
const tView = getLView()[TVIEW];
|
||||||
ngDevMode && assertDefined(tView, `tView should be defined`);
|
ngDevMode && assertDefined(tView, `tView should be defined`);
|
||||||
i18nIndexStack[++i18nIndexStackPointer] = index;
|
i18nIndexStack[++i18nIndexStackPointer] = index;
|
||||||
@ -538,7 +538,7 @@ function appendI18nNode(tNode: TNode, parentTNode: TNode, previousTNode: TNode |
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δi18nPostprocess(
|
export function ɵɵi18nPostprocess(
|
||||||
message: string, replacements: {[key: string]: (string | string[])} = {}): string {
|
message: string, replacements: {[key: string]: (string | string[])} = {}): string {
|
||||||
/**
|
/**
|
||||||
* Step 1: resolve all multi-value placeholders like [<EFBFBD>#5<EFBFBD>|<EFBFBD>*1:1<EFBFBD><EFBFBD>#2:1<EFBFBD>|<EFBFBD>#4:1<EFBFBD>]
|
* Step 1: resolve all multi-value placeholders like [<EFBFBD>#5<EFBFBD>|<EFBFBD>*1:1<EFBFBD><EFBFBD>#2:1<EFBFBD>|<EFBFBD>#4:1<EFBFBD>]
|
||||||
@ -634,7 +634,7 @@ export function Δi18nPostprocess(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δi18nEnd(): void {
|
export function ɵɵi18nEnd(): void {
|
||||||
const tView = getLView()[TVIEW];
|
const tView = getLView()[TVIEW];
|
||||||
ngDevMode && assertDefined(tView, `tView should be defined`);
|
ngDevMode && assertDefined(tView, `tView should be defined`);
|
||||||
i18nEndFirstPass(tView);
|
i18nEndFirstPass(tView);
|
||||||
@ -742,7 +742,7 @@ function readCreateOpCodes(
|
|||||||
const elementNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;
|
const elementNodeIndex = opCode >>> I18nMutateOpCode.SHIFT_REF;
|
||||||
const attrName = createOpCodes[++i] as string;
|
const attrName = createOpCodes[++i] as string;
|
||||||
const attrValue = createOpCodes[++i] as string;
|
const attrValue = createOpCodes[++i] as string;
|
||||||
ΔelementAttribute(elementNodeIndex, attrName, attrValue);
|
ɵɵelementAttribute(elementNodeIndex, attrName, attrValue);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unable to determine the type of mutate operation for "${opCode}"`);
|
throw new Error(`Unable to determine the type of mutate operation for "${opCode}"`);
|
||||||
@ -819,10 +819,10 @@ function readUpdateOpCodes(
|
|||||||
case I18nUpdateOpCode.Attr:
|
case I18nUpdateOpCode.Attr:
|
||||||
const attrName = updateOpCodes[++j] as string;
|
const attrName = updateOpCodes[++j] as string;
|
||||||
const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;
|
const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;
|
||||||
ΔelementAttribute(nodeIndex, attrName, value, sanitizeFn);
|
ɵɵelementAttribute(nodeIndex, attrName, value, sanitizeFn);
|
||||||
break;
|
break;
|
||||||
case I18nUpdateOpCode.Text:
|
case I18nUpdateOpCode.Text:
|
||||||
ΔtextBinding(nodeIndex, value);
|
ɵɵtextBinding(nodeIndex, value);
|
||||||
break;
|
break;
|
||||||
case I18nUpdateOpCode.IcuSwitch:
|
case I18nUpdateOpCode.IcuSwitch:
|
||||||
tIcuIndex = updateOpCodes[++j] as number;
|
tIcuIndex = updateOpCodes[++j] as number;
|
||||||
@ -886,7 +886,7 @@ function removeNode(index: number, viewData: LView) {
|
|||||||
nativeRemoveNode(viewData[RENDERER], removedPhRNode);
|
nativeRemoveNode(viewData[RENDERER], removedPhRNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
const slotValue = Δload(index) as RElement | RComment | LContainer | StylingContext;
|
const slotValue = ɵɵload(index) as RElement | RComment | LContainer | StylingContext;
|
||||||
if (isLContainer(slotValue)) {
|
if (isLContainer(slotValue)) {
|
||||||
const lContainer = slotValue as LContainer;
|
const lContainer = slotValue as LContainer;
|
||||||
if (removedPhTNode.type !== TNodeType.Container) {
|
if (removedPhTNode.type !== TNodeType.Container) {
|
||||||
@ -923,9 +923,9 @@ function removeNode(index: number, viewData: LView) {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δi18n(index: number, message: string, subTemplateIndex?: number): void {
|
export function ɵɵi18n(index: number, message: string, subTemplateIndex?: number): void {
|
||||||
Δi18nStart(index, message, subTemplateIndex);
|
ɵɵi18nStart(index, message, subTemplateIndex);
|
||||||
Δi18nEnd();
|
ɵɵi18nEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -936,7 +936,7 @@ export function Δi18n(index: number, message: string, subTemplateIndex?: number
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δi18nAttributes(index: number, values: string[]): void {
|
export function ɵɵi18nAttributes(index: number, values: string[]): void {
|
||||||
const tView = getLView()[TVIEW];
|
const tView = getLView()[TVIEW];
|
||||||
ngDevMode && assertDefined(tView, `tView should be defined`);
|
ngDevMode && assertDefined(tView, `tView should be defined`);
|
||||||
if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {
|
if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {
|
||||||
@ -968,7 +968,7 @@ function i18nAttributesFirstPass(tView: TView, index: number, values: string[])
|
|||||||
addAllToArray(
|
addAllToArray(
|
||||||
generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);
|
generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);
|
||||||
} else {
|
} else {
|
||||||
ΔelementAttribute(previousElementIndex, attrName, value);
|
ɵɵelementAttribute(previousElementIndex, attrName, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -988,7 +988,7 @@ let shiftsCounter = 0;
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δi18nExp<T>(expression: T | NO_CHANGE): void {
|
export function ɵɵi18nExp<T>(expression: T | NO_CHANGE): void {
|
||||||
if (expression !== NO_CHANGE) {
|
if (expression !== NO_CHANGE) {
|
||||||
changeMask = changeMask | (1 << shiftsCounter);
|
changeMask = changeMask | (1 << shiftsCounter);
|
||||||
}
|
}
|
||||||
@ -1003,7 +1003,7 @@ export function Δi18nExp<T>(expression: T | NO_CHANGE): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δi18nApply(index: number) {
|
export function ɵɵi18nApply(index: number) {
|
||||||
if (shiftsCounter) {
|
if (shiftsCounter) {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tView = lView[TVIEW];
|
const tView = lView[TVIEW];
|
||||||
@ -1633,7 +1633,7 @@ const LOCALIZE_PH_REGEXP = /\{\$(.*?)\}/g;
|
|||||||
* @publicApi
|
* @publicApi
|
||||||
* @deprecated this method is temporary & should not be used as it will be removed soon
|
* @deprecated this method is temporary & should not be used as it will be removed soon
|
||||||
*/
|
*/
|
||||||
export function Δi18nLocalize(input: string, placeholders: {[key: string]: string} = {}) {
|
export function ɵɵi18nLocalize(input: string, placeholders: {[key: string]: string} = {}) {
|
||||||
if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string
|
if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string
|
||||||
input = TRANSLATIONS[input];
|
input = TRANSLATIONS[input];
|
||||||
}
|
}
|
||||||
|
@ -6,109 +6,109 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
import {LifecycleHooksFeature, renderComponent, whenRendered} from './component';
|
import {LifecycleHooksFeature, renderComponent, whenRendered} from './component';
|
||||||
import {ΔdefineBase, ΔdefineComponent, ΔdefineDirective, ΔdefineNgModule, ΔdefinePipe, ΔsetComponentScope, ΔsetNgModuleScope} from './definition';
|
import {ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵsetComponentScope, ɵɵsetNgModuleScope} from './definition';
|
||||||
import {ΔInheritDefinitionFeature} from './features/inherit_definition_feature';
|
import {ɵɵInheritDefinitionFeature} from './features/inherit_definition_feature';
|
||||||
import {ΔNgOnChangesFeature} from './features/ng_onchanges_feature';
|
import {ɵɵNgOnChangesFeature} from './features/ng_onchanges_feature';
|
||||||
import {ΔProvidersFeature} from './features/providers_feature';
|
import {ɵɵProvidersFeature} from './features/providers_feature';
|
||||||
import {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef, ΔBaseDef, ΔComponentDefWithMeta, ΔDirectiveDefWithMeta, ΔPipeDefWithMeta} from './interfaces/definition';
|
import {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveType, PipeDef, ɵɵBaseDef, ɵɵComponentDefWithMeta, ɵɵDirectiveDefWithMeta, ɵɵPipeDefWithMeta} from './interfaces/definition';
|
||||||
import {getComponent, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils';
|
import {getComponent, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils';
|
||||||
|
|
||||||
export {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref';
|
export {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref';
|
||||||
export {ΔgetFactoryOf, ΔgetInheritedFactory} from './di';
|
export {ɵɵgetFactoryOf, ɵɵgetInheritedFactory} from './di';
|
||||||
// clang-format off
|
// clang-format off
|
||||||
export {
|
export {
|
||||||
detectChanges,
|
detectChanges,
|
||||||
markDirty,
|
markDirty,
|
||||||
store,
|
store,
|
||||||
tick,
|
tick,
|
||||||
ΔallocHostVars,
|
ɵɵallocHostVars,
|
||||||
Δbind,
|
ɵɵbind,
|
||||||
ΔcomponentHostSyntheticListener,
|
ɵɵcomponentHostSyntheticListener,
|
||||||
ΔcomponentHostSyntheticProperty,
|
ɵɵcomponentHostSyntheticProperty,
|
||||||
|
|
||||||
Δcontainer,
|
ɵɵcontainer,
|
||||||
ΔcontainerRefreshEnd,
|
ɵɵcontainerRefreshEnd,
|
||||||
ΔcontainerRefreshStart,
|
ɵɵcontainerRefreshStart,
|
||||||
|
|
||||||
ΔdirectiveInject,
|
ɵɵdirectiveInject,
|
||||||
|
|
||||||
Δelement,
|
ɵɵelement,
|
||||||
ΔelementAttribute,
|
ɵɵelementAttribute,
|
||||||
ΔelementClassProp,
|
ɵɵelementClassProp,
|
||||||
ΔelementContainerEnd,
|
ɵɵelementContainerEnd,
|
||||||
|
|
||||||
ΔelementContainerStart,
|
ɵɵelementContainerStart,
|
||||||
ΔelementEnd,
|
ɵɵelementEnd,
|
||||||
|
|
||||||
ΔelementHostAttrs,
|
ɵɵelementHostAttrs,
|
||||||
ΔelementHostClassProp,
|
ɵɵelementHostClassProp,
|
||||||
ΔelementHostStyleProp,
|
ɵɵelementHostStyleProp,
|
||||||
ΔelementHostStyling,
|
ɵɵelementHostStyling,
|
||||||
ΔelementHostStylingApply,
|
ɵɵelementHostStylingApply,
|
||||||
ΔelementHostStylingMap,
|
ɵɵelementHostStylingMap,
|
||||||
ΔelementProperty,
|
ɵɵelementProperty,
|
||||||
ΔelementStart,
|
ɵɵelementStart,
|
||||||
ΔelementStyleProp,
|
ɵɵelementStyleProp,
|
||||||
ΔelementStyling,
|
ɵɵelementStyling,
|
||||||
ΔelementStylingApply,
|
ɵɵelementStylingApply,
|
||||||
ΔelementStylingMap,
|
ɵɵelementStylingMap,
|
||||||
ΔembeddedViewEnd,
|
ɵɵembeddedViewEnd,
|
||||||
|
|
||||||
ΔembeddedViewStart,
|
ɵɵembeddedViewStart,
|
||||||
|
|
||||||
ΔgetCurrentView,
|
ɵɵgetCurrentView,
|
||||||
ΔinjectAttribute,
|
ɵɵinjectAttribute,
|
||||||
|
|
||||||
Δinterpolation1,
|
ɵɵinterpolation1,
|
||||||
Δinterpolation2,
|
ɵɵinterpolation2,
|
||||||
Δinterpolation3,
|
ɵɵinterpolation3,
|
||||||
Δinterpolation4,
|
ɵɵinterpolation4,
|
||||||
Δinterpolation5,
|
ɵɵinterpolation5,
|
||||||
Δinterpolation6,
|
ɵɵinterpolation6,
|
||||||
Δinterpolation7,
|
ɵɵinterpolation7,
|
||||||
Δinterpolation8,
|
ɵɵinterpolation8,
|
||||||
ΔinterpolationV,
|
ɵɵinterpolationV,
|
||||||
|
|
||||||
Δlistener,
|
ɵɵlistener,
|
||||||
Δload,
|
ɵɵload,
|
||||||
|
|
||||||
ΔnamespaceHTML,
|
ɵɵnamespaceHTML,
|
||||||
ΔnamespaceMathML,
|
ɵɵnamespaceMathML,
|
||||||
ΔnamespaceSVG,
|
ɵɵnamespaceSVG,
|
||||||
|
|
||||||
ΔnextContext,
|
ɵɵnextContext,
|
||||||
|
|
||||||
Δprojection,
|
ɵɵprojection,
|
||||||
ΔprojectionDef,
|
ɵɵprojectionDef,
|
||||||
Δproperty,
|
ɵɵproperty,
|
||||||
|
|
||||||
Δreference,
|
ɵɵreference,
|
||||||
|
|
||||||
Δselect,
|
ɵɵselect,
|
||||||
Δtemplate,
|
ɵɵtemplate,
|
||||||
|
|
||||||
Δtext,
|
ɵɵtext,
|
||||||
ΔtextBinding} from './instructions/all';
|
ɵɵtextBinding} from './instructions/all';
|
||||||
export {RenderFlags} from './interfaces/definition';
|
export {RenderFlags} from './interfaces/definition';
|
||||||
export {CssSelectorList} from './interfaces/projection';
|
export {CssSelectorList} from './interfaces/projection';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ΔrestoreView,
|
ɵɵrestoreView,
|
||||||
|
|
||||||
ΔenableBindings,
|
ɵɵenableBindings,
|
||||||
ΔdisableBindings,
|
ɵɵdisableBindings,
|
||||||
} from './state';
|
} from './state';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Δi18n,
|
ɵɵi18n,
|
||||||
Δi18nAttributes,
|
ɵɵi18nAttributes,
|
||||||
Δi18nExp,
|
ɵɵi18nExp,
|
||||||
Δi18nStart,
|
ɵɵi18nStart,
|
||||||
Δi18nEnd,
|
ɵɵi18nEnd,
|
||||||
Δi18nApply,
|
ɵɵi18nApply,
|
||||||
Δi18nPostprocess,
|
ɵɵi18nPostprocess,
|
||||||
i18nConfigureLocalize,
|
i18nConfigureLocalize,
|
||||||
Δi18nLocalize,
|
ɵɵi18nLocalize,
|
||||||
} from './i18n';
|
} from './i18n';
|
||||||
|
|
||||||
export {NgModuleFactory, NgModuleRef, NgModuleType} from './ng_module_ref';
|
export {NgModuleFactory, NgModuleRef, NgModuleType} from './ng_module_ref';
|
||||||
@ -122,71 +122,71 @@ export {
|
|||||||
} from './metadata';
|
} from './metadata';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Δpipe,
|
ɵɵpipe,
|
||||||
ΔpipeBind1,
|
ɵɵpipeBind1,
|
||||||
ΔpipeBind2,
|
ɵɵpipeBind2,
|
||||||
ΔpipeBind3,
|
ɵɵpipeBind3,
|
||||||
ΔpipeBind4,
|
ɵɵpipeBind4,
|
||||||
ΔpipeBindV,
|
ɵɵpipeBindV,
|
||||||
} from './pipe';
|
} from './pipe';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ΔqueryRefresh,
|
ɵɵqueryRefresh,
|
||||||
ΔviewQuery,
|
ɵɵviewQuery,
|
||||||
ΔstaticViewQuery,
|
ɵɵstaticViewQuery,
|
||||||
ΔloadViewQuery,
|
ɵɵloadViewQuery,
|
||||||
ΔcontentQuery,
|
ɵɵcontentQuery,
|
||||||
ΔloadContentQuery,
|
ɵɵloadContentQuery,
|
||||||
ΔstaticContentQuery
|
ɵɵstaticContentQuery
|
||||||
} from './query';
|
} from './query';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ΔpureFunction0,
|
ɵɵpureFunction0,
|
||||||
ΔpureFunction1,
|
ɵɵpureFunction1,
|
||||||
ΔpureFunction2,
|
ɵɵpureFunction2,
|
||||||
ΔpureFunction3,
|
ɵɵpureFunction3,
|
||||||
ΔpureFunction4,
|
ɵɵpureFunction4,
|
||||||
ΔpureFunction5,
|
ɵɵpureFunction5,
|
||||||
ΔpureFunction6,
|
ɵɵpureFunction6,
|
||||||
ΔpureFunction7,
|
ɵɵpureFunction7,
|
||||||
ΔpureFunction8,
|
ɵɵpureFunction8,
|
||||||
ΔpureFunctionV,
|
ɵɵpureFunctionV,
|
||||||
} from './pure_function';
|
} from './pure_function';
|
||||||
|
|
||||||
export {ΔtemplateRefExtractor} from './view_engine_compatibility_prebound';
|
export {ɵɵtemplateRefExtractor} from './view_engine_compatibility_prebound';
|
||||||
|
|
||||||
export {ΔresolveWindow, ΔresolveDocument, ΔresolveBody} from './util/misc_utils';
|
export {ɵɵresolveWindow, ɵɵresolveDocument, ɵɵresolveBody} from './util/misc_utils';
|
||||||
|
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ΔBaseDef,
|
ɵɵBaseDef,
|
||||||
ComponentDef,
|
ComponentDef,
|
||||||
ΔComponentDefWithMeta,
|
ɵɵComponentDefWithMeta,
|
||||||
ComponentTemplate,
|
ComponentTemplate,
|
||||||
ComponentType,
|
ComponentType,
|
||||||
DirectiveDef,
|
DirectiveDef,
|
||||||
DirectiveDefFlags,
|
DirectiveDefFlags,
|
||||||
ΔDirectiveDefWithMeta,
|
ɵɵDirectiveDefWithMeta,
|
||||||
DirectiveType,
|
DirectiveType,
|
||||||
ΔNgOnChangesFeature,
|
ɵɵNgOnChangesFeature,
|
||||||
ΔInheritDefinitionFeature,
|
ɵɵInheritDefinitionFeature,
|
||||||
ΔProvidersFeature,
|
ɵɵProvidersFeature,
|
||||||
PipeDef,
|
PipeDef,
|
||||||
ΔPipeDefWithMeta,
|
ɵɵPipeDefWithMeta,
|
||||||
LifecycleHooksFeature,
|
LifecycleHooksFeature,
|
||||||
ΔdefineComponent,
|
ɵɵdefineComponent,
|
||||||
ΔdefineDirective,
|
ɵɵdefineDirective,
|
||||||
ΔdefineNgModule,
|
ɵɵdefineNgModule,
|
||||||
ΔdefineBase,
|
ɵɵdefineBase,
|
||||||
ΔdefinePipe,
|
ɵɵdefinePipe,
|
||||||
getHostElement,
|
getHostElement,
|
||||||
getComponent,
|
getComponent,
|
||||||
getDirectives,
|
getDirectives,
|
||||||
getRenderedText,
|
getRenderedText,
|
||||||
renderComponent,
|
renderComponent,
|
||||||
ΔsetComponentScope,
|
ɵɵsetComponentScope,
|
||||||
ΔsetNgModuleScope,
|
ɵɵsetNgModuleScope,
|
||||||
whenRendered,
|
whenRendered,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import {NO_CHANGE} from '../tokens';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔallocHostVars(count: number): void {
|
export function ɵɵallocHostVars(count: number): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tView = lView[TVIEW];
|
const tView = lView[TVIEW];
|
||||||
if (!tView.firstTemplatePass) return;
|
if (!tView.firstTemplatePass) return;
|
||||||
|
@ -30,7 +30,7 @@ import {addToViewTree, createDirectivesAndLocals, createLContainer, createNodeAt
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δcontainer(index: number): void {
|
export function ɵɵcontainer(index: number): void {
|
||||||
const tNode = containerInternal(index, null, null);
|
const tNode = containerInternal(index, null, null);
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
if (lView[TVIEW].firstTemplatePass) {
|
if (lView[TVIEW].firstTemplatePass) {
|
||||||
@ -59,7 +59,7 @@ export function Δcontainer(index: number): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δtemplate(
|
export function ɵɵtemplate(
|
||||||
index: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,
|
index: number, templateFn: ComponentTemplate<any>| null, consts: number, vars: number,
|
||||||
tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null,
|
tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null,
|
||||||
localRefExtractor?: LocalRefExtractor) {
|
localRefExtractor?: LocalRefExtractor) {
|
||||||
@ -87,7 +87,7 @@ export function Δtemplate(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔcontainerRefreshStart(index: number): void {
|
export function ɵɵcontainerRefreshStart(index: number): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tView = lView[TVIEW];
|
const tView = lView[TVIEW];
|
||||||
let previousOrParentTNode = loadInternal(tView.data, index) as TNode;
|
let previousOrParentTNode = loadInternal(tView.data, index) as TNode;
|
||||||
@ -110,7 +110,7 @@ export function ΔcontainerRefreshStart(index: number): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔcontainerRefreshEnd(): void {
|
export function ɵɵcontainerRefreshEnd(): void {
|
||||||
let previousOrParentTNode = getPreviousOrParentTNode();
|
let previousOrParentTNode = getPreviousOrParentTNode();
|
||||||
if (getIsParent()) {
|
if (getIsParent()) {
|
||||||
setIsParent(false);
|
setIsParent(false);
|
||||||
|
@ -23,9 +23,9 @@ import {getLView, getPreviousOrParentTNode} from '../state';
|
|||||||
* class SomeDirective {
|
* class SomeDirective {
|
||||||
* constructor(directive: DirectiveA) {}
|
* constructor(directive: DirectiveA) {}
|
||||||
*
|
*
|
||||||
* static ngDirectiveDef = ΔdefineDirective({
|
* static ngDirectiveDef = ɵɵdefineDirective({
|
||||||
* type: SomeDirective,
|
* type: SomeDirective,
|
||||||
* factory: () => new SomeDirective(ΔdirectiveInject(DirectiveA))
|
* factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
|
||||||
* });
|
* });
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
@ -35,9 +35,9 @@ import {getLView, getPreviousOrParentTNode} from '../state';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔdirectiveInject<T>(token: Type<T>| InjectionToken<T>): T;
|
export function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>): T;
|
||||||
export function ΔdirectiveInject<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags): T;
|
export function ɵɵdirectiveInject<T>(token: Type<T>| InjectionToken<T>, flags: InjectFlags): T;
|
||||||
export function ΔdirectiveInject<T>(
|
export function ɵɵdirectiveInject<T>(
|
||||||
token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {
|
token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|null {
|
||||||
token = resolveForwardRef(token);
|
token = resolveForwardRef(token);
|
||||||
return getOrCreateInjectable<T>(
|
return getOrCreateInjectable<T>(
|
||||||
@ -50,6 +50,6 @@ export function ΔdirectiveInject<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔinjectAttribute(attrNameToInject: string): string|null {
|
export function ɵɵinjectAttribute(attrNameToInject: string): string|null {
|
||||||
return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);
|
return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ import {getActiveDirectiveStylingIndex} from './styling';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementStart(
|
export function ɵɵelementStart(
|
||||||
index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {
|
index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tView = lView[TVIEW];
|
const tView = lView[TVIEW];
|
||||||
@ -129,7 +129,7 @@ export function ΔelementStart(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementEnd(): void {
|
export function ɵɵelementEnd(): void {
|
||||||
let previousOrParentTNode = getPreviousOrParentTNode();
|
let previousOrParentTNode = getPreviousOrParentTNode();
|
||||||
if (getIsParent()) {
|
if (getIsParent()) {
|
||||||
setIsParent(false);
|
setIsParent(false);
|
||||||
@ -181,10 +181,10 @@ export function ΔelementEnd(): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δelement(
|
export function ɵɵelement(
|
||||||
index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {
|
index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void {
|
||||||
ΔelementStart(index, name, attrs, localRefs);
|
ɵɵelementStart(index, name, attrs, localRefs);
|
||||||
ΔelementEnd();
|
ɵɵelementEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ export function Δelement(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementAttribute(
|
export function ɵɵelementAttribute(
|
||||||
index: number, name: string, value: any, sanitizer?: SanitizerFn | null,
|
index: number, name: string, value: any, sanitizer?: SanitizerFn | null,
|
||||||
namespace?: string): void {
|
namespace?: string): void {
|
||||||
if (value !== NO_CHANGE) {
|
if (value !== NO_CHANGE) {
|
||||||
@ -268,7 +268,7 @@ export function ΔelementAttribute(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementHostAttrs(attrs: TAttributes) {
|
export function ɵɵelementHostAttrs(attrs: TAttributes) {
|
||||||
const hostElementIndex = getSelectedIndex();
|
const hostElementIndex = getSelectedIndex();
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tNode = getTNode(hostElementIndex, lView);
|
const tNode = getTNode(hostElementIndex, lView);
|
||||||
|
@ -31,7 +31,7 @@ import {createDirectivesAndLocals, createNodeAtIndex, executeContentQueries, set
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementContainerStart(
|
export function ɵɵelementContainerStart(
|
||||||
index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void {
|
index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tView = lView[TVIEW];
|
const tView = lView[TVIEW];
|
||||||
@ -72,7 +72,7 @@ export function ΔelementContainerStart(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementContainerEnd(): void {
|
export function ɵɵelementContainerEnd(): void {
|
||||||
let previousOrParentTNode = getPreviousOrParentTNode();
|
let previousOrParentTNode = getPreviousOrParentTNode();
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tView = lView[TVIEW];
|
const tView = lView[TVIEW];
|
||||||
|
@ -26,7 +26,8 @@ import {assignTViewNodeToLView, createLView, createTView, refreshDescendantViews
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔembeddedViewStart(viewBlockId: number, consts: number, vars: number): RenderFlags {
|
export function ɵɵembeddedViewStart(
|
||||||
|
viewBlockId: number, consts: number, vars: number): RenderFlags {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const previousOrParentTNode = getPreviousOrParentTNode();
|
const previousOrParentTNode = getPreviousOrParentTNode();
|
||||||
// The previous node can be a view node if we are processing an inline for loop
|
// The previous node can be a view node if we are processing an inline for loop
|
||||||
@ -129,7 +130,7 @@ function scanForView(lContainer: LContainer, startIdx: number, viewBlockId: numb
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔembeddedViewEnd(): void {
|
export function ɵɵembeddedViewEnd(): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const viewHost = lView[T_HOST];
|
const viewHost = lView[T_HOST];
|
||||||
|
|
||||||
|
@ -17,6 +17,6 @@ import {getLView} from '../state';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔgetCurrentView(): OpaqueViewState {
|
export function ɵɵgetCurrentView(): OpaqueViewState {
|
||||||
return getLView() as any as OpaqueViewState;
|
return getLView() as any as OpaqueViewState;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ import {BindingDirection, generatePropertyAliases, getCleanup, handleError, load
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δlistener(
|
export function ɵɵlistener(
|
||||||
eventName: string, listenerFn: (e?: any) => any, useCapture = false,
|
eventName: string, listenerFn: (e?: any) => any, useCapture = false,
|
||||||
eventTargetResolver?: GlobalTargetResolver): void {
|
eventTargetResolver?: GlobalTargetResolver): void {
|
||||||
listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);
|
listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);
|
||||||
@ -58,7 +58,7 @@ export function Δlistener(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔcomponentHostSyntheticListener<T>(
|
export function ɵɵcomponentHostSyntheticListener<T>(
|
||||||
eventName: string, listenerFn: (e?: any) => any, useCapture = false,
|
eventName: string, listenerFn: (e?: any) => any, useCapture = false,
|
||||||
eventTargetResolver?: GlobalTargetResolver): void {
|
eventTargetResolver?: GlobalTargetResolver): void {
|
||||||
listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);
|
listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export {ΔnamespaceHTML, ΔnamespaceMathML, ΔnamespaceSVG} from '../state';
|
export {ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG} from '../state';
|
||||||
|
@ -19,6 +19,6 @@ import {nextContextImpl} from '../state';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔnextContext<T = any>(level: number = 1): T {
|
export function ɵɵnextContext<T = any>(level: number = 1): T {
|
||||||
return nextContextImpl(level);
|
return nextContextImpl(level);
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ import {createNodeAtIndex} from './shared';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔprojectionDef(selectors?: CssSelectorList[]): void {
|
export function ɵɵprojectionDef(selectors?: CssSelectorList[]): void {
|
||||||
const componentNode = findComponentView(getLView())[T_HOST] as TElementNode;
|
const componentNode = findComponentView(getLView())[T_HOST] as TElementNode;
|
||||||
|
|
||||||
if (!componentNode.projection) {
|
if (!componentNode.projection) {
|
||||||
@ -78,7 +78,7 @@ export function ΔprojectionDef(selectors?: CssSelectorList[]): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δprojection(
|
export function ɵɵprojection(
|
||||||
nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {
|
nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const tProjectionNode =
|
const tProjectionNode =
|
||||||
|
@ -34,13 +34,13 @@ import {TsickleIssue1009, elementPropertyInternal, loadComponentRenderer, storeB
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δproperty<T>(
|
export function ɵɵproperty<T>(
|
||||||
propName: string, value: T, sanitizer?: SanitizerFn | null,
|
propName: string, value: T, sanitizer?: SanitizerFn | null,
|
||||||
nativeOnly?: boolean): TsickleIssue1009 {
|
nativeOnly?: boolean): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
const bindReconciledValue = Δbind(value);
|
const bindReconciledValue = ɵɵbind(value);
|
||||||
elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);
|
elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);
|
||||||
return Δproperty;
|
return ɵɵproperty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,7 +50,7 @@ export function Δproperty<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δbind<T>(value: T): T|NO_CHANGE {
|
export function ɵɵbind<T>(value: T): T|NO_CHANGE {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const bindingIndex = lView[BINDING_INDEX]++;
|
const bindingIndex = lView[BINDING_INDEX]++;
|
||||||
storeBindingMetadata(lView);
|
storeBindingMetadata(lView);
|
||||||
@ -75,7 +75,7 @@ export function Δbind<T>(value: T): T|NO_CHANGE {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementProperty<T>(
|
export function ɵɵelementProperty<T>(
|
||||||
index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null,
|
index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null,
|
||||||
nativeOnly?: boolean): void {
|
nativeOnly?: boolean): void {
|
||||||
elementPropertyInternal(index, propName, value, sanitizer, nativeOnly);
|
elementPropertyInternal(index, propName, value, sanitizer, nativeOnly);
|
||||||
@ -104,7 +104,7 @@ export function ΔelementProperty<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔcomponentHostSyntheticProperty<T>(
|
export function ɵɵcomponentHostSyntheticProperty<T>(
|
||||||
index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null,
|
index: number, propName: string, value: T | NO_CHANGE, sanitizer?: SanitizerFn | null,
|
||||||
nativeOnly?: boolean) {
|
nativeOnly?: boolean) {
|
||||||
elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadComponentRenderer);
|
elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadComponentRenderer);
|
||||||
|
@ -29,7 +29,7 @@ import {TsickleIssue1009, elementPropertyInternal, storeBindingMetadata} from '.
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔinterpolationV(values: any[]): string|NO_CHANGE {
|
export function ɵɵinterpolationV(values: any[]): string|NO_CHANGE {
|
||||||
ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');
|
ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');
|
||||||
ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');
|
ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');
|
||||||
let different = false;
|
let different = false;
|
||||||
@ -74,7 +74,7 @@ export function ΔinterpolationV(values: any[]): string|NO_CHANGE {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE {
|
export function ɵɵinterpolation1(prefix: string, v0: any, suffix: string): string|NO_CHANGE {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);
|
const different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);
|
||||||
storeBindingMetadata(lView, prefix, suffix);
|
storeBindingMetadata(lView, prefix, suffix);
|
||||||
@ -86,7 +86,7 @@ export function Δinterpolation1(prefix: string, v0: any, suffix: string): strin
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation2(
|
export function ɵɵinterpolation2(
|
||||||
prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {
|
prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
const bindingIndex = lView[BINDING_INDEX];
|
const bindingIndex = lView[BINDING_INDEX];
|
||||||
@ -107,7 +107,7 @@ export function Δinterpolation2(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation3(
|
export function ɵɵinterpolation3(
|
||||||
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string|
|
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string|
|
||||||
NO_CHANGE {
|
NO_CHANGE {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -133,7 +133,7 @@ export function Δinterpolation3(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation4(
|
export function ɵɵinterpolation4(
|
||||||
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
||||||
suffix: string): string|NO_CHANGE {
|
suffix: string): string|NO_CHANGE {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -161,7 +161,7 @@ export function Δinterpolation4(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation5(
|
export function ɵɵinterpolation5(
|
||||||
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
||||||
i3: string, v4: any, suffix: string): string|NO_CHANGE {
|
i3: string, v4: any, suffix: string): string|NO_CHANGE {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -191,7 +191,7 @@ export function Δinterpolation5(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation6(
|
export function ɵɵinterpolation6(
|
||||||
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
||||||
i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {
|
i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -222,7 +222,7 @@ export function Δinterpolation6(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation7(
|
export function ɵɵinterpolation7(
|
||||||
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
||||||
i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|
|
i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|
|
||||||
NO_CHANGE {
|
NO_CHANGE {
|
||||||
@ -256,7 +256,7 @@ export function Δinterpolation7(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δinterpolation8(
|
export function ɵɵinterpolation8(
|
||||||
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,
|
||||||
i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,
|
i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,
|
||||||
suffix: string): string|NO_CHANGE {
|
suffix: string): string|NO_CHANGE {
|
||||||
@ -292,7 +292,7 @@ export function Δinterpolation8(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shared reference to a string, used in `ΔpropertyInterpolate`.
|
* Shared reference to a string, used in `ɵɵpropertyInterpolate`.
|
||||||
*/
|
*/
|
||||||
const EMPTY_STRING = '';
|
const EMPTY_STRING = '';
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ const EMPTY_STRING = '';
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate('title', v0);
|
* ɵɵpropertyInterpolate('title', v0);
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* If the property name also exists as an input property on one of the element's directives,
|
* If the property name also exists as an input property on one of the element's directives,
|
||||||
@ -323,9 +323,9 @@ const EMPTY_STRING = '';
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue1009 {
|
export function ɵɵpropertyInterpolate(propName: string, v0: any): TsickleIssue1009 {
|
||||||
ΔpropertyInterpolate1(propName, EMPTY_STRING, v0, EMPTY_STRING);
|
ɵɵpropertyInterpolate1(propName, EMPTY_STRING, v0, EMPTY_STRING);
|
||||||
return ΔpropertyInterpolate;
|
return ɵɵpropertyInterpolate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue10
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate1('title', 'prefix', v0, 'suffix');
|
* ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* If the property name also exists as an input property on one of the element's directives,
|
* If the property name also exists as an input property on one of the element's directives,
|
||||||
@ -355,11 +355,11 @@ export function ΔpropertyInterpolate(propName: string, v0: any): TsickleIssue10
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate1(
|
export function ɵɵpropertyInterpolate1(
|
||||||
propName: string, prefix: string, v0: any, suffix: string): TsickleIssue1009 {
|
propName: string, prefix: string, v0: any, suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(index, propName, Δinterpolation1(prefix, v0, suffix));
|
elementPropertyInternal(index, propName, ɵɵinterpolation1(prefix, v0, suffix));
|
||||||
return ΔpropertyInterpolate1;
|
return ɵɵpropertyInterpolate1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -375,7 +375,7 @@ export function ΔpropertyInterpolate1(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
|
* ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* If the property name also exists as an input property on one of the element's directives,
|
* If the property name also exists as an input property on one of the element's directives,
|
||||||
@ -390,12 +390,12 @@ export function ΔpropertyInterpolate1(
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate2(
|
export function ɵɵpropertyInterpolate2(
|
||||||
propName: string, prefix: string, v0: any, i0: string, v1: any,
|
propName: string, prefix: string, v0: any, i0: string, v1: any,
|
||||||
suffix: string): TsickleIssue1009 {
|
suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(index, propName, Δinterpolation2(prefix, v0, i0, v1, suffix));
|
elementPropertyInternal(index, propName, ɵɵinterpolation2(prefix, v0, i0, v1, suffix));
|
||||||
return ΔpropertyInterpolate2;
|
return ɵɵpropertyInterpolate2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -411,7 +411,7 @@ export function ΔpropertyInterpolate2(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate3(
|
* ɵɵpropertyInterpolate3(
|
||||||
* 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
|
* 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -429,12 +429,12 @@ export function ΔpropertyInterpolate2(
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate3(
|
export function ɵɵpropertyInterpolate3(
|
||||||
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,
|
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,
|
||||||
suffix: string): TsickleIssue1009 {
|
suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(index, propName, Δinterpolation3(prefix, v0, i0, v1, i1, v2, suffix));
|
elementPropertyInternal(index, propName, ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix));
|
||||||
return ΔpropertyInterpolate3;
|
return ɵɵpropertyInterpolate3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -450,7 +450,7 @@ export function ΔpropertyInterpolate3(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate4(
|
* ɵɵpropertyInterpolate4(
|
||||||
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
|
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -470,13 +470,13 @@ export function ΔpropertyInterpolate3(
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate4(
|
export function ɵɵpropertyInterpolate4(
|
||||||
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
||||||
v3: any, suffix: string): TsickleIssue1009 {
|
v3: any, suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(
|
elementPropertyInternal(
|
||||||
index, propName, Δinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix));
|
index, propName, ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix));
|
||||||
return ΔpropertyInterpolate4;
|
return ɵɵpropertyInterpolate4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -492,7 +492,7 @@ export function ΔpropertyInterpolate4(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate5(
|
* ɵɵpropertyInterpolate5(
|
||||||
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
|
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -514,13 +514,13 @@ export function ΔpropertyInterpolate4(
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate5(
|
export function ɵɵpropertyInterpolate5(
|
||||||
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
||||||
v3: any, i3: string, v4: any, suffix: string): TsickleIssue1009 {
|
v3: any, i3: string, v4: any, suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(
|
elementPropertyInternal(
|
||||||
index, propName, Δinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix));
|
index, propName, ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix));
|
||||||
return ΔpropertyInterpolate5;
|
return ɵɵpropertyInterpolate5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -536,7 +536,7 @@ export function ΔpropertyInterpolate5(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate6(
|
* ɵɵpropertyInterpolate6(
|
||||||
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
|
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -560,13 +560,14 @@ export function ΔpropertyInterpolate5(
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate6(
|
export function ɵɵpropertyInterpolate6(
|
||||||
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
||||||
v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): TsickleIssue1009 {
|
v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(
|
elementPropertyInternal(
|
||||||
index, propName, Δinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix));
|
index, propName,
|
||||||
return ΔpropertyInterpolate6;
|
ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix));
|
||||||
|
return ɵɵpropertyInterpolate6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -582,7 +583,7 @@ export function ΔpropertyInterpolate6(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate7(
|
* ɵɵpropertyInterpolate7(
|
||||||
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
|
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -608,15 +609,15 @@ export function ΔpropertyInterpolate6(
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate7(
|
export function ɵɵpropertyInterpolate7(
|
||||||
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
||||||
v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,
|
v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,
|
||||||
suffix: string): TsickleIssue1009 {
|
suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(
|
elementPropertyInternal(
|
||||||
index, propName,
|
index, propName,
|
||||||
Δinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix));
|
ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix));
|
||||||
return ΔpropertyInterpolate7;
|
return ɵɵpropertyInterpolate7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -632,7 +633,7 @@ export function ΔpropertyInterpolate7(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolate8(
|
* ɵɵpropertyInterpolate8(
|
||||||
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
|
* 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -660,15 +661,15 @@ export function ΔpropertyInterpolate7(
|
|||||||
* @param suffix Static value used for concatenation only.
|
* @param suffix Static value used for concatenation only.
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolate8(
|
export function ɵɵpropertyInterpolate8(
|
||||||
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,
|
||||||
v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,
|
v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,
|
||||||
suffix: string): TsickleIssue1009 {
|
suffix: string): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
elementPropertyInternal(
|
elementPropertyInternal(
|
||||||
index, propName,
|
index, propName,
|
||||||
Δinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix));
|
ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix));
|
||||||
return ΔpropertyInterpolate8;
|
return ɵɵpropertyInterpolate8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -684,7 +685,7 @@ export function ΔpropertyInterpolate8(
|
|||||||
* Its compiled representation is::
|
* Its compiled representation is::
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* ΔpropertyInterpolateV(
|
* ɵɵpropertyInterpolateV(
|
||||||
* 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
|
* 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
|
||||||
* 'suffix']);
|
* 'suffix']);
|
||||||
* ```
|
* ```
|
||||||
@ -699,9 +700,9 @@ export function ΔpropertyInterpolate8(
|
|||||||
* (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
|
* (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
|
||||||
* @returns itself, so that it may be chained.
|
* @returns itself, so that it may be chained.
|
||||||
*/
|
*/
|
||||||
export function ΔpropertyInterpolateV(propName: string, values: any[]): TsickleIssue1009 {
|
export function ɵɵpropertyInterpolateV(propName: string, values: any[]): TsickleIssue1009 {
|
||||||
const index = getSelectedIndex();
|
const index = getSelectedIndex();
|
||||||
|
|
||||||
elementPropertyInternal(index, propName, ΔinterpolationV(values));
|
elementPropertyInternal(index, propName, ɵɵinterpolationV(values));
|
||||||
return ΔpropertyInterpolateV;
|
return ɵɵpropertyInterpolateV;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ import {getCheckNoChangesMode, getLView, setSelectedIndex} from '../state';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δselect(index: number): void {
|
export function ɵɵselect(index: number): void {
|
||||||
ngDevMode && assertGreaterThan(index, -1, 'Invalid index');
|
ngDevMode && assertGreaterThan(index, -1, 'Invalid index');
|
||||||
ngDevMode &&
|
ngDevMode &&
|
||||||
assertLessThan(
|
assertLessThan(
|
||||||
|
@ -30,7 +30,7 @@ import {StylingContext} from '../interfaces/styling';
|
|||||||
import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view';
|
import {BINDING_INDEX, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_VIEW, ExpandoInstructions, FLAGS, HEADER_OFFSET, HOST, INJECTOR, InitPhaseState, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, TData, TVIEW, TView, T_HOST} from '../interfaces/view';
|
||||||
import {assertNodeOfPossibleTypes, assertNodeType} from '../node_assert';
|
import {assertNodeOfPossibleTypes, assertNodeType} from '../node_assert';
|
||||||
import {isNodeMatchingSelectorList} from '../node_selector_matcher';
|
import {isNodeMatchingSelectorList} from '../node_selector_matcher';
|
||||||
import {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, incrementActiveDirectiveId, isCreationMode, leaveView, resetComponentState, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ΔnamespaceHTML} from '../state';
|
import {enterView, getBindingsEnabled, getCheckNoChangesMode, getIsParent, getLView, getNamespace, getPreviousOrParentTNode, incrementActiveDirectiveId, isCreationMode, leaveView, resetComponentState, setActiveHostElement, setBindingRoot, setCheckNoChangesMode, setCurrentDirectiveDef, setCurrentQueryIndex, setIsParent, setPreviousOrParentTNode, setSelectedIndex, ɵɵnamespaceHTML} from '../state';
|
||||||
import {initializeStaticContext as initializeStaticStylingContext} from '../styling/class_and_style_bindings';
|
import {initializeStaticContext as initializeStaticStylingContext} from '../styling/class_and_style_bindings';
|
||||||
import {ANIMATION_PROP_PREFIX, isAnimationProp} from '../styling/util';
|
import {ANIMATION_PROP_PREFIX, isAnimationProp} from '../styling/util';
|
||||||
import {NO_CHANGE} from '../tokens';
|
import {NO_CHANGE} from '../tokens';
|
||||||
@ -431,7 +431,7 @@ export function renderEmbeddedTemplate<T>(viewToRender: LView, tView: TView, con
|
|||||||
|
|
||||||
oldView = enterView(viewToRender, viewToRender[T_HOST]);
|
oldView = enterView(viewToRender, viewToRender[T_HOST]);
|
||||||
resetPreOrderHookFlags(viewToRender);
|
resetPreOrderHookFlags(viewToRender);
|
||||||
ΔnamespaceHTML();
|
ɵɵnamespaceHTML();
|
||||||
|
|
||||||
// Reset the selected index so we can assert that `select` was called later
|
// Reset the selected index so we can assert that `select` was called later
|
||||||
setSelectedIndex(-1);
|
setSelectedIndex(-1);
|
||||||
@ -466,7 +466,7 @@ function renderComponentOrTemplate<T>(
|
|||||||
if (creationModeIsActive) {
|
if (creationModeIsActive) {
|
||||||
// creation mode pass
|
// creation mode pass
|
||||||
if (templateFn) {
|
if (templateFn) {
|
||||||
ΔnamespaceHTML();
|
ɵɵnamespaceHTML();
|
||||||
|
|
||||||
// Reset the selected index so we can assert that `select` was called later
|
// Reset the selected index so we can assert that `select` was called later
|
||||||
setSelectedIndex(-1);
|
setSelectedIndex(-1);
|
||||||
@ -1672,7 +1672,7 @@ export function checkView<T>(hostView: LView, component: T) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
resetPreOrderHookFlags(hostView);
|
resetPreOrderHookFlags(hostView);
|
||||||
ΔnamespaceHTML();
|
ɵɵnamespaceHTML();
|
||||||
creationMode && executeViewQueryFn(RenderFlags.Create, hostTView, component);
|
creationMode && executeViewQueryFn(RenderFlags.Create, hostTView, component);
|
||||||
|
|
||||||
// Reset the selected index so we can assert that `select` was called later
|
// Reset the selected index so we can assert that `select` was called later
|
||||||
|
@ -33,7 +33,7 @@ export function store<T>(index: number, value: T): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δreference<T>(index: number) {
|
export function ɵɵreference<T>(index: number) {
|
||||||
const contextLView = getContextLView();
|
const contextLView = getContextLView();
|
||||||
return loadInternal<T>(contextLView, index);
|
return loadInternal<T>(contextLView, index);
|
||||||
}
|
}
|
||||||
@ -43,6 +43,6 @@ export function Δreference<T>(index: number) {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δload<T>(index: number): T {
|
export function ɵɵload<T>(index: number): T {
|
||||||
return loadInternal<T>(getLView(), index);
|
return loadInternal<T>(getLView(), index);
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ import {scheduleTick, setInputsForProperty} from './shared';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementStyling(
|
export function ɵɵelementStyling(
|
||||||
classBindingNames?: string[] | null, styleBindingNames?: string[] | null,
|
classBindingNames?: string[] | null, styleBindingNames?: string[] | null,
|
||||||
styleSanitizer?: StyleSanitizeFn | null): void {
|
styleSanitizer?: StyleSanitizeFn | null): void {
|
||||||
const tNode = getPreviousOrParentTNode();
|
const tNode = getPreviousOrParentTNode();
|
||||||
@ -106,7 +106,7 @@ export function ΔelementStyling(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementHostStyling(
|
export function ɵɵelementHostStyling(
|
||||||
classBindingNames?: string[] | null, styleBindingNames?: string[] | null,
|
classBindingNames?: string[] | null, styleBindingNames?: string[] | null,
|
||||||
styleSanitizer?: StyleSanitizeFn | null): void {
|
styleSanitizer?: StyleSanitizeFn | null): void {
|
||||||
const tNode = getPreviousOrParentTNode();
|
const tNode = getPreviousOrParentTNode();
|
||||||
@ -166,7 +166,7 @@ function initElementStyling(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementStyleProp(
|
export function ɵɵelementStyleProp(
|
||||||
index: number, styleIndex: number, value: string | number | String | PlayerFactory | null,
|
index: number, styleIndex: number, value: string | number | String | PlayerFactory | null,
|
||||||
suffix?: string | null, forceOverride?: boolean): void {
|
suffix?: string | null, forceOverride?: boolean): void {
|
||||||
const valueToAdd = resolveStylePropValue(value, suffix);
|
const valueToAdd = resolveStylePropValue(value, suffix);
|
||||||
@ -200,7 +200,7 @@ export function ΔelementStyleProp(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementHostStyleProp(
|
export function ɵɵelementHostStyleProp(
|
||||||
styleIndex: number, value: string | number | String | PlayerFactory | null,
|
styleIndex: number, value: string | number | String | PlayerFactory | null,
|
||||||
suffix?: string | null, forceOverride?: boolean): void {
|
suffix?: string | null, forceOverride?: boolean): void {
|
||||||
const directiveStylingIndex = getActiveDirectiveStylingIndex();
|
const directiveStylingIndex = getActiveDirectiveStylingIndex();
|
||||||
@ -253,7 +253,7 @@ function resolveStylePropValue(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementClassProp(
|
export function ɵɵelementClassProp(
|
||||||
index: number, classIndex: number, value: boolean | PlayerFactory,
|
index: number, classIndex: number, value: boolean | PlayerFactory,
|
||||||
forceOverride?: boolean): void {
|
forceOverride?: boolean): void {
|
||||||
const input = (value instanceof BoundPlayerFactory) ?
|
const input = (value instanceof BoundPlayerFactory) ?
|
||||||
@ -283,7 +283,7 @@ export function ΔelementClassProp(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementHostClassProp(
|
export function ɵɵelementHostClassProp(
|
||||||
classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void {
|
classIndex: number, value: boolean | PlayerFactory, forceOverride?: boolean): void {
|
||||||
const directiveStylingIndex = getActiveDirectiveStylingIndex();
|
const directiveStylingIndex = getActiveDirectiveStylingIndex();
|
||||||
const hostElementIndex = getSelectedIndex();
|
const hostElementIndex = getSelectedIndex();
|
||||||
@ -326,7 +326,7 @@ function booleanOrNull(value: any): boolean|null {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementStylingMap(
|
export function ɵɵelementStylingMap(
|
||||||
index: number, classes: {[key: string]: any} | string | NO_CHANGE | null,
|
index: number, classes: {[key: string]: any} | string | NO_CHANGE | null,
|
||||||
styles?: {[styleName: string]: any} | NO_CHANGE | null): void {
|
styles?: {[styleName: string]: any} | NO_CHANGE | null): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -379,7 +379,7 @@ export function ΔelementStylingMap(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementHostStylingMap(
|
export function ɵɵelementHostStylingMap(
|
||||||
classes: {[key: string]: any} | string | NO_CHANGE | null,
|
classes: {[key: string]: any} | string | NO_CHANGE | null,
|
||||||
styles?: {[styleName: string]: any} | NO_CHANGE | null): void {
|
styles?: {[styleName: string]: any} | NO_CHANGE | null): void {
|
||||||
const directiveStylingIndex = getActiveDirectiveStylingIndex();
|
const directiveStylingIndex = getActiveDirectiveStylingIndex();
|
||||||
@ -405,7 +405,7 @@ export function ΔelementHostStylingMap(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementStylingApply(index: number): void {
|
export function ɵɵelementStylingApply(index: number): void {
|
||||||
elementStylingApplyInternal(DEFAULT_TEMPLATE_DIRECTIVE_INDEX, index);
|
elementStylingApplyInternal(DEFAULT_TEMPLATE_DIRECTIVE_INDEX, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ export function ΔelementStylingApply(index: number): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔelementHostStylingApply(): void {
|
export function ɵɵelementHostStylingApply(): void {
|
||||||
elementStylingApplyInternal(getActiveDirectiveStylingIndex(), getSelectedIndex());
|
elementStylingApplyInternal(getActiveDirectiveStylingIndex(), getSelectedIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import {createNodeAtIndex} from './shared';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δtext(index: number, value?: any): void {
|
export function ɵɵtext(index: number, value?: any): void {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
ngDevMode && assertEqual(
|
ngDevMode && assertEqual(
|
||||||
lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,
|
lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex,
|
||||||
@ -47,7 +47,7 @@ export function Δtext(index: number, value?: any): void {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔtextBinding<T>(index: number, value: T | NO_CHANGE): void {
|
export function ɵɵtextBinding<T>(index: number, value: T | NO_CHANGE): void {
|
||||||
if (value !== NO_CHANGE) {
|
if (value !== NO_CHANGE) {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
|
ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
|
||||||
|
@ -88,7 +88,7 @@ export interface PipeType<T> extends Type<T> { ngPipeDef: never; }
|
|||||||
/**
|
/**
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export type ΔDirectiveDefWithMeta<
|
export type ɵɵDirectiveDefWithMeta<
|
||||||
T, Selector extends string, ExportAs extends string[], InputMap extends{[key: string]: string},
|
T, Selector extends string, ExportAs extends string[], InputMap extends{[key: string]: string},
|
||||||
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = DirectiveDef<T>;
|
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = DirectiveDef<T>;
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ export type ΔDirectiveDefWithMeta<
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export interface ΔBaseDef<T> {
|
export interface ɵɵBaseDef<T> {
|
||||||
/**
|
/**
|
||||||
* A dictionary mapping the inputs' minified property names to their public API names, which
|
* A dictionary mapping the inputs' minified property names to their public API names, which
|
||||||
* are their aliases if any, or their original unminified property names
|
* are their aliases if any, or their original unminified property names
|
||||||
@ -139,7 +139,7 @@ export interface ΔBaseDef<T> {
|
|||||||
*
|
*
|
||||||
* See: {@link defineDirective}
|
* See: {@link defineDirective}
|
||||||
*/
|
*/
|
||||||
export interface DirectiveDef<T> extends ΔBaseDef<T> {
|
export interface DirectiveDef<T> extends ɵɵBaseDef<T> {
|
||||||
/** Token representing the directive. Used by DI. */
|
/** Token representing the directive. Used by DI. */
|
||||||
type: Type<T>;
|
type: Type<T>;
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ export interface DirectiveDef<T> extends ΔBaseDef<T> {
|
|||||||
/**
|
/**
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export type ΔComponentDefWithMeta<
|
export type ɵɵComponentDefWithMeta<
|
||||||
T, Selector extends String, ExportAs extends string[], InputMap extends{[key: string]: string},
|
T, Selector extends String, ExportAs extends string[], InputMap extends{[key: string]: string},
|
||||||
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = ComponentDef<T>;
|
OutputMap extends{[key: string]: string}, QueryFields extends string[]> = ComponentDef<T>;
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ export interface PipeDef<T> {
|
|||||||
/**
|
/**
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export type ΔPipeDefWithMeta<T, Name extends string> = PipeDef<T>;
|
export type ɵɵPipeDefWithMeta<T, Name extends string> = PipeDef<T>;
|
||||||
|
|
||||||
export interface DirectiveDefFeature {
|
export interface DirectiveDefFeature {
|
||||||
<T>(directiveDef: DirectiveDef<T>): void;
|
<T>(directiveDef: DirectiveDef<T>): void;
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {ΔdefineInjectable, ΔdefineInjector,} from '../../di/interface/defs';
|
import {ɵɵdefineInjectable, ɵɵdefineInjector,} from '../../di/interface/defs';
|
||||||
import {Δinject} from '../../di/injector_compatibility';
|
import {ɵɵinject} from '../../di/injector_compatibility';
|
||||||
import * as r3 from '../index';
|
import * as r3 from '../index';
|
||||||
import * as sanitization from '../../sanitization/sanitization';
|
import * as sanitization from '../../sanitization/sanitization';
|
||||||
|
|
||||||
@ -18,117 +18,117 @@ import * as sanitization from '../../sanitization/sanitization';
|
|||||||
* This should be kept up to date with the public exports of @angular/core.
|
* This should be kept up to date with the public exports of @angular/core.
|
||||||
*/
|
*/
|
||||||
export const angularCoreEnv: {[name: string]: Function} = {
|
export const angularCoreEnv: {[name: string]: Function} = {
|
||||||
'ΔdefineBase': r3.ΔdefineBase,
|
'ɵɵdefineBase': r3.ɵɵdefineBase,
|
||||||
'ΔdefineComponent': r3.ΔdefineComponent,
|
'ɵɵdefineComponent': r3.ɵɵdefineComponent,
|
||||||
'ΔdefineDirective': r3.ΔdefineDirective,
|
'ɵɵdefineDirective': r3.ɵɵdefineDirective,
|
||||||
'ΔdefineInjectable': ΔdefineInjectable,
|
'ɵɵdefineInjectable': ɵɵdefineInjectable,
|
||||||
'ΔdefineInjector': ΔdefineInjector,
|
'ɵɵdefineInjector': ɵɵdefineInjector,
|
||||||
'ΔdefineNgModule': r3.ΔdefineNgModule,
|
'ɵɵdefineNgModule': r3.ɵɵdefineNgModule,
|
||||||
'ΔdefinePipe': r3.ΔdefinePipe,
|
'ɵɵdefinePipe': r3.ɵɵdefinePipe,
|
||||||
'ΔdirectiveInject': r3.ΔdirectiveInject,
|
'ɵɵdirectiveInject': r3.ɵɵdirectiveInject,
|
||||||
'ΔgetFactoryOf': r3.ΔgetFactoryOf,
|
'ɵɵgetFactoryOf': r3.ɵɵgetFactoryOf,
|
||||||
'ΔgetInheritedFactory': r3.ΔgetInheritedFactory,
|
'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,
|
||||||
'Δinject': Δinject,
|
'ɵɵinject': ɵɵinject,
|
||||||
'ΔinjectAttribute': r3.ΔinjectAttribute,
|
'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,
|
||||||
'ΔtemplateRefExtractor': r3.ΔtemplateRefExtractor,
|
'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,
|
||||||
'ΔNgOnChangesFeature': r3.ΔNgOnChangesFeature,
|
'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,
|
||||||
'ΔProvidersFeature': r3.ΔProvidersFeature,
|
'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,
|
||||||
'ΔInheritDefinitionFeature': r3.ΔInheritDefinitionFeature,
|
'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,
|
||||||
'ΔelementAttribute': r3.ΔelementAttribute,
|
'ɵɵelementAttribute': r3.ɵɵelementAttribute,
|
||||||
'Δbind': r3.Δbind,
|
'ɵɵbind': r3.ɵɵbind,
|
||||||
'Δcontainer': r3.Δcontainer,
|
'ɵɵcontainer': r3.ɵɵcontainer,
|
||||||
'ΔnextContext': r3.ΔnextContext,
|
'ɵɵnextContext': r3.ɵɵnextContext,
|
||||||
'ΔcontainerRefreshStart': r3.ΔcontainerRefreshStart,
|
'ɵɵcontainerRefreshStart': r3.ɵɵcontainerRefreshStart,
|
||||||
'ΔcontainerRefreshEnd': r3.ΔcontainerRefreshEnd,
|
'ɵɵcontainerRefreshEnd': r3.ɵɵcontainerRefreshEnd,
|
||||||
'ΔnamespaceHTML': r3.ΔnamespaceHTML,
|
'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,
|
||||||
'ΔnamespaceMathML': r3.ΔnamespaceMathML,
|
'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,
|
||||||
'ΔnamespaceSVG': r3.ΔnamespaceSVG,
|
'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,
|
||||||
'ΔenableBindings': r3.ΔenableBindings,
|
'ɵɵenableBindings': r3.ɵɵenableBindings,
|
||||||
'ΔdisableBindings': r3.ΔdisableBindings,
|
'ɵɵdisableBindings': r3.ɵɵdisableBindings,
|
||||||
'ΔallocHostVars': r3.ΔallocHostVars,
|
'ɵɵallocHostVars': r3.ɵɵallocHostVars,
|
||||||
'ΔelementStart': r3.ΔelementStart,
|
'ɵɵelementStart': r3.ɵɵelementStart,
|
||||||
'ΔelementEnd': r3.ΔelementEnd,
|
'ɵɵelementEnd': r3.ɵɵelementEnd,
|
||||||
'Δelement': r3.Δelement,
|
'ɵɵelement': r3.ɵɵelement,
|
||||||
'ΔelementContainerStart': r3.ΔelementContainerStart,
|
'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,
|
||||||
'ΔelementContainerEnd': r3.ΔelementContainerEnd,
|
'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,
|
||||||
'ΔpureFunction0': r3.ΔpureFunction0,
|
'ɵɵpureFunction0': r3.ɵɵpureFunction0,
|
||||||
'ΔpureFunction1': r3.ΔpureFunction1,
|
'ɵɵpureFunction1': r3.ɵɵpureFunction1,
|
||||||
'ΔpureFunction2': r3.ΔpureFunction2,
|
'ɵɵpureFunction2': r3.ɵɵpureFunction2,
|
||||||
'ΔpureFunction3': r3.ΔpureFunction3,
|
'ɵɵpureFunction3': r3.ɵɵpureFunction3,
|
||||||
'ΔpureFunction4': r3.ΔpureFunction4,
|
'ɵɵpureFunction4': r3.ɵɵpureFunction4,
|
||||||
'ΔpureFunction5': r3.ΔpureFunction5,
|
'ɵɵpureFunction5': r3.ɵɵpureFunction5,
|
||||||
'ΔpureFunction6': r3.ΔpureFunction6,
|
'ɵɵpureFunction6': r3.ɵɵpureFunction6,
|
||||||
'ΔpureFunction7': r3.ΔpureFunction7,
|
'ɵɵpureFunction7': r3.ɵɵpureFunction7,
|
||||||
'ΔpureFunction8': r3.ΔpureFunction8,
|
'ɵɵpureFunction8': r3.ɵɵpureFunction8,
|
||||||
'ΔpureFunctionV': r3.ΔpureFunctionV,
|
'ɵɵpureFunctionV': r3.ɵɵpureFunctionV,
|
||||||
'ΔgetCurrentView': r3.ΔgetCurrentView,
|
'ɵɵgetCurrentView': r3.ɵɵgetCurrentView,
|
||||||
'ΔrestoreView': r3.ΔrestoreView,
|
'ɵɵrestoreView': r3.ɵɵrestoreView,
|
||||||
'Δinterpolation1': r3.Δinterpolation1,
|
'ɵɵinterpolation1': r3.ɵɵinterpolation1,
|
||||||
'Δinterpolation2': r3.Δinterpolation2,
|
'ɵɵinterpolation2': r3.ɵɵinterpolation2,
|
||||||
'Δinterpolation3': r3.Δinterpolation3,
|
'ɵɵinterpolation3': r3.ɵɵinterpolation3,
|
||||||
'Δinterpolation4': r3.Δinterpolation4,
|
'ɵɵinterpolation4': r3.ɵɵinterpolation4,
|
||||||
'Δinterpolation5': r3.Δinterpolation5,
|
'ɵɵinterpolation5': r3.ɵɵinterpolation5,
|
||||||
'Δinterpolation6': r3.Δinterpolation6,
|
'ɵɵinterpolation6': r3.ɵɵinterpolation6,
|
||||||
'Δinterpolation7': r3.Δinterpolation7,
|
'ɵɵinterpolation7': r3.ɵɵinterpolation7,
|
||||||
'Δinterpolation8': r3.Δinterpolation8,
|
'ɵɵinterpolation8': r3.ɵɵinterpolation8,
|
||||||
'ΔinterpolationV': r3.ΔinterpolationV,
|
'ɵɵinterpolationV': r3.ɵɵinterpolationV,
|
||||||
'Δlistener': r3.Δlistener,
|
'ɵɵlistener': r3.ɵɵlistener,
|
||||||
'Δload': r3.Δload,
|
'ɵɵload': r3.ɵɵload,
|
||||||
'Δprojection': r3.Δprojection,
|
'ɵɵprojection': r3.ɵɵprojection,
|
||||||
'ΔelementProperty': r3.ΔelementProperty,
|
'ɵɵelementProperty': r3.ɵɵelementProperty,
|
||||||
'ΔcomponentHostSyntheticProperty': r3.ΔcomponentHostSyntheticProperty,
|
'ɵɵcomponentHostSyntheticProperty': r3.ɵɵcomponentHostSyntheticProperty,
|
||||||
'ΔcomponentHostSyntheticListener': r3.ΔcomponentHostSyntheticListener,
|
'ɵɵcomponentHostSyntheticListener': r3.ɵɵcomponentHostSyntheticListener,
|
||||||
'ΔpipeBind1': r3.ΔpipeBind1,
|
'ɵɵpipeBind1': r3.ɵɵpipeBind1,
|
||||||
'ΔpipeBind2': r3.ΔpipeBind2,
|
'ɵɵpipeBind2': r3.ɵɵpipeBind2,
|
||||||
'ΔpipeBind3': r3.ΔpipeBind3,
|
'ɵɵpipeBind3': r3.ɵɵpipeBind3,
|
||||||
'ΔpipeBind4': r3.ΔpipeBind4,
|
'ɵɵpipeBind4': r3.ɵɵpipeBind4,
|
||||||
'ΔpipeBindV': r3.ΔpipeBindV,
|
'ɵɵpipeBindV': r3.ɵɵpipeBindV,
|
||||||
'ΔprojectionDef': r3.ΔprojectionDef,
|
'ɵɵprojectionDef': r3.ɵɵprojectionDef,
|
||||||
'Δpipe': r3.Δpipe,
|
'ɵɵpipe': r3.ɵɵpipe,
|
||||||
'ΔqueryRefresh': r3.ΔqueryRefresh,
|
'ɵɵqueryRefresh': r3.ɵɵqueryRefresh,
|
||||||
'ΔviewQuery': r3.ΔviewQuery,
|
'ɵɵviewQuery': r3.ɵɵviewQuery,
|
||||||
'ΔstaticViewQuery': r3.ΔstaticViewQuery,
|
'ɵɵstaticViewQuery': r3.ɵɵstaticViewQuery,
|
||||||
'ΔstaticContentQuery': r3.ΔstaticContentQuery,
|
'ɵɵstaticContentQuery': r3.ɵɵstaticContentQuery,
|
||||||
'ΔloadViewQuery': r3.ΔloadViewQuery,
|
'ɵɵloadViewQuery': r3.ɵɵloadViewQuery,
|
||||||
'ΔcontentQuery': r3.ΔcontentQuery,
|
'ɵɵcontentQuery': r3.ɵɵcontentQuery,
|
||||||
'ΔloadContentQuery': r3.ΔloadContentQuery,
|
'ɵɵloadContentQuery': r3.ɵɵloadContentQuery,
|
||||||
'Δreference': r3.Δreference,
|
'ɵɵreference': r3.ɵɵreference,
|
||||||
'ΔelementHostAttrs': r3.ΔelementHostAttrs,
|
'ɵɵelementHostAttrs': r3.ɵɵelementHostAttrs,
|
||||||
'ΔelementStyling': r3.ΔelementStyling,
|
'ɵɵelementStyling': r3.ɵɵelementStyling,
|
||||||
'ΔelementStylingMap': r3.ΔelementStylingMap,
|
'ɵɵelementStylingMap': r3.ɵɵelementStylingMap,
|
||||||
'ΔelementStyleProp': r3.ΔelementStyleProp,
|
'ɵɵelementStyleProp': r3.ɵɵelementStyleProp,
|
||||||
'ΔelementStylingApply': r3.ΔelementStylingApply,
|
'ɵɵelementStylingApply': r3.ɵɵelementStylingApply,
|
||||||
'ΔelementClassProp': r3.ΔelementClassProp,
|
'ɵɵelementClassProp': r3.ɵɵelementClassProp,
|
||||||
'ΔelementHostStyling': r3.ΔelementHostStyling,
|
'ɵɵelementHostStyling': r3.ɵɵelementHostStyling,
|
||||||
'ΔelementHostStylingMap': r3.ΔelementHostStylingMap,
|
'ɵɵelementHostStylingMap': r3.ɵɵelementHostStylingMap,
|
||||||
'ΔelementHostStyleProp': r3.ΔelementHostStyleProp,
|
'ɵɵelementHostStyleProp': r3.ɵɵelementHostStyleProp,
|
||||||
'ΔelementHostStylingApply': r3.ΔelementHostStylingApply,
|
'ɵɵelementHostStylingApply': r3.ɵɵelementHostStylingApply,
|
||||||
'ΔelementHostClassProp': r3.ΔelementHostClassProp,
|
'ɵɵelementHostClassProp': r3.ɵɵelementHostClassProp,
|
||||||
'Δselect': r3.Δselect,
|
'ɵɵselect': r3.ɵɵselect,
|
||||||
'Δtemplate': r3.Δtemplate,
|
'ɵɵtemplate': r3.ɵɵtemplate,
|
||||||
'Δtext': r3.Δtext,
|
'ɵɵtext': r3.ɵɵtext,
|
||||||
'ΔtextBinding': r3.ΔtextBinding,
|
'ɵɵtextBinding': r3.ɵɵtextBinding,
|
||||||
'ΔembeddedViewStart': r3.ΔembeddedViewStart,
|
'ɵɵembeddedViewStart': r3.ɵɵembeddedViewStart,
|
||||||
'ΔembeddedViewEnd': r3.ΔembeddedViewEnd,
|
'ɵɵembeddedViewEnd': r3.ɵɵembeddedViewEnd,
|
||||||
'Δi18n': r3.Δi18n,
|
'ɵɵi18n': r3.ɵɵi18n,
|
||||||
'Δi18nAttributes': r3.Δi18nAttributes,
|
'ɵɵi18nAttributes': r3.ɵɵi18nAttributes,
|
||||||
'Δi18nExp': r3.Δi18nExp,
|
'ɵɵi18nExp': r3.ɵɵi18nExp,
|
||||||
'Δi18nStart': r3.Δi18nStart,
|
'ɵɵi18nStart': r3.ɵɵi18nStart,
|
||||||
'Δi18nEnd': r3.Δi18nEnd,
|
'ɵɵi18nEnd': r3.ɵɵi18nEnd,
|
||||||
'Δi18nApply': r3.Δi18nApply,
|
'ɵɵi18nApply': r3.ɵɵi18nApply,
|
||||||
'Δi18nPostprocess': r3.Δi18nPostprocess,
|
'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess,
|
||||||
'Δi18nLocalize': r3.Δi18nLocalize,
|
'ɵɵi18nLocalize': r3.ɵɵi18nLocalize,
|
||||||
'ΔresolveWindow': r3.ΔresolveWindow,
|
'ɵɵresolveWindow': r3.ɵɵresolveWindow,
|
||||||
'ΔresolveDocument': r3.ΔresolveDocument,
|
'ɵɵresolveDocument': r3.ɵɵresolveDocument,
|
||||||
'ΔresolveBody': r3.ΔresolveBody,
|
'ɵɵresolveBody': r3.ɵɵresolveBody,
|
||||||
'ΔsetComponentScope': r3.ΔsetComponentScope,
|
'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,
|
||||||
'ΔsetNgModuleScope': r3.ΔsetNgModuleScope,
|
'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,
|
||||||
|
|
||||||
'ΔsanitizeHtml': sanitization.ΔsanitizeHtml,
|
'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,
|
||||||
'ΔsanitizeStyle': sanitization.ΔsanitizeStyle,
|
'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,
|
||||||
'ΔdefaultStyleSanitizer': sanitization.ΔdefaultStyleSanitizer,
|
'ɵɵdefaultStyleSanitizer': sanitization.ɵɵdefaultStyleSanitizer,
|
||||||
'ΔsanitizeResourceUrl': sanitization.ΔsanitizeResourceUrl,
|
'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,
|
||||||
'ΔsanitizeScript': sanitization.ΔsanitizeScript,
|
'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,
|
||||||
'ΔsanitizeUrl': sanitization.ΔsanitizeUrl,
|
'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,
|
||||||
'ΔsanitizeUrlOrResourceUrl': sanitization.ΔsanitizeUrlOrResourceUrl
|
'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl
|
||||||
};
|
};
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
import {WrappedValue} from '../change_detection/change_detection_util';
|
import {WrappedValue} from '../change_detection/change_detection_util';
|
||||||
import {PipeTransform} from '../change_detection/pipe_transform';
|
import {PipeTransform} from '../change_detection/pipe_transform';
|
||||||
|
|
||||||
import {store, Δload} from './instructions/all';
|
import {store, ɵɵload} from './instructions/all';
|
||||||
import {PipeDef, PipeDefList} from './interfaces/definition';
|
import {PipeDef, PipeDefList} from './interfaces/definition';
|
||||||
import {BINDING_INDEX, HEADER_OFFSET, TVIEW} from './interfaces/view';
|
import {BINDING_INDEX, HEADER_OFFSET, TVIEW} from './interfaces/view';
|
||||||
import {ΔpureFunction1, ΔpureFunction2, ΔpureFunction3, ΔpureFunction4, ΔpureFunctionV} from './pure_function';
|
import {ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunctionV} from './pure_function';
|
||||||
import {getLView} from './state';
|
import {getLView} from './state';
|
||||||
import {NO_CHANGE} from './tokens';
|
import {NO_CHANGE} from './tokens';
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ import {NO_CHANGE} from './tokens';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function Δpipe(index: number, pipeName: string): any {
|
export function ɵɵpipe(index: number, pipeName: string): any {
|
||||||
const tView = getLView()[TVIEW];
|
const tView = getLView()[TVIEW];
|
||||||
let pipeDef: PipeDef<any>;
|
let pipeDef: PipeDef<any>;
|
||||||
const adjustedIndex = index + HEADER_OFFSET;
|
const adjustedIndex = index + HEADER_OFFSET;
|
||||||
@ -81,10 +81,10 @@ function getPipeDef(name: string, registry: PipeDefList | null): PipeDef<any> {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpipeBind1(index: number, slotOffset: number, v1: any): any {
|
export function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any {
|
||||||
const pipeInstance = Δload<PipeTransform>(index);
|
const pipeInstance = ɵɵload<PipeTransform>(index);
|
||||||
return unwrapValue(
|
return unwrapValue(
|
||||||
isPure(index) ? ΔpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :
|
isPure(index) ? ɵɵpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :
|
||||||
pipeInstance.transform(v1));
|
pipeInstance.transform(v1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,10 +101,10 @@ export function ΔpipeBind1(index: number, slotOffset: number, v1: any): any {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {
|
export function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {
|
||||||
const pipeInstance = Δload<PipeTransform>(index);
|
const pipeInstance = ɵɵload<PipeTransform>(index);
|
||||||
return unwrapValue(
|
return unwrapValue(
|
||||||
isPure(index) ? ΔpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :
|
isPure(index) ? ɵɵpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :
|
||||||
pipeInstance.transform(v1, v2));
|
pipeInstance.transform(v1, v2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,11 +122,12 @@ export function ΔpipeBind2(index: number, slotOffset: number, v1: any, v2: any)
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {
|
export function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {
|
||||||
const pipeInstance = Δload<PipeTransform>(index);
|
const pipeInstance = ɵɵload<PipeTransform>(index);
|
||||||
return unwrapValue(
|
return unwrapValue(
|
||||||
isPure(index) ? ΔpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :
|
isPure(index) ?
|
||||||
pipeInstance.transform(v1, v2, v3));
|
ɵɵpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :
|
||||||
|
pipeInstance.transform(v1, v2, v3));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -144,12 +145,12 @@ export function ΔpipeBind3(index: number, slotOffset: number, v1: any, v2: any,
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpipeBind4(
|
export function ɵɵpipeBind4(
|
||||||
index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {
|
index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {
|
||||||
const pipeInstance = Δload<PipeTransform>(index);
|
const pipeInstance = ɵɵload<PipeTransform>(index);
|
||||||
return unwrapValue(
|
return unwrapValue(
|
||||||
isPure(index) ?
|
isPure(index) ?
|
||||||
ΔpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :
|
ɵɵpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :
|
||||||
pipeInstance.transform(v1, v2, v3, v4));
|
pipeInstance.transform(v1, v2, v3, v4));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,10 +166,10 @@ export function ΔpipeBind4(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpipeBindV(index: number, slotOffset: number, values: any[]): any {
|
export function ɵɵpipeBindV(index: number, slotOffset: number, values: any[]): any {
|
||||||
const pipeInstance = Δload<PipeTransform>(index);
|
const pipeInstance = ɵɵload<PipeTransform>(index);
|
||||||
return unwrapValue(
|
return unwrapValue(
|
||||||
isPure(index) ? ΔpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :
|
isPure(index) ? ɵɵpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :
|
||||||
pipeInstance.transform.apply(pipeInstance, values));
|
pipeInstance.transform.apply(pipeInstance, values));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ import {getBindingRoot, getLView, isCreationMode} from './state';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {
|
export function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
const bindingIndex = getBindingRoot() + slotOffset;
|
const bindingIndex = getBindingRoot() + slotOffset;
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -61,7 +61,7 @@ export function ΔpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction1(
|
export function ɵɵpureFunction1(
|
||||||
slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {
|
slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -84,7 +84,7 @@ export function ΔpureFunction1(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction2(
|
export function ɵɵpureFunction2(
|
||||||
slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,
|
slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,
|
||||||
thisArg?: any): any {
|
thisArg?: any): any {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
@ -111,7 +111,7 @@ export function ΔpureFunction2(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction3(
|
export function ɵɵpureFunction3(
|
||||||
slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,
|
slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,
|
||||||
thisArg?: any): any {
|
thisArg?: any): any {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
@ -139,7 +139,7 @@ export function ΔpureFunction3(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction4(
|
export function ɵɵpureFunction4(
|
||||||
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,
|
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,
|
||||||
exp3: any, exp4: any, thisArg?: any): any {
|
exp3: any, exp4: any, thisArg?: any): any {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
@ -168,7 +168,7 @@ export function ΔpureFunction4(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction5(
|
export function ɵɵpureFunction5(
|
||||||
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,
|
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,
|
||||||
exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {
|
exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
@ -199,7 +199,7 @@ export function ΔpureFunction5(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction6(
|
export function ɵɵpureFunction6(
|
||||||
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,
|
slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,
|
||||||
exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {
|
exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
@ -232,7 +232,7 @@ export function ΔpureFunction6(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction7(
|
export function ɵɵpureFunction7(
|
||||||
slotOffset: number,
|
slotOffset: number,
|
||||||
pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,
|
pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,
|
||||||
exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {
|
exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {
|
||||||
@ -267,7 +267,7 @@ export function ΔpureFunction7(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunction8(
|
export function ɵɵpureFunction8(
|
||||||
slotOffset: number,
|
slotOffset: number,
|
||||||
pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,
|
pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,
|
||||||
exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,
|
exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,
|
||||||
@ -299,7 +299,7 @@ export function ΔpureFunction8(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔpureFunctionV(
|
export function ɵɵpureFunctionV(
|
||||||
slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {
|
slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {
|
||||||
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings
|
||||||
let bindingIndex = getBindingRoot() + slotOffset;
|
let bindingIndex = getBindingRoot() + slotOffset;
|
||||||
|
@ -18,7 +18,7 @@ import {assertDataInRange, assertDefined, assertEqual} from '../util/assert';
|
|||||||
import {assertPreviousIsParent} from './assert';
|
import {assertPreviousIsParent} from './assert';
|
||||||
import {getNodeInjectable, locateDirectiveOrProvider} from './di';
|
import {getNodeInjectable, locateDirectiveOrProvider} from './di';
|
||||||
import {NG_ELEMENT_ID} from './fields';
|
import {NG_ELEMENT_ID} from './fields';
|
||||||
import {store, Δload} from './instructions/all';
|
import {store, ɵɵload} from './instructions/all';
|
||||||
import {storeCleanupWithContext} from './instructions/shared';
|
import {storeCleanupWithContext} from './instructions/shared';
|
||||||
import {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';
|
import {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';
|
||||||
import {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';
|
import {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';
|
||||||
@ -372,7 +372,7 @@ export function query<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔqueryRefresh(queryList: QueryList<any>): boolean {
|
export function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {
|
||||||
const queryListImpl = (queryList as any as QueryList_<any>);
|
const queryListImpl = (queryList as any as QueryList_<any>);
|
||||||
const creationMode = isCreationMode();
|
const creationMode = isCreationMode();
|
||||||
|
|
||||||
@ -394,10 +394,10 @@ export function ΔqueryRefresh(queryList: QueryList<any>): boolean {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔstaticViewQuery<T>(
|
export function ɵɵstaticViewQuery<T>(
|
||||||
// TODO(FW-486): "read" should be an AbstractType
|
// TODO(FW-486): "read" should be an AbstractType
|
||||||
predicate: Type<any>| string[], descend: boolean, read: any): void {
|
predicate: Type<any>| string[], descend: boolean, read: any): void {
|
||||||
const queryList = ΔviewQuery(predicate, descend, read) as QueryList_<T>;
|
const queryList = ɵɵviewQuery(predicate, descend, read) as QueryList_<T>;
|
||||||
const tView = getLView()[TVIEW];
|
const tView = getLView()[TVIEW];
|
||||||
queryList._static = true;
|
queryList._static = true;
|
||||||
if (!tView.staticViewQueries) {
|
if (!tView.staticViewQueries) {
|
||||||
@ -415,7 +415,7 @@ export function ΔstaticViewQuery<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔviewQuery<T>(
|
export function ɵɵviewQuery<T>(
|
||||||
// TODO(FW-486): "read" should be an AbstractType
|
// TODO(FW-486): "read" should be an AbstractType
|
||||||
predicate: Type<any>| string[], descend: boolean, read: any): QueryList<T> {
|
predicate: Type<any>| string[], descend: boolean, read: any): QueryList<T> {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
@ -435,10 +435,10 @@ export function ΔviewQuery<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔloadViewQuery<T>(): T {
|
export function ɵɵloadViewQuery<T>(): T {
|
||||||
const index = getCurrentQueryIndex();
|
const index = getCurrentQueryIndex();
|
||||||
setCurrentQueryIndex(index + 1);
|
setCurrentQueryIndex(index + 1);
|
||||||
return Δload<T>(index - HEADER_OFFSET);
|
return ɵɵload<T>(index - HEADER_OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -453,7 +453,7 @@ export function ΔloadViewQuery<T>(): T {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔcontentQuery<T>(
|
export function ɵɵcontentQuery<T>(
|
||||||
directiveIndex: number, predicate: Type<any>| string[], descend: boolean,
|
directiveIndex: number, predicate: Type<any>| string[], descend: boolean,
|
||||||
// TODO(FW-486): "read" should be an AbstractType
|
// TODO(FW-486): "read" should be an AbstractType
|
||||||
read: any): QueryList<T> {
|
read: any): QueryList<T> {
|
||||||
@ -484,11 +484,11 @@ export function ΔcontentQuery<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔstaticContentQuery<T>(
|
export function ɵɵstaticContentQuery<T>(
|
||||||
directiveIndex: number, predicate: Type<any>| string[], descend: boolean,
|
directiveIndex: number, predicate: Type<any>| string[], descend: boolean,
|
||||||
// TODO(FW-486): "read" should be an AbstractType
|
// TODO(FW-486): "read" should be an AbstractType
|
||||||
read: any): void {
|
read: any): void {
|
||||||
const queryList = ΔcontentQuery(directiveIndex, predicate, descend, read) as QueryList_<T>;
|
const queryList = ɵɵcontentQuery(directiveIndex, predicate, descend, read) as QueryList_<T>;
|
||||||
const tView = getLView()[TVIEW];
|
const tView = getLView()[TVIEW];
|
||||||
queryList._static = true;
|
queryList._static = true;
|
||||||
if (!tView.staticContentQueries) {
|
if (!tView.staticContentQueries) {
|
||||||
@ -500,7 +500,7 @@ export function ΔstaticContentQuery<T>(
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔloadContentQuery<T>(): QueryList<T> {
|
export function ɵɵloadContentQuery<T>(): QueryList<T> {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
ngDevMode &&
|
ngDevMode &&
|
||||||
assertDefined(
|
assertDefined(
|
||||||
|
@ -82,17 +82,17 @@ export function getBindingsEnabled(): boolean {
|
|||||||
* Should match component / directive.
|
* Should match component / directive.
|
||||||
* </my-comp>
|
* </my-comp>
|
||||||
* <div ngNonBindable>
|
* <div ngNonBindable>
|
||||||
* <!-- ΔdisableBindings() -->
|
* <!-- ɵɵdisableBindings() -->
|
||||||
* <my-comp my-directive>
|
* <my-comp my-directive>
|
||||||
* Should not match component / directive because we are in ngNonBindable.
|
* Should not match component / directive because we are in ngNonBindable.
|
||||||
* </my-comp>
|
* </my-comp>
|
||||||
* <!-- ΔenableBindings() -->
|
* <!-- ɵɵenableBindings() -->
|
||||||
* </div>
|
* </div>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔenableBindings(): void {
|
export function ɵɵenableBindings(): void {
|
||||||
bindingsEnabled = true;
|
bindingsEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,17 +105,17 @@ export function ΔenableBindings(): void {
|
|||||||
* Should match component / directive.
|
* Should match component / directive.
|
||||||
* </my-comp>
|
* </my-comp>
|
||||||
* <div ngNonBindable>
|
* <div ngNonBindable>
|
||||||
* <!-- ΔdisableBindings() -->
|
* <!-- ɵɵdisableBindings() -->
|
||||||
* <my-comp my-directive>
|
* <my-comp my-directive>
|
||||||
* Should not match component / directive because we are in ngNonBindable.
|
* Should not match component / directive because we are in ngNonBindable.
|
||||||
* </my-comp>
|
* </my-comp>
|
||||||
* <!-- ΔenableBindings() -->
|
* <!-- ɵɵenableBindings() -->
|
||||||
* </div>
|
* </div>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔdisableBindings(): void {
|
export function ɵɵdisableBindings(): void {
|
||||||
bindingsEnabled = false;
|
bindingsEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ export function getActiveDirectiveSuperClassDepth() {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔrestoreView(viewToRestore: OpaqueViewState) {
|
export function ɵɵrestoreView(viewToRestore: OpaqueViewState) {
|
||||||
contextLView = viewToRestore as any as LView;
|
contextLView = viewToRestore as any as LView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,7 +492,7 @@ let _currentNamespace: string|null = null;
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔnamespaceSVG() {
|
export function ɵɵnamespaceSVG() {
|
||||||
_currentNamespace = 'http://www.w3.org/2000/svg';
|
_currentNamespace = 'http://www.w3.org/2000/svg';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +501,7 @@ export function ΔnamespaceSVG() {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔnamespaceMathML() {
|
export function ɵɵnamespaceMathML() {
|
||||||
_currentNamespace = 'http://www.w3.org/1998/MathML/';
|
_currentNamespace = 'http://www.w3.org/1998/MathML/';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ export function ΔnamespaceMathML() {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔnamespaceHTML() {
|
export function ɵɵnamespaceHTML() {
|
||||||
_currentNamespace = null;
|
_currentNamespace = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ export const defaultScheduler =
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔresolveWindow(element: RElement & {ownerDocument: Document}) {
|
export function ɵɵresolveWindow(element: RElement & {ownerDocument: Document}) {
|
||||||
return {name: 'window', target: element.ownerDocument.defaultView};
|
return {name: 'window', target: element.ownerDocument.defaultView};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ export function ΔresolveWindow(element: RElement & {ownerDocument: Document}) {
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔresolveDocument(element: RElement & {ownerDocument: Document}) {
|
export function ɵɵresolveDocument(element: RElement & {ownerDocument: Document}) {
|
||||||
return {name: 'document', target: element.ownerDocument};
|
return {name: 'document', target: element.ownerDocument};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ export function ΔresolveDocument(element: RElement & {ownerDocument: Document})
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔresolveBody(element: RElement & {ownerDocument: Document}) {
|
export function ɵɵresolveBody(element: RElement & {ownerDocument: Document}) {
|
||||||
return {name: 'body', target: element.ownerDocument.body};
|
return {name: 'body', target: element.ownerDocument.body};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,6 @@ import {createTemplateRef} from './view_engine_compatibility';
|
|||||||
*
|
*
|
||||||
* @codeGenApi
|
* @codeGenApi
|
||||||
*/
|
*/
|
||||||
export function ΔtemplateRefExtractor(tNode: TNode, currentView: LView) {
|
export function ɵɵtemplateRefExtractor(tNode: TNode, currentView: LView) {
|
||||||
return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);
|
return createTemplateRef(ViewEngine_TemplateRef, ViewEngine_ElementRef, tNode, currentView);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ import {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔsanitizeHtml(unsafeHtml: any): string {
|
export function ɵɵsanitizeHtml(unsafeHtml: any): string {
|
||||||
const sanitizer = getSanitizer();
|
const sanitizer = getSanitizer();
|
||||||
if (sanitizer) {
|
if (sanitizer) {
|
||||||
return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';
|
return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';
|
||||||
@ -59,7 +59,7 @@ export function ΔsanitizeHtml(unsafeHtml: any): string {
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔsanitizeStyle(unsafeStyle: any): string {
|
export function ɵɵsanitizeStyle(unsafeStyle: any): string {
|
||||||
const sanitizer = getSanitizer();
|
const sanitizer = getSanitizer();
|
||||||
if (sanitizer) {
|
if (sanitizer) {
|
||||||
return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';
|
return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';
|
||||||
@ -86,7 +86,7 @@ export function ΔsanitizeStyle(unsafeStyle: any): string {
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔsanitizeUrl(unsafeUrl: any): string {
|
export function ɵɵsanitizeUrl(unsafeUrl: any): string {
|
||||||
const sanitizer = getSanitizer();
|
const sanitizer = getSanitizer();
|
||||||
if (sanitizer) {
|
if (sanitizer) {
|
||||||
return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';
|
return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';
|
||||||
@ -108,7 +108,7 @@ export function ΔsanitizeUrl(unsafeUrl: any): string {
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔsanitizeResourceUrl(unsafeResourceUrl: any): string {
|
export function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): string {
|
||||||
const sanitizer = getSanitizer();
|
const sanitizer = getSanitizer();
|
||||||
if (sanitizer) {
|
if (sanitizer) {
|
||||||
return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';
|
return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';
|
||||||
@ -131,7 +131,7 @@ export function ΔsanitizeResourceUrl(unsafeResourceUrl: any): string {
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔsanitizeScript(unsafeScript: any): string {
|
export function ɵɵsanitizeScript(unsafeScript: any): string {
|
||||||
const sanitizer = getSanitizer();
|
const sanitizer = getSanitizer();
|
||||||
if (sanitizer) {
|
if (sanitizer) {
|
||||||
return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';
|
return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';
|
||||||
@ -153,9 +153,9 @@ export function getUrlSanitizer(tag: string, prop: string) {
|
|||||||
if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' ||
|
if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' ||
|
||||||
tag === 'media' || tag === 'script')) ||
|
tag === 'media' || tag === 'script')) ||
|
||||||
(prop === 'href' && (tag === 'base' || tag === 'link'))) {
|
(prop === 'href' && (tag === 'base' || tag === 'link'))) {
|
||||||
return ΔsanitizeResourceUrl;
|
return ɵɵsanitizeResourceUrl;
|
||||||
}
|
}
|
||||||
return ΔsanitizeUrl;
|
return ɵɵsanitizeUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,7 +173,7 @@ export function getUrlSanitizer(tag: string, prop: string) {
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ΔsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {
|
export function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {
|
||||||
return getUrlSanitizer(tag, prop)(unsafeUrl);
|
return getUrlSanitizer(tag, prop)(unsafeUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,13 +183,13 @@ export function ΔsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: st
|
|||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export const ΔdefaultStyleSanitizer = (function(prop: string, value?: string): string | boolean {
|
export const ɵɵdefaultStyleSanitizer = (function(prop: string, value?: string): string | boolean {
|
||||||
if (value === undefined) {
|
if (value === undefined) {
|
||||||
return prop === 'background-image' || prop === 'background' || prop === 'border-image' ||
|
return prop === 'background-image' || prop === 'background' || prop === 'border-image' ||
|
||||||
prop === 'filter' || prop === 'list-style' || prop === 'list-style-image';
|
prop === 'filter' || prop === 'list-style' || prop === 'list-style-image';
|
||||||
}
|
}
|
||||||
|
|
||||||
return ΔsanitizeStyle(value);
|
return ɵɵsanitizeStyle(value);
|
||||||
} as StyleSanitizeFn);
|
} as StyleSanitizeFn);
|
||||||
|
|
||||||
export function validateAgainstEventProperties(name: string) {
|
export function validateAgainstEventProperties(name: string) {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import {resolveForwardRef} from '../di/forward_ref';
|
import {resolveForwardRef} from '../di/forward_ref';
|
||||||
import {INJECTOR, Injector} from '../di/injector';
|
import {INJECTOR, Injector} from '../di/injector';
|
||||||
import {setCurrentInjector} from '../di/injector_compatibility';
|
import {setCurrentInjector} from '../di/injector_compatibility';
|
||||||
import {getInjectableDef, ΔInjectableDef} from '../di/interface/defs';
|
import {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';
|
||||||
import {APP_ROOT} from '../di/scope';
|
import {APP_ROOT} from '../di/scope';
|
||||||
import {NgModuleRef} from '../linker/ng_module_factory';
|
import {NgModuleRef} from '../linker/ng_module_factory';
|
||||||
import {stringify} from '../util/stringify';
|
import {stringify} from '../util/stringify';
|
||||||
@ -98,7 +98,7 @@ export function resolveNgModuleDep(
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
const providerDef = data._def.providersByKey[tokenKey];
|
const providerDef = data._def.providersByKey[tokenKey];
|
||||||
let injectableDef: ΔInjectableDef<any>|null;
|
let injectableDef: ɵɵInjectableDef<any>|null;
|
||||||
if (providerDef) {
|
if (providerDef) {
|
||||||
let providerInstance = data._providers[providerDef.index];
|
let providerInstance = data._providers[providerDef.index];
|
||||||
if (providerInstance === undefined) {
|
if (providerInstance === undefined) {
|
||||||
@ -132,7 +132,7 @@ function moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean
|
|||||||
return ngModule._def.modules.indexOf(scope) > -1;
|
return ngModule._def.modules.indexOf(scope) > -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function targetsModule(ngModule: NgModuleData, def: ΔInjectableDef<any>): boolean {
|
function targetsModule(ngModule: NgModuleData, def: ɵɵInjectableDef<any>): boolean {
|
||||||
return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||
|
return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||
|
||||||
def.providedIn === 'root' && ngModule._def.isRoot);
|
def.providedIn === 'root' && ngModule._def.isRoot);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import {DebugElement__PRE_R3__, DebugNode__PRE_R3__, EventListener, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';
|
import {DebugElement__PRE_R3__, DebugNode__PRE_R3__, EventListener, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';
|
||||||
import {Injector} from '../di';
|
import {Injector} from '../di';
|
||||||
import {InjectableType} from '../di/injectable';
|
import {InjectableType} from '../di/injectable';
|
||||||
import {getInjectableDef, ΔInjectableDef} from '../di/interface/defs';
|
import {getInjectableDef, ɵɵInjectableDef} from '../di/interface/defs';
|
||||||
import {ErrorHandler} from '../error_handler';
|
import {ErrorHandler} from '../error_handler';
|
||||||
import {Type} from '../interface/type';
|
import {Type} from '../interface/type';
|
||||||
import {ComponentFactory} from '../linker/component_factory';
|
import {ComponentFactory} from '../linker/component_factory';
|
||||||
@ -170,7 +170,7 @@ const viewDefOverrides = new Map<any, ViewDefinition>();
|
|||||||
|
|
||||||
function debugOverrideProvider(override: ProviderOverride) {
|
function debugOverrideProvider(override: ProviderOverride) {
|
||||||
providerOverrides.set(override.token, override);
|
providerOverrides.set(override.token, override);
|
||||||
let injectableDef: ΔInjectableDef<any>|null;
|
let injectableDef: ɵɵInjectableDef<any>|null;
|
||||||
if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&
|
if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&
|
||||||
typeof injectableDef.providedIn === 'function') {
|
typeof injectableDef.providedIn === 'function') {
|
||||||
providerOverridesWithScope.set(override.token as InjectableType<any>, override);
|
providerOverridesWithScope.set(override.token as InjectableType<any>, override);
|
||||||
|
@ -675,30 +675,30 @@
|
|||||||
"name": "viewAttachedToChangeDetector"
|
"name": "viewAttachedToChangeDetector"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineComponent"
|
"name": "ɵɵdefineComponent"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineInjector"
|
"name": "ɵɵdefineInjector"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineNgModule"
|
"name": "ɵɵdefineNgModule"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δelement"
|
"name": "ɵɵelement"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementEnd"
|
"name": "ɵɵelementEnd"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementStart"
|
"name": "ɵɵelementStart"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔnamespaceHTML"
|
"name": "ɵɵnamespaceHTML"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔsetComponentScope"
|
"name": "ɵɵsetComponentScope"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δtext"
|
"name": "ɵɵtext"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -486,12 +486,12 @@
|
|||||||
"name": "viewAttachedToChangeDetector"
|
"name": "viewAttachedToChangeDetector"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineComponent"
|
"name": "ɵɵdefineComponent"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔnamespaceHTML"
|
"name": "ɵɵnamespaceHTML"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δtext"
|
"name": "ɵɵtext"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -228,12 +228,12 @@
|
|||||||
"name": "tryResolveToken"
|
"name": "tryResolveToken"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineInjectable"
|
"name": "ɵɵdefineInjectable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineInjector"
|
"name": "ɵɵdefineInjector"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δinject"
|
"name": "ɵɵinject"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -6,17 +6,17 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Injector, ɵcreateInjector as createInjector, ΔdefineInjectable, ΔdefineInjector} from '@angular/core';
|
import {Injector, ɵcreateInjector as createInjector, ɵɵdefineInjectable, ɵɵdefineInjector} from '@angular/core';
|
||||||
|
|
||||||
export class RootService {
|
export class RootService {
|
||||||
static ngInjectableDef = ΔdefineInjectable({
|
static ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
factory: () => new RootService(),
|
factory: () => new RootService(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ScopedService {
|
export class ScopedService {
|
||||||
static ngInjectableDef = ΔdefineInjectable({
|
static ngInjectableDef = ɵɵdefineInjectable({
|
||||||
providedIn: null,
|
providedIn: null,
|
||||||
factory: () => new ScopedService(),
|
factory: () => new ScopedService(),
|
||||||
});
|
});
|
||||||
@ -28,7 +28,7 @@ export class ScopedService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class DefinedInjector {
|
export class DefinedInjector {
|
||||||
static ngInjectorDef = ΔdefineInjector({
|
static ngInjectorDef = ɵɵdefineInjector({
|
||||||
factory: () => new DefinedInjector(),
|
factory: () => new DefinedInjector(),
|
||||||
providers: [ScopedService],
|
providers: [ScopedService],
|
||||||
});
|
});
|
||||||
|
@ -1305,69 +1305,69 @@
|
|||||||
"name": "wrapListener"
|
"name": "wrapListener"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δbind"
|
"name": "ɵɵbind"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineComponent"
|
"name": "ɵɵdefineComponent"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineDirective"
|
"name": "ɵɵdefineDirective"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdefineInjectable"
|
"name": "ɵɵdefineInjectable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔdirectiveInject"
|
"name": "ɵɵdirectiveInject"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementClassProp"
|
"name": "ɵɵelementClassProp"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementEnd"
|
"name": "ɵɵelementEnd"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementProperty"
|
"name": "ɵɵelementProperty"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementStart"
|
"name": "ɵɵelementStart"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementStyling"
|
"name": "ɵɵelementStyling"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔelementStylingApply"
|
"name": "ɵɵelementStylingApply"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔgetCurrentView"
|
"name": "ɵɵgetCurrentView"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δinterpolation1"
|
"name": "ɵɵinterpolation1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δlistener"
|
"name": "ɵɵlistener"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔnamespaceHTML"
|
"name": "ɵɵnamespaceHTML"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔnextContext"
|
"name": "ɵɵnextContext"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δreference"
|
"name": "ɵɵreference"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔrestoreView"
|
"name": "ɵɵrestoreView"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δselect"
|
"name": "ɵɵselect"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δtemplate"
|
"name": "ɵɵtemplate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Δtext"
|
"name": "ɵɵtext"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ΔtextBinding"
|
"name": "ɵɵtextBinding"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -16,7 +16,7 @@ import '@angular/core/test/bundling/util/src/reflect_metadata';
|
|||||||
*/
|
*/
|
||||||
import './translations';
|
import './translations';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {Component, Injectable, NgModule, ViewEncapsulation, ɵmarkDirty as markDirty, ɵrenderComponent as renderComponent, Δi18nLocalize as localize} from '@angular/core';
|
import {Component, Injectable, NgModule, ViewEncapsulation, ɵmarkDirty as markDirty, ɵrenderComponent as renderComponent, ɵɵi18nLocalize as localize} from '@angular/core';
|
||||||
|
|
||||||
class Todo {
|
class Todo {
|
||||||
editing: boolean;
|
editing: boolean;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user