style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975)
PR Close #22975
This commit is contained in:
parent
f739f756ce
commit
de90314304
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -356,7 +356,7 @@ If that is the case, you should be able to track the old value directly by savin
|
||||||
* **common:** don't convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([8b14488](https://github.com/angular/angular/commit/8b14488)), closes [#20744](https://github.com/angular/angular/issues/20744)
|
* **common:** don't convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([8b14488](https://github.com/angular/angular/commit/8b14488)), closes [#20744](https://github.com/angular/angular/issues/20744)
|
||||||
* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#20640](https://github.com/angular/angular/issues/20640)) ([f791e9f](https://github.com/angular/angular/commit/f791e9f))
|
* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#20640](https://github.com/angular/angular/issues/20640)) ([f791e9f](https://github.com/angular/angular/commit/f791e9f))
|
||||||
* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([e81606c](https://github.com/angular/angular/commit/e81606c)), closes [#21999](https://github.com/angular/angular/issues/21999)
|
* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([e81606c](https://github.com/angular/angular/commit/e81606c)), closes [#21999](https://github.com/angular/angular/issues/21999)
|
||||||
* **core:** should check Zone existance when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([3a86940](https://github.com/angular/angular/commit/3a86940))
|
* **core:** should check Zone existence when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([3a86940](https://github.com/angular/angular/commit/3a86940))
|
||||||
* **forms:** publish missing types ([#19941](https://github.com/angular/angular/issues/19941)) ([2707012](https://github.com/angular/angular/commit/2707012))
|
* **forms:** publish missing types ([#19941](https://github.com/angular/angular/issues/19941)) ([2707012](https://github.com/angular/angular/commit/2707012))
|
||||||
* **ivy:** generate correct interpolations ([#21946](https://github.com/angular/angular/issues/21946)) ([3cc1d76](https://github.com/angular/angular/commit/3cc1d76))
|
* **ivy:** generate correct interpolations ([#21946](https://github.com/angular/angular/issues/21946)) ([3cc1d76](https://github.com/angular/angular/commit/3cc1d76))
|
||||||
* **ivy:** generate lifecycle pattern ([#21865](https://github.com/angular/angular/issues/21865)) ([f816666](https://github.com/angular/angular/commit/f816666))
|
* **ivy:** generate lifecycle pattern ([#21865](https://github.com/angular/angular/issues/21865)) ([f816666](https://github.com/angular/angular/commit/f816666))
|
||||||
|
@ -387,7 +387,7 @@ If that is the case, you should be able to track the old value directly by savin
|
||||||
* **common:** don't convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([c4fb696](https://github.com/angular/angular/commit/c4fb696)), closes [#20744](https://github.com/angular/angular/issues/20744)
|
* **common:** don't convert null to a string when flushing a mock request ([#21417](https://github.com/angular/angular/issues/21417)) ([c4fb696](https://github.com/angular/angular/commit/c4fb696)), closes [#20744](https://github.com/angular/angular/issues/20744)
|
||||||
* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#22007](https://github.com/angular/angular/issues/22007)) ([ce51ea9](https://github.com/angular/angular/commit/ce51ea9))
|
* **core:** fix [#20582](https://github.com/angular/angular/issues/20582), don't need to wrap zone in location change listener ([#22007](https://github.com/angular/angular/issues/22007)) ([ce51ea9](https://github.com/angular/angular/commit/ce51ea9))
|
||||||
* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([c6645e7](https://github.com/angular/angular/commit/c6645e7)), closes [#21999](https://github.com/angular/angular/issues/21999)
|
* **core:** fix proper propagation of subscriptions in EventEmitter ([#22016](https://github.com/angular/angular/issues/22016)) ([c6645e7](https://github.com/angular/angular/commit/c6645e7)), closes [#21999](https://github.com/angular/angular/issues/21999)
|
||||||
* **core:** should check Zone existance when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([aa9ba7f](https://github.com/angular/angular/commit/aa9ba7f))
|
* **core:** should check Zone existence when scheduleMicroTask ([#20656](https://github.com/angular/angular/issues/20656)) ([aa9ba7f](https://github.com/angular/angular/commit/aa9ba7f))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1808,7 +1808,7 @@ From 4.0.0 @angular/core uses a [`WeakMap`](https://github.com/angular/angular/c
|
||||||
* **compiler:** make sourcemaps work in AOT mode ([492153a](https://github.com/angular/angular/commit/492153a))
|
* **compiler:** make sourcemaps work in AOT mode ([492153a](https://github.com/angular/angular/commit/492153a))
|
||||||
* **compiler:** only warn for `[@Injectable](https://github.com/Injectable)` classes with invalid args. ([5c34066](https://github.com/angular/angular/commit/5c34066)), closes [#15003](https://github.com/angular/angular/issues/15003)
|
* **compiler:** only warn for `[@Injectable](https://github.com/Injectable)` classes with invalid args. ([5c34066](https://github.com/angular/angular/commit/5c34066)), closes [#15003](https://github.com/angular/angular/issues/15003)
|
||||||
* **compiler:** shouldn't throw when Symbol is used as DI token ([#13701](https://github.com/angular/angular/issues/13701)) ([8b5c6b2](https://github.com/angular/angular/commit/8b5c6b2)), closes [#13314](https://github.com/angular/angular/issues/13314)
|
* **compiler:** shouldn't throw when Symbol is used as DI token ([#13701](https://github.com/angular/angular/issues/13701)) ([8b5c6b2](https://github.com/angular/angular/commit/8b5c6b2)), closes [#13314](https://github.com/angular/angular/issues/13314)
|
||||||
* **compiler:** support interface types in injectable constuctors ([#14894](https://github.com/angular/angular/issues/14894)) ([b00fe20](https://github.com/angular/angular/commit/b00fe20)), closes [#12631](https://github.com/angular/angular/issues/12631)
|
* **compiler:** support interface types in injectable constructors ([#14894](https://github.com/angular/angular/issues/14894)) ([b00fe20](https://github.com/angular/angular/commit/b00fe20)), closes [#12631](https://github.com/angular/angular/issues/12631)
|
||||||
* **compiler:** warning prints "WARNING" instead of "ERROR" ([#15125](https://github.com/angular/angular/issues/15125)) ([3b1956b](https://github.com/angular/angular/commit/3b1956b))
|
* **compiler:** warning prints "WARNING" instead of "ERROR" ([#15125](https://github.com/angular/angular/issues/15125)) ([3b1956b](https://github.com/angular/angular/commit/3b1956b))
|
||||||
* **core:** don’t recreate `TemplateRef` when used as a reference. ([#15066](https://github.com/angular/angular/issues/15066)) ([df914ef](https://github.com/angular/angular/commit/df914ef)), closes [#14873](https://github.com/angular/angular/issues/14873)
|
* **core:** don’t recreate `TemplateRef` when used as a reference. ([#15066](https://github.com/angular/angular/issues/15066)) ([df914ef](https://github.com/angular/angular/commit/df914ef)), closes [#14873](https://github.com/angular/angular/issues/14873)
|
||||||
* **core:** don’t throw if queries change during change detection. ([06fc42b](https://github.com/angular/angular/commit/06fc42b)), closes [#14925](https://github.com/angular/angular/issues/14925)
|
* **core:** don’t throw if queries change during change detection. ([06fc42b](https://github.com/angular/angular/commit/06fc42b)), closes [#14925](https://github.com/angular/angular/issues/14925)
|
||||||
|
@ -1848,7 +1848,7 @@ From 4.0.0 @angular/core uses a [`WeakMap`](https://github.com/angular/angular/c
|
||||||
|
|
||||||
### BREAKING CHANGES
|
### BREAKING CHANGES
|
||||||
|
|
||||||
* Perviously, any provider that had an ngOnDestroy lifecycle hook would be created eagerly.
|
* Previously, any provider that had an ngOnDestroy lifecycle hook would be created eagerly.
|
||||||
|
|
||||||
Now, only classes that are annotated with @Component, @Directive, @Pipe, @NgModule are eager. Providers only become eager if they are either directly or transitively injected into one of the above.
|
Now, only classes that are annotated with @Component, @Directive, @Pipe, @NgModule are eager. Providers only become eager if they are either directly or transitively injected into one of the above.
|
||||||
|
|
||||||
|
@ -2116,7 +2116,7 @@ Note: the 4.0.0-rc.0 release on npm accidentally omitted one bug fix, so we cut
|
||||||
* **compiler:** improve error message for unknown elements ([#14373](https://github.com/angular/angular/issues/14373)) ([2c6dab9](https://github.com/angular/angular/commit/2c6dab9))
|
* **compiler:** improve error message for unknown elements ([#14373](https://github.com/angular/angular/issues/14373)) ([2c6dab9](https://github.com/angular/angular/commit/2c6dab9))
|
||||||
* **compiler:** improve error messages in aot compiler ([#14333](https://github.com/angular/angular/issues/14333)) ([a696f4a](https://github.com/angular/angular/commit/a696f4a))
|
* **compiler:** improve error messages in aot compiler ([#14333](https://github.com/angular/angular/issues/14333)) ([a696f4a](https://github.com/angular/angular/commit/a696f4a))
|
||||||
* **compiler:** improve error msg for unknown properties on ([#14373](https://github.com/angular/angular/issues/14373)) ([e5a144d](https://github.com/angular/angular/commit/e5a144d)), closes [#14070](https://github.com/angular/angular/issues/14070)
|
* **compiler:** improve error msg for unknown properties on ([#14373](https://github.com/angular/angular/issues/14373)) ([e5a144d](https://github.com/angular/angular/commit/e5a144d)), closes [#14070](https://github.com/angular/angular/issues/14070)
|
||||||
* **core:** Remove ChangeDetectorRef Paramter from KeyValueDifferFactory and IterableDifferFactory ([#14311](https://github.com/angular/angular/issues/14311)) ([45cc444](https://github.com/angular/angular/commit/45cc444))
|
* **core:** Remove ChangeDetectorRef Parameter from KeyValueDifferFactory and IterableDifferFactory ([#14311](https://github.com/angular/angular/issues/14311)) ([45cc444](https://github.com/angular/angular/commit/45cc444))
|
||||||
* **core:** suppress a Closure Compiler warning ([#14484](https://github.com/angular/angular/issues/14484)) ([2f2b65b](https://github.com/angular/angular/commit/2f2b65b))
|
* **core:** suppress a Closure Compiler warning ([#14484](https://github.com/angular/angular/issues/14484)) ([2f2b65b](https://github.com/angular/angular/commit/2f2b65b))
|
||||||
* **forms:** getRawValue should correctly work with nested FormGroups/Arrays ([#12964](https://github.com/angular/angular/issues/12964)) ([1ece736](https://github.com/angular/angular/commit/1ece736)), closes [#12963](https://github.com/angular/angular/issues/12963)
|
* **forms:** getRawValue should correctly work with nested FormGroups/Arrays ([#12964](https://github.com/angular/angular/issues/12964)) ([1ece736](https://github.com/angular/angular/commit/1ece736)), closes [#12963](https://github.com/angular/angular/issues/12963)
|
||||||
* **http:** REVERT: remove dots from jsonp callback name ([#13219](https://github.com/angular/angular/issues/13219)) ([4676df5](https://github.com/angular/angular/commit/4676df5))
|
* **http:** REVERT: remove dots from jsonp callback name ([#13219](https://github.com/angular/angular/issues/13219)) ([4676df5](https://github.com/angular/angular/commit/4676df5))
|
||||||
|
@ -2301,7 +2301,7 @@ returned value being an array.
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* **common:** add PopStateEvent interface ([#13400](https://github.com/angular/angular/issues/13400)) ([71567d1](https://github.com/angular/angular/commit/71567d1)), closes [#13378](https://github.com/angular/angular/issues/13378)
|
* **common:** add PopStateEvent interface ([#13400](https://github.com/angular/angular/issues/13400)) ([71567d1](https://github.com/angular/angular/commit/71567d1)), closes [#13378](https://github.com/angular/angular/issues/13378)
|
||||||
* **common:** DatePipe does't throw for NaN ([#14117](https://github.com/angular/angular/issues/14117)) ([32cc675](https://github.com/angular/angular/commit/32cc675)), closes [#14103](https://github.com/angular/angular/issues/14103)
|
* **common:** DatePipe doesn't throw for NaN ([#14117](https://github.com/angular/angular/issues/14117)) ([32cc675](https://github.com/angular/angular/commit/32cc675)), closes [#14103](https://github.com/angular/angular/issues/14103)
|
||||||
* **common:** DatePipe parses input string if it's not a valid date in browser ([#13895](https://github.com/angular/angular/issues/13895)) ([e641636](https://github.com/angular/angular/commit/e641636)), closes [#12334](https://github.com/angular/angular/issues/12334) [#13874](https://github.com/angular/angular/issues/13874)
|
* **common:** DatePipe parses input string if it's not a valid date in browser ([#13895](https://github.com/angular/angular/issues/13895)) ([e641636](https://github.com/angular/angular/commit/e641636)), closes [#12334](https://github.com/angular/angular/issues/12334) [#13874](https://github.com/angular/angular/issues/13874)
|
||||||
* **common:** introduce isObservable method ([#14067](https://github.com/angular/angular/issues/14067)) ([109f0d1](https://github.com/angular/angular/commit/109f0d1)), closes [#8848](https://github.com/angular/angular/issues/8848)
|
* **common:** introduce isObservable method ([#14067](https://github.com/angular/angular/issues/14067)) ([109f0d1](https://github.com/angular/angular/commit/109f0d1)), closes [#8848](https://github.com/angular/angular/issues/8848)
|
||||||
* **compiler:** allow empty translations for attributes ([#14085](https://github.com/angular/angular/issues/14085)) ([f3d5506](https://github.com/angular/angular/commit/f3d5506)), closes [#13897](https://github.com/angular/angular/issues/13897)
|
* **compiler:** allow empty translations for attributes ([#14085](https://github.com/angular/angular/issues/14085)) ([f3d5506](https://github.com/angular/angular/commit/f3d5506)), closes [#13897](https://github.com/angular/angular/issues/13897)
|
||||||
|
@ -2719,7 +2719,7 @@ We are adding more tests to our test suite to catch these kinds of problems befo
|
||||||
* **common:** make sure the plural category exists ([#13169](https://github.com/angular/angular/issues/13169)) ([82c81cd](https://github.com/angular/angular/commit/82c81cd)), closes [#12379](https://github.com/angular/angular/issues/12379)
|
* **common:** make sure the plural category exists ([#13169](https://github.com/angular/angular/issues/13169)) ([82c81cd](https://github.com/angular/angular/commit/82c81cd)), closes [#12379](https://github.com/angular/angular/issues/12379)
|
||||||
* **compiler:** include the summaries of reexported modules / directives / pipes ([#13196](https://github.com/angular/angular/issues/13196)) ([75d1617](https://github.com/angular/angular/commit/75d1617))
|
* **compiler:** include the summaries of reexported modules / directives / pipes ([#13196](https://github.com/angular/angular/issues/13196)) ([75d1617](https://github.com/angular/angular/commit/75d1617))
|
||||||
* **compiler:** serialize any `StaticSymbol` correctly, not matter in which context ([5614c4f](https://github.com/angular/angular/commit/5614c4f))
|
* **compiler:** serialize any `StaticSymbol` correctly, not matter in which context ([5614c4f](https://github.com/angular/angular/commit/5614c4f))
|
||||||
* **compiler:** short-circut expressions with an index ([#13263](https://github.com/angular/angular/issues/13263)) ([f31c947](https://github.com/angular/angular/commit/f31c947)), closes [#13254](https://github.com/angular/angular/issues/13254)
|
* **compiler:** short-circuit expressions with an index ([#13263](https://github.com/angular/angular/issues/13263)) ([f31c947](https://github.com/angular/angular/commit/f31c947)), closes [#13254](https://github.com/angular/angular/issues/13254)
|
||||||
* **core:** display framework version on bootstrapped component ([#13252](https://github.com/angular/angular/issues/13252)) ([16efb13](https://github.com/angular/angular/commit/16efb13))
|
* **core:** display framework version on bootstrapped component ([#13252](https://github.com/angular/angular/issues/13252)) ([16efb13](https://github.com/angular/angular/commit/16efb13))
|
||||||
* **facade:** cache original format string ([#12764](https://github.com/angular/angular/issues/12764)) ([a132287](https://github.com/angular/angular/commit/a132287))
|
* **facade:** cache original format string ([#12764](https://github.com/angular/angular/issues/12764)) ([a132287](https://github.com/angular/angular/commit/a132287))
|
||||||
* **http:** set the default Accept header ([#12989](https://github.com/angular/angular/issues/12989)) ([986abbe](https://github.com/angular/angular/commit/986abbe)), closes [#6354](https://github.com/angular/angular/issues/6354)
|
* **http:** set the default Accept header ([#12989](https://github.com/angular/angular/issues/12989)) ([986abbe](https://github.com/angular/angular/commit/986abbe)), closes [#6354](https://github.com/angular/angular/issues/6354)
|
||||||
|
|
|
@ -74,7 +74,7 @@ sudo docker run \
|
||||||
## Example
|
## Example
|
||||||
The following command would start a docker container based on the previously created `foobar-builds`
|
The following command would start a docker container based on the previously created `foobar-builds`
|
||||||
docker image, alias it as 'foobar-builds-1' and map predefined directories on the host VM to be used
|
docker image, alias it as 'foobar-builds-1' and map predefined directories on the host VM to be used
|
||||||
by the container for accesing secrets and SSL certificates and keeping the build artifacts and logs.
|
by the container for accessing secrets and SSL certificates and keeping the build artifacts and logs.
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo docker run \
|
sudo docker run \
|
||||||
|
|
|
@ -188,7 +188,7 @@ This option should be set to `false` when using factory summaries.
|
||||||
|
|
||||||
### *fullTemplateTypeCheck*
|
### *fullTemplateTypeCheck*
|
||||||
|
|
||||||
This option tells the compiler to enable the [binding expression validation](#binding-expresion-validation)
|
This option tells the compiler to enable the [binding expression validation](#binding-expression-validation)
|
||||||
phase of the template compiler which uses TypeScript to validate binding expressions.
|
phase of the template compiler which uses TypeScript to validate binding expressions.
|
||||||
|
|
||||||
This option is `false` by default.
|
This option is `false` by default.
|
||||||
|
@ -379,7 +379,7 @@ export function serverFactory() {
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Beginning in version 5, the compiler automatically performs this rewritting while emitting the `.js` file.
|
Beginning in version 5, the compiler automatically performs this rewriting while emitting the `.js` file.
|
||||||
|
|
||||||
{@a function-calls}
|
{@a function-calls}
|
||||||
### Limited function calls
|
### Limited function calls
|
||||||
|
@ -647,7 +647,7 @@ The following are metadata errors you may encounter, with explanations and sugge
|
||||||
|
|
||||||
<h3 class="no-toc">Expression form not supported</h3>
|
<h3 class="no-toc">Expression form not supported</h3>
|
||||||
|
|
||||||
The compiler encountered an expression it didn't understand while evalutating Angular metadata.
|
The compiler encountered an expression it didn't understand while evaluating Angular metadata.
|
||||||
|
|
||||||
Language features outside of the compiler's [restricted expression syntax](#expression-syntax)
|
Language features outside of the compiler's [restricted expression syntax](#expression-syntax)
|
||||||
can produce this error, as seen in the following example:
|
can produce this error, as seen in the following example:
|
||||||
|
@ -1133,12 +1133,12 @@ This error can occur if you use an expression in the `extends` clause of a class
|
||||||
Chuck: After reviewing your PR comment I'm still at a loss. See [comment there](https://github.com/angular/angular/pull/17712#discussion_r132025495).
|
Chuck: After reviewing your PR comment I'm still at a loss. See [comment there](https://github.com/angular/angular/pull/17712#discussion_r132025495).
|
||||||
|
|
||||||
-->
|
-->
|
||||||
{@a binding-expresion-validation}
|
{@a binding-expression-validation}
|
||||||
|
|
||||||
## Phase 3: binding expression validation
|
## Phase 3: binding expression validation
|
||||||
|
|
||||||
In the validation phase, the Angular template compiler uses the TypeScript compiler to validate the
|
In the validation phase, the Angular template compiler uses the TypeScript compiler to validate the
|
||||||
binding expressions in templates. Enable this phase explicity by adding the compiler
|
binding expressions in templates. Enable this phase explicitly by adding the compiler
|
||||||
option `"fullTemplateTypeCheck"` in the `"angularCompilerOptions"` of the project's `tsconfig.json` (see
|
option `"fullTemplateTypeCheck"` in the `"angularCompilerOptions"` of the project's `tsconfig.json` (see
|
||||||
[Angular Compiler Options](#compiler-options)).
|
[Angular Compiler Options](#compiler-options)).
|
||||||
|
|
||||||
|
@ -1168,7 +1168,7 @@ Chuck: After reviewing your PR comment I'm still at a loss. See [comment there](
|
||||||
generated by the template compiler that holds contents of the `MyComponent` class template.
|
generated by the template compiler that holds contents of the `MyComponent` class template.
|
||||||
Compiler never writes this file to disk. The line and column numbers are relative to the template string
|
Compiler never writes this file to disk. The line and column numbers are relative to the template string
|
||||||
in the `@Component` annotation of the class, `MyComponent` in this case. If a component uses
|
in the `@Component` annotation of the class, `MyComponent` in this case. If a component uses
|
||||||
`templateUrl` instead of `template`, the errors are reported in the HTML file refereneced by the
|
`templateUrl` instead of `template`, the errors are reported in the HTML file referenced by the
|
||||||
`templateUrl` instead of a synthetic file.
|
`templateUrl` instead of a synthetic file.
|
||||||
|
|
||||||
The error location is the beginning of the text node that contains the interpolation expression with
|
The error location is the beginning of the text node that contains the interpolation expression with
|
||||||
|
|
|
@ -220,7 +220,7 @@ Suppose you configured the root injector (marked as A) with _generic_ providers
|
||||||
You create a car component (A) that displays a car constructed from these three generic services.
|
You create a car component (A) that displays a car constructed from these three generic services.
|
||||||
|
|
||||||
Then you create a child component (B) that defines its own, _specialized_ providers for `CarService` and `EngineService`
|
Then you create a child component (B) that defines its own, _specialized_ providers for `CarService` and `EngineService`
|
||||||
that have special capabilites suitable for whatever is going on in component (B).
|
that have special capabilities suitable for whatever is going on in component (B).
|
||||||
|
|
||||||
Component (B) is the parent of another component (C) that defines its own, even _more specialized_ provider for `CarService`.
|
Component (B) is the parent of another component (C) that defines its own, even _more specialized_ provider for `CarService`.
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ Alternatively, the `subscribe()` method can accept callback function definitions
|
||||||
|
|
||||||
In either case, a `next` handler is required. The `error` and `complete` handlers are optional.
|
In either case, a `next` handler is required. The `error` and `complete` handlers are optional.
|
||||||
|
|
||||||
Note that a `next()` function could receive, for instance, message strings, or event objects, numeric values, or stuctures, depending on context. As a general term, we refer to data published by an observable as a *stream*. Any type of value can be represented with an observable, and the values are published as a stream.
|
Note that a `next()` function could receive, for instance, message strings, or event objects, numeric values, or structures, depending on context. As a general term, we refer to data published by an observable as a *stream*. Any type of value can be represented with an observable, and the values are published as a stream.
|
||||||
|
|
||||||
## Creating observables
|
## Creating observables
|
||||||
|
|
||||||
|
|
|
@ -507,7 +507,7 @@ These files go in the root folder next to `src/`.
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
Git configuration to make sure autogenerated files are not commited to source control.
|
Git configuration to make sure autogenerated files are not committed to source control.
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -97,7 +97,7 @@ using an example application.
|
||||||
|
|
||||||
### Serving with `http-server`
|
### Serving with `http-server`
|
||||||
|
|
||||||
Because `ng serve` does not work with service workers, you must use a seperate HTTP server to test your project locally. You can use any HTTP server. The example below uses the [http-server](https://www.npmjs.com/package/http-server) package from npm. To reduce the possibility of conflicts, test on a dedicated port.
|
Because `ng serve` does not work with service workers, you must use a separate HTTP server to test your project locally. You can use any HTTP server. The example below uses the [http-server](https://www.npmjs.com/package/http-server) package from npm. To reduce the possibility of conflicts, test on a dedicated port.
|
||||||
|
|
||||||
To serve with `http-server`, change to the directory containing your web files and start the web server:
|
To serve with `http-server`, change to the directory containing your web files and start the web server:
|
||||||
|
|
||||||
|
|
|
@ -2365,7 +2365,7 @@ Focus on the `overrideComponent` method.
|
||||||
<code-example path="testing/src/app/hero/hero-detail.component.spec.ts" region="override-component-method" title="app/hero/hero-detail.component.spec.ts (overrideComponent)" linenums="false"></code-example>
|
<code-example path="testing/src/app/hero/hero-detail.component.spec.ts" region="override-component-method" title="app/hero/hero-detail.component.spec.ts (overrideComponent)" linenums="false"></code-example>
|
||||||
|
|
||||||
It takes two arguments: the component type to override (`HeroDetailComponent`) and an override metadata object.
|
It takes two arguments: the component type to override (`HeroDetailComponent`) and an override metadata object.
|
||||||
The [overide metadata object](#metadata-override-object) is a generic defined as follows:
|
The [override metadata object](#metadata-override-object) is a generic defined as follows:
|
||||||
|
|
||||||
<code-example format="." language="javascript">
|
<code-example format="." language="javascript">
|
||||||
type MetadataOverride<T> = {
|
type MetadataOverride<T> = {
|
||||||
|
|
|
@ -76,7 +76,7 @@ describe('CodeComponent', () => {
|
||||||
hostComponent.setCode(oneLineCode);
|
hostComponent.setCode(oneLineCode);
|
||||||
await untilCodeFormatted();
|
await untilCodeFormatted();
|
||||||
|
|
||||||
// 'pln' spans are a tell-tale for syntax highlighing
|
// 'pln' spans are a tell-tale for syntax highlighting
|
||||||
const spans = fixture.nativeElement.querySelectorAll('span.pln');
|
const spans = fixture.nativeElement.querySelectorAll('span.pln');
|
||||||
expect(spans.length).toBeGreaterThan(0, 'formatted spans');
|
expect(spans.length).toBeGreaterThan(0, 'formatted spans');
|
||||||
});
|
});
|
||||||
|
|
|
@ -38,7 +38,7 @@ S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(
|
||||||
/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),"default-markup htm html mxml xhtml xml xsl".split(" "));t(G([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,
|
/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),"default-markup htm html mxml xhtml xml xsl".split(" "));t(G([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,
|
||||||
"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);t(G([],[["atv",/^[\s\S]+/]]),["uq.val"]);t(y({keywords:H,
|
"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);t(G([],[["atv",/^[\s\S]+/]]),["uq.val"]);t(y({keywords:H,
|
||||||
hashComments:!0,cStyleComments:!0,types:S}),"c cc cpp cxx cyc m".split(" "));t(y({keywords:"null,true,false"}),["json"]);t(y({keywords:P,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]);t(y({keywords:O,cStyleComments:!0}),["java"]);t(y({keywords:C,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);t(y({keywords:Q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);t(y({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",
|
hashComments:!0,cStyleComments:!0,types:S}),"c cc cpp cxx cyc m".split(" "));t(y({keywords:"null,true,false"}),["json"]);t(y({keywords:P,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]);t(y({keywords:O,cStyleComments:!0}),["java"]);t(y({keywords:C,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);t(y({keywords:Q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);t(y({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",
|
||||||
hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);t(y({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);t(y({keywords:F,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]);t(y({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,
|
hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);t(y({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);t(y({keywords:F,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]);t(y({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isn't,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,
|
||||||
regexLiterals:!0}),["coffee"]);t(G([],[["str",/^[\s\S]+/]]),["regex"]);var Y=E.PR={createSimpleLexer:G,registerLangHandler:t,sourceDecorator:y,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:E.prettyPrintOne=function(a,d,f){f=f||!1;d=d||null;var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";
|
regexLiterals:!0}),["coffee"]);t(G([],[["str",/^[\s\S]+/]]),["regex"]);var Y=E.PR={createSimpleLexer:G,registerLangHandler:t,sourceDecorator:y,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:E.prettyPrintOne=function(a,d,f){f=f||!1;d=d||null;var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";
|
||||||
b=b.firstChild;f&&L(b,f,!0);M({j:d,m:f,h:b,l:1,a:null,i:null,c:null,g:null});return b.innerHTML},prettyPrint:E.prettyPrint=function(a,d){function f(){for(var b=E.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p<t.length&&c.now()<b;p++){for(var d=t[p],l=g,m=d;m=m.previousSibling;){var n=m.nodeType,u=(7===n||8===n)&&m.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==n||/\S/.test(m.nodeValue))break;if(u){l={};u.replace(/\b(\w+)=([\w:.%+-]+)/g,function(a,b,c){l[b]=c});break}}m=d.className;if((l!==g||r.test(m))&&
|
b=b.firstChild;f&&L(b,f,!0);M({j:d,m:f,h:b,l:1,a:null,i:null,c:null,g:null});return b.innerHTML},prettyPrint:E.prettyPrint=function(a,d){function f(){for(var b=E.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p<t.length&&c.now()<b;p++){for(var d=t[p],l=g,m=d;m=m.previousSibling;){var n=m.nodeType,u=(7===n||8===n)&&m.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==n||/\S/.test(m.nodeValue))break;if(u){l={};u.replace(/\b(\w+)=([\w:.%+-]+)/g,function(a,b,c){l[b]=c});break}}m=d.className;if((l!==g||r.test(m))&&
|
||||||
!e.test(m)){n=!1;for(u=d.parentNode;u;u=u.parentNode)if(q.test(u.tagName)&&u.className&&r.test(u.className)){n=!0;break}if(!n){d.className+=" prettyprinted";n=l.lang;if(!n){var n=m.match(w),C;!n&&(C=V(d))&&z.test(C.tagName)&&(n=C.className.match(w));n&&(n=n[1])}if(y.test(d.tagName))u=1;else var u=d.currentStyle,x=v.defaultView,u=(u=u?u.whiteSpace:x&&x.getComputedStyle?x.getComputedStyle(d,null).getPropertyValue("white-space"):0)&&"pre"===u.substring(0,3);x=l.linenums;(x="true"===x||+x)||(x=(x=m.match(/\blinenums\b(?::(\d+))?/))?
|
!e.test(m)){n=!1;for(u=d.parentNode;u;u=u.parentNode)if(q.test(u.tagName)&&u.className&&r.test(u.className)){n=!0;break}if(!n){d.className+=" prettyprinted";n=l.lang;if(!n){var n=m.match(w),C;!n&&(C=V(d))&&z.test(C.tagName)&&(n=C.className.match(w));n&&(n=n[1])}if(y.test(d.tagName))u=1;else var u=d.currentStyle,x=v.defaultView,u=(u=u?u.whiteSpace:x&&x.getComputedStyle?x.getComputedStyle(d,null).getPropertyValue("white-space"):0)&&"pre"===u.substring(0,3);x=l.linenums;(x="true"===x||+x)||(x=(x=m.match(/\blinenums\b(?::(\d+))?/))?
|
||||||
|
|
|
@ -10,7 +10,7 @@ const method1 = { parameters: [] };
|
||||||
const method2 = { parameters: [] };
|
const method2 = { parameters: [] };
|
||||||
const method3 = { parameters: [] };
|
const method3 = { parameters: [] };
|
||||||
|
|
||||||
describe('angular-api-packge: processClassLikeMembers processor', () => {
|
describe('angular-api-package: processClassLikeMembers processor', () => {
|
||||||
|
|
||||||
it('should be available on the injector', () => {
|
it('should be available on the injector', () => {
|
||||||
const dgeni = new Dgeni([testPackage('angular-api-package')]);
|
const dgeni = new Dgeni([testPackage('angular-api-package')]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Split the descripton (of selected docs) into:
|
* Split the description (of selected docs) into:
|
||||||
* * `shortDescription`: the first paragraph
|
* * `shortDescription`: the first paragraph
|
||||||
* * `description`: the rest of the paragraphs
|
* * `description`: the rest of the paragraphs
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "language_service_plugin",
|
"name": "language_service_plugin",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"decription": "Angular Language Service plugin integration test",
|
"description": "Angular Language Service plugin integration test",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "file:../../dist/packages-dist/animations",
|
"@angular/animations": "file:../../dist/packages-dist/animations",
|
||||||
"@angular/common": "file:../../dist/packages-dist/common",
|
"@angular/common": "file:../../dist/packages-dist/common",
|
||||||
|
|
|
@ -16,7 +16,7 @@ try {
|
||||||
const lsf = require('@angular/language-service');
|
const lsf = require('@angular/language-service');
|
||||||
const ls = lsf({typescript: ts});
|
const ls = lsf({typescript: ts});
|
||||||
|
|
||||||
// Assert that the only module that should have been required are '@angular/langauge-service', 'fs', and 'path'
|
// Assert that the only module that should have been required are '@angular/language-service', 'fs', and 'path'
|
||||||
|
|
||||||
const allowedLoads = new Set(["@angular/language-service", "fs", "path"]);
|
const allowedLoads = new Set(["@angular/language-service", "fs", "path"]);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||||
import {browser, by, element} from 'protractor';
|
import {browser, by, element} from 'protractor';
|
||||||
|
|
||||||
// TODO(i): reenable once we are using a version of protractor containing the
|
// TODO(i): re-enable once we are using a version of protractor containing the
|
||||||
// change in https://github.com/angular/protractor/pull/3403
|
// change in https://github.com/angular/protractor/pull/3403
|
||||||
xdescribe('ngUpgrade', function() {
|
xdescribe('ngUpgrade', function() {
|
||||||
const URL = 'all/playground/src/upgrade/index.html';
|
const URL = 'all/playground/src/upgrade/index.html';
|
||||||
|
|
|
@ -1290,14 +1290,14 @@ img { -ms-interpolation-mode: bicubic; }
|
||||||
.navcontain { height: 80px; }
|
.navcontain { height: 80px; }
|
||||||
@media only screen and (max-width: 768px) { .navcontain { height: auto; } }
|
@media only screen and (max-width: 768px) { .navcontain { height: auto; } }
|
||||||
|
|
||||||
.pretty.navbar { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b8085), color-stop(100%, #313436)); background-image: -webkit-linear-gradient(#7b8085, #313436); background-image: -moz-linear-gradient(#7b8085, #313436); background-image: -o-linear-gradient(#7b8085, #313436); background-image: linear-gradient(#7b8085, #313436); -webkit-box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; -moz-box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; /* Remove this line if you dont want a dropshadow on your navigation*/ }
|
.pretty.navbar { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b8085), color-stop(100%, #313436)); background-image: -webkit-linear-gradient(#7b8085, #313436); background-image: -moz-linear-gradient(#7b8085, #313436); background-image: -o-linear-gradient(#7b8085, #313436); background-image: linear-gradient(#7b8085, #313436); -webkit-box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; -moz-box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; box-shadow: inset 0 1px 1px #7b8085, 0 1px 2px rgba(0, 0, 0, 0.8) !important; /* Remove this line if you don't want a dropshadow on your navigation*/ }
|
||||||
@media only screen and (max-width: 767px) { .pretty.navbar a.toggle { border: 1px solid #3e4043; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b8085), color-stop(100%, #4a4d50)); background-image: -webkit-linear-gradient(#7b8085, #4a4d50); background-image: -moz-linear-gradient(#7b8085, #4a4d50); background-image: -o-linear-gradient(#7b8085, #4a4d50); background-image: linear-gradient(#7b8085, #4a4d50); -webkit-box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; -moz-box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; }
|
@media only screen and (max-width: 767px) { .pretty.navbar a.toggle { border: 1px solid #3e4043; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7b8085), color-stop(100%, #4a4d50)); background-image: -webkit-linear-gradient(#7b8085, #4a4d50); background-image: -moz-linear-gradient(#7b8085, #4a4d50); background-image: -o-linear-gradient(#7b8085, #4a4d50); background-image: linear-gradient(#7b8085, #4a4d50); -webkit-box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; -moz-box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; box-shadow: inset 0 1px 2px #888d91, inset 0 -1px 1px #565a5d, inset 1px 0 1px #565a5d, inset -1px 0 1px #565a5d, 0 1px 1px #63676a; }
|
||||||
.pretty.navbar a.toggle i { text-shadow: 0 1px 1px #191a1b; }
|
.pretty.navbar a.toggle i { text-shadow: 0 1px 1px #191a1b; }
|
||||||
.pretty.navbar a.toggle:hover { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #888d91), color-stop(100%, #565a5d)); background-image: -webkit-linear-gradient(#888d91, #565a5d); background-image: -moz-linear-gradient(#888d91, #565a5d); background-image: -o-linear-gradient(#888d91, #565a5d); background-image: linear-gradient(#888d91, #565a5d); }
|
.pretty.navbar a.toggle:hover { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #888d91), color-stop(100%, #565a5d)); background-image: -webkit-linear-gradient(#888d91, #565a5d); background-image: -moz-linear-gradient(#888d91, #565a5d); background-image: -o-linear-gradient(#888d91, #565a5d); background-image: linear-gradient(#888d91, #565a5d); }
|
||||||
.pretty.navbar a.toggle:active, .pretty.navbar a.toggle.active { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3e4043), color-stop(100%, #4a4d50)); background-image: -webkit-linear-gradient(#3e4043, #4a4d50); background-image: -moz-linear-gradient(#3e4043, #4a4d50); background-image: -o-linear-gradient(#3e4043, #4a4d50); background-image: linear-gradient(#3e4043, #4a4d50); -webkit-box-shadow: 0 1px 1px #63676a; -moz-box-shadow: 0 1px 1px #63676a; box-shadow: 0 1px 1px #63676a; } }
|
.pretty.navbar a.toggle:active, .pretty.navbar a.toggle.active { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3e4043), color-stop(100%, #4a4d50)); background-image: -webkit-linear-gradient(#3e4043, #4a4d50); background-image: -moz-linear-gradient(#3e4043, #4a4d50); background-image: -o-linear-gradient(#3e4043, #4a4d50); background-image: linear-gradient(#3e4043, #4a4d50); -webkit-box-shadow: 0 1px 1px #63676a; -moz-box-shadow: 0 1px 1px #63676a; box-shadow: 0 1px 1px #63676a; } }
|
||||||
.pretty.navbar.row { -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; }
|
.pretty.navbar.row { -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; }
|
||||||
@media only screen and (max-width: 767px) { .pretty.navbar.row { -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; } }
|
@media only screen and (max-width: 767px) { .pretty.navbar.row { -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; } }
|
||||||
.pretty.navbar ul li.field input.search { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #191a1b), color-stop(100%, #4f5255)); background-image: -webkit-linear-gradient(#191a1b, #4f5255); background-image: -moz-linear-gradient(#191a1b, #4f5255); background-image: -o-linear-gradient(#191a1b, #4f5255); background-image: linear-gradient(#191a1b, #4f5255); border: none; -webkit-box-shadow: 0 1px 2px #888d91 !important; -moz-box-shadow: 0 1px 2px #888d91 !important; box-shadow: 0 1px 2px #888d91 !important; /* Remove this line if you dont want a dropshadow on your navigation*/ }
|
.pretty.navbar ul li.field input.search { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #191a1b), color-stop(100%, #4f5255)); background-image: -webkit-linear-gradient(#191a1b, #4f5255); background-image: -moz-linear-gradient(#191a1b, #4f5255); background-image: -o-linear-gradient(#191a1b, #4f5255); background-image: linear-gradient(#191a1b, #4f5255); border: none; -webkit-box-shadow: 0 1px 2px #888d91 !important; -moz-box-shadow: 0 1px 2px #888d91 !important; box-shadow: 0 1px 2px #888d91 !important; /* Remove this line if you don't want a dropshadow on your navigation*/ }
|
||||||
.pretty.navbar > ul > li:first-child, .pretty.navbar .pretty.navbar > ul > li:first-child a:hover { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
.pretty.navbar > ul > li:first-child, .pretty.navbar .pretty.navbar > ul > li:first-child a:hover { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
||||||
|
|
||||||
.navbar li .dropdown { width: auto; min-width: 0; max-width: 320px; height: 0; position: absolute; background: #fafafa; overflow: hidden; z-index: 999; }
|
.navbar li .dropdown { width: auto; min-width: 0; max-width: 320px; height: 0; position: absolute; background: #fafafa; overflow: hidden; z-index: 999; }
|
||||||
|
@ -1618,7 +1618,7 @@ label + .xnarrow:last-child, label + .narrow:last-child, label + .normal:last-ch
|
||||||
|
|
||||||
.tab-nav > li.active > a { height: 43px; line-height: 41px; background: white; }
|
.tab-nav > li.active > a { height: 43px; line-height: 41px; background: white; }
|
||||||
|
|
||||||
.tabs.pill .tab-nav { width: 100%; /* remove if you dont want the tabs to span the full container width */ display: table; overflow: hidden; border: 1px solid #e5e5e5; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; }
|
.tabs.pill .tab-nav { width: 100%; /* remove if you don't want the tabs to span the full container width */ display: table; overflow: hidden; border: 1px solid #e5e5e5; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; }
|
||||||
.tabs.pill .tab-nav > li { display: table-cell; margin: 0; margin-left: -4px; text-align: center; top: 0; }
|
.tabs.pill .tab-nav > li { display: table-cell; margin: 0; margin-left: -4px; text-align: center; top: 0; }
|
||||||
.tabs.pill .tab-nav > li:first-child { margin-left: 0; }
|
.tabs.pill .tab-nav > li:first-child { margin-left: 0; }
|
||||||
.tabs.pill .tab-nav > li > a { border: none; border-right: 1px solid #e5e5e5; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; height: 42px; line-height: 40px; }
|
.tabs.pill .tab-nav > li > a { border: none; border-right: 1px solid #e5e5e5; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; height: 42px; line-height: 40px; }
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This file is not used to build this module. It is only used during editing
|
// This file is not used to build this module. It is only used during editing
|
||||||
// by the TypeScript language serivce and during build for verifcation. `ngc`
|
// by the TypeScript language service and during build for verifcation. `ngc`
|
||||||
// replaces this file with production index.ts when it rewrites private symbol
|
// replaces this file with production index.ts when it rewrites private symbol
|
||||||
// names.
|
// names.
|
||||||
|
|
||||||
|
|
|
@ -403,7 +403,7 @@ export class AnimationTransitionNamespace {
|
||||||
|
|
||||||
// when this `if statement` does not continue forward it means that
|
// when this `if statement` does not continue forward it means that
|
||||||
// a previous animation query has selected the current element and
|
// a previous animation query has selected the current element and
|
||||||
// is animating it. In this situation want to continue fowards and
|
// is animating it. In this situation want to continue forwards and
|
||||||
// allow the element to be queued up for animation later.
|
// allow the element to be queued up for animation later.
|
||||||
if (currentPlayers && currentPlayers.length) {
|
if (currentPlayers && currentPlayers.length) {
|
||||||
containsPotentialParentTransition = true;
|
containsPotentialParentTransition = true;
|
||||||
|
|
|
@ -187,7 +187,7 @@ export function interpolateParams(
|
||||||
const original = value.toString();
|
const original = value.toString();
|
||||||
const str = original.replace(PARAM_REGEX, (_, varName) => {
|
const str = original.replace(PARAM_REGEX, (_, varName) => {
|
||||||
let localVal = params[varName];
|
let localVal = params[varName];
|
||||||
// this means that the value was never overidden by the data passed in by the user
|
// this means that the value was never overridden by the data passed in by the user
|
||||||
if (!params.hasOwnProperty(varName)) {
|
if (!params.hasOwnProperty(varName)) {
|
||||||
errors.push(`Please provide a value for the animation param ${varName}`);
|
errors.push(`Please provide a value for the animation param ${varName}`);
|
||||||
localVal = '';
|
localVal = '';
|
||||||
|
|
|
@ -381,8 +381,8 @@ function createDiv() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('subtitutions', () => {
|
describe('substitutions', () => {
|
||||||
it('should allow params to be subtituted even if they are not defaulted in a reusable animation',
|
it('should allow params to be substituted even if they are not defaulted in a reusable animation',
|
||||||
() => {
|
() => {
|
||||||
const myAnimation = animation([
|
const myAnimation = animation([
|
||||||
style({left: '{{ start }}'}),
|
style({left: '{{ start }}'}),
|
||||||
|
|
|
@ -143,17 +143,21 @@ import {makeTrigger} from '../shared';
|
||||||
expect(keyframes).toEqual([{height: '100px', offset: 0}, {height: '200px', offset: 1}]);
|
expect(keyframes).toEqual([{height: '100px', offset: 0}, {height: '200px', offset: 1}]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should subtitute variable params provided directly within the transition match', () => {
|
it('should substitute variable params provided directly within the transition match',
|
||||||
|
() => {
|
||||||
const result = makeTrigger(
|
const result = makeTrigger(
|
||||||
'name',
|
'name',
|
||||||
[transition(
|
[transition(
|
||||||
'a => b', [style({height: '{{ a }}'}), animate(1000, style({height: '{{ b }}'}))],
|
'a => b',
|
||||||
|
[style({height: '{{ a }}'}), animate(1000, style({height: '{{ b }}'}))],
|
||||||
buildParams({a: '100px', b: '200px'}))]);
|
buildParams({a: '100px', b: '200px'}))]);
|
||||||
|
|
||||||
const trans = buildTransition(result, element, 'a', 'b', {}, buildParams({a: '300px'})) !;
|
const trans =
|
||||||
|
buildTransition(result, element, 'a', 'b', {}, buildParams({a: '300px'})) !;
|
||||||
|
|
||||||
const keyframes = trans.timelines[0].keyframes;
|
const keyframes = trans.timelines[0].keyframes;
|
||||||
expect(keyframes).toEqual([{height: '300px', offset: 0}, {height: '200px', offset: 1}]);
|
expect(keyframes).toEqual(
|
||||||
|
[{height: '300px', offset: 0}, {height: '200px', offset: 1}]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This file is not used to build this module. It is only used during editing
|
// This file is not used to build this module. It is only used during editing
|
||||||
// by the TypeScript language serivce and during build for verifcation. `ngc`
|
// by the TypeScript language service and during build for verifcation. `ngc`
|
||||||
// replaces this file with production index.ts when it rewrites private symbol
|
// replaces this file with production index.ts when it rewrites private symbol
|
||||||
// names.
|
// names.
|
||||||
|
|
||||||
|
|
|
@ -645,7 +645,7 @@ export function state(
|
||||||
* destination, keyframes can describe how each style entry is applied and at what point within the
|
* destination, keyframes can describe how each style entry is applied and at what point within the
|
||||||
* animation arc (much like CSS Keyframe Animations do).
|
* animation arc (much like CSS Keyframe Animations do).
|
||||||
*
|
*
|
||||||
* For each `style()` entry an `offset` value can be set. Doing so allows to specifiy at what
|
* For each `style()` entry an `offset` value can be set. Doing so allows to specify at what
|
||||||
* percentage of the animate time the styles will be applied.
|
* percentage of the animate time the styles will be applied.
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
|
@ -1052,7 +1052,7 @@ export function useAnimation(
|
||||||
*
|
*
|
||||||
* ### Usage
|
* ### Usage
|
||||||
*
|
*
|
||||||
* query() is designed to collect mutiple elements and works internally by using
|
* query() is designed to collect multiple elements and works internally by using
|
||||||
* `element.querySelectorAll`. An additional options object can be provided which
|
* `element.querySelectorAll`. An additional options object can be provided which
|
||||||
* can be used to limit the total amount of items to be collected.
|
* can be used to limit the total amount of items to be collected.
|
||||||
*
|
*
|
||||||
|
|
|
@ -198,7 +198,7 @@ def ngc_compile_action(ctx, label, inputs, outputs, messages_out, tsconfig_file,
|
||||||
arguments = (_EXTRA_NODE_OPTIONS_FLAGS +
|
arguments = (_EXTRA_NODE_OPTIONS_FLAGS +
|
||||||
[tsconfig_file.path] +
|
[tsconfig_file.path] +
|
||||||
# The base path is bin_dir because of the way the ngc
|
# The base path is bin_dir because of the way the ngc
|
||||||
# compiler host is configured. So we need to explictily
|
# compiler host is configured. So we need to explicitly
|
||||||
# point to genfiles/ to redirect the output.
|
# point to genfiles/ to redirect the output.
|
||||||
["../genfiles/" + messages_out[0].short_path]),
|
["../genfiles/" + messages_out[0].short_path]),
|
||||||
progress_message = "Extracting Angular 2 messages (ng_xi18n)",
|
progress_message = "Extracting Angular 2 messages (ng_xi18n)",
|
||||||
|
|
|
@ -172,7 +172,7 @@ export class Location {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If url has a trailing slash, remove it, otherwise return url as is. This
|
* If url has a trailing slash, remove it, otherwise return url as is. This
|
||||||
* method looks for the first occurence of either #, ?, or the end of the
|
* method looks for the first occurrence of either #, ?, or the end of the
|
||||||
* line as `/` characters after any of these should not be replaced.
|
* line as `/` characters after any of these should not be replaced.
|
||||||
*/
|
*/
|
||||||
public static stripTrailingSlash(url: string): string {
|
public static stripTrailingSlash(url: string): string {
|
||||||
|
|
|
@ -255,7 +255,7 @@ class ExpressionDiagnosticsVisitor extends RecursiveTemplateAstVisitor {
|
||||||
|
|
||||||
this.push(ast);
|
this.push(ast);
|
||||||
|
|
||||||
// Find directive that refernces this template
|
// Find directive that references this template
|
||||||
this.directiveSummary =
|
this.directiveSummary =
|
||||||
ast.directives.map(d => d.directive).find(d => hasTemplateReference(d.type)) !;
|
ast.directives.map(d => d.directive).find(d => hasTemplateReference(d.type)) !;
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ export interface SymbolTable {
|
||||||
*/
|
*/
|
||||||
export interface Signature {
|
export interface Signature {
|
||||||
/**
|
/**
|
||||||
* The arguments of the signture. The order of `argumetnts.symbols()` must be in the order
|
* The arguments of the signture. The order of `arguments.symbols()` must be in the order
|
||||||
* of argument declaration.
|
* of argument declaration.
|
||||||
*/
|
*/
|
||||||
readonly arguments: SymbolTable;
|
readonly arguments: SymbolTable;
|
||||||
|
@ -216,7 +216,7 @@ export enum BuiltinType {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The kinds of defintion.
|
* The kinds of definition.
|
||||||
*
|
*
|
||||||
* @experimental
|
* @experimental
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -310,7 +310,7 @@ export class MetadataBundler {
|
||||||
const exportAlls = new Set<string>();
|
const exportAlls = new Set<string>();
|
||||||
for (const symbol of exportedSymbols) {
|
for (const symbol of exportedSymbols) {
|
||||||
if (symbol.reexport) {
|
if (symbol.reexport) {
|
||||||
// symbol.declaration is guarenteed to be defined during the phase this method is called.
|
// symbol.declaration is guaranteed to be defined during the phase this method is called.
|
||||||
const declaration = symbol.declaration !;
|
const declaration = symbol.declaration !;
|
||||||
const module = declaration.module;
|
const module = declaration.module;
|
||||||
if (declaration !.name == '*') {
|
if (declaration !.name == '*') {
|
||||||
|
|
|
@ -468,7 +468,7 @@ export class Evaluator {
|
||||||
if (!isMetadataModuleReferenceExpression(typeReference) &&
|
if (!isMetadataModuleReferenceExpression(typeReference) &&
|
||||||
typeReferenceNode.typeArguments && typeReferenceNode.typeArguments.length) {
|
typeReferenceNode.typeArguments && typeReferenceNode.typeArguments.length) {
|
||||||
const args = typeReferenceNode.typeArguments.map(element => this.evaluateNode(element));
|
const args = typeReferenceNode.typeArguments.map(element => this.evaluateNode(element));
|
||||||
// TODO: Remove typecast when upgraded to 2.0 as it will be corretly inferred.
|
// TODO: Remove typecast when upgraded to 2.0 as it will be correctly inferred.
|
||||||
// Some versions of 1.9 do not infer this correctly.
|
// Some versions of 1.9 do not infer this correctly.
|
||||||
(<MetadataImportedSymbolReferenceExpression>typeReference).arguments = args;
|
(<MetadataImportedSymbolReferenceExpression>typeReference).arguments = args;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ export class Symbols {
|
||||||
}
|
}
|
||||||
const from = stripQuotes(importDecl.moduleSpecifier.getText());
|
const from = stripQuotes(importDecl.moduleSpecifier.getText());
|
||||||
if (importDecl.importClause.name) {
|
if (importDecl.importClause.name) {
|
||||||
// An `import <identifier> form <module-specifier>` clause. Record the defualt symbol.
|
// An `import <identifier> form <module-specifier>` clause. Record the default symbol.
|
||||||
symbols.set(
|
symbols.set(
|
||||||
importDecl.importClause.name.text,
|
importDecl.importClause.name.text,
|
||||||
{__symbolic: 'reference', module: from, default: true});
|
{__symbolic: 'reference', module: from, default: true});
|
||||||
|
|
|
@ -73,7 +73,7 @@ export interface CompilerOptions extends ts.CompilerOptions {
|
||||||
// Whether to generate a flat module index of the given name and the corresponding
|
// Whether to generate a flat module index of the given name and the corresponding
|
||||||
// flat module metadata. This option is intended to be used when creating flat
|
// flat module metadata. This option is intended to be used when creating flat
|
||||||
// modules similar to how `@angular/core` and `@angular/common` are packaged.
|
// modules similar to how `@angular/core` and `@angular/common` are packaged.
|
||||||
// When this option is used the `package.json` for the library should refered to the
|
// When this option is used the `package.json` for the library should referred to the
|
||||||
// generated flat module index instead of the library index file. When using this
|
// generated flat module index instead of the library index file. When using this
|
||||||
// option only one .metadata.json file is produced that contains all the metadata
|
// option only one .metadata.json file is produced that contains all the metadata
|
||||||
// necessary for symbols exported from the library index.
|
// necessary for symbols exported from the library index.
|
||||||
|
@ -223,7 +223,7 @@ export interface CompilerHost extends ts.CompilerHost {
|
||||||
/**
|
/**
|
||||||
* Load a referenced resource either statically or asynchronously. If the host returns a
|
* Load a referenced resource either statically or asynchronously. If the host returns a
|
||||||
* `Promise<string>` it is assumed the user of the corresponding `Program` will call
|
* `Promise<string>` it is assumed the user of the corresponding `Program` will call
|
||||||
* `loadNgStructureAsync()`. Returing `Promise<string>` outside `loadNgStructureAsync()` will
|
* `loadNgStructureAsync()`. Returning `Promise<string>` outside `loadNgStructureAsync()` will
|
||||||
* cause a diagnostics diagnostic error or an exception to be thrown.
|
* cause a diagnostics diagnostic error or an exception to be thrown.
|
||||||
*/
|
*/
|
||||||
readResource?(fileName: string): Promise<string>|string;
|
readResource?(fileName: string): Promise<string>|string;
|
||||||
|
@ -323,7 +323,7 @@ export interface Program {
|
||||||
getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken): ReadonlyArray<Diagnostic>;
|
getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken): ReadonlyArray<Diagnostic>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the semantic diagnostics from TypeScript. This is equivilent to calling
|
* Retrieve the semantic diagnostics from TypeScript. This is equivalent to calling
|
||||||
* `getTsProgram().getSemanticDiagnostics()` directly and is included for completeness.
|
* `getTsProgram().getSemanticDiagnostics()` directly and is included for completeness.
|
||||||
*/
|
*/
|
||||||
getTsSemanticDiagnostics(sourceFile?: ts.SourceFile, cancellationToken?: ts.CancellationToken):
|
getTsSemanticDiagnostics(sourceFile?: ts.SourceFile, cancellationToken?: ts.CancellationToken):
|
||||||
|
|
|
@ -757,7 +757,7 @@ describe('ng type checker', () => {
|
||||||
it('should reject an access to a nullable field of a method result', () => {
|
it('should reject an access to a nullable field of a method result', () => {
|
||||||
r('<div>{{getMaybePerson().name}}</div>', `Object is possibly 'undefined'.`, '0:5');
|
r('<div>{{getMaybePerson().name}}</div>', `Object is possibly 'undefined'.`, '0:5');
|
||||||
});
|
});
|
||||||
it('should accept a nullable assert of a nullable field refernces of a method result',
|
it('should accept a nullable assert of a nullable field references of a method result',
|
||||||
() => { a('{{getMaybePerson()!.name}}'); });
|
() => { a('{{getMaybePerson()!.name}}'); });
|
||||||
it('should accept a safe property access of a nullable field reference of a method result',
|
it('should accept a safe property access of a nullable field reference of a method result',
|
||||||
() => { a('{{getMaybePerson()?.name}}'); });
|
() => { a('{{getMaybePerson()?.name}}'); });
|
||||||
|
|
|
@ -51,7 +51,7 @@ describe('expression diagnostics', () => {
|
||||||
function expectNoDiagnostics(diagnostics: ts.Diagnostic[]) {
|
function expectNoDiagnostics(diagnostics: ts.Diagnostic[]) {
|
||||||
if (diagnostics && diagnostics.length) {
|
if (diagnostics && diagnostics.length) {
|
||||||
const message =
|
const message =
|
||||||
'messags: ' + diagnostics.map(d => messageToString(d.messageText)).join('\n');
|
'messages: ' + diagnostics.map(d => messageToString(d.messageText)).join('\n');
|
||||||
expect(message).toEqual('');
|
expect(message).toEqual('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ describe('expression diagnostics', () => {
|
||||||
it('should reject an uncalled event handler',
|
it('should reject an uncalled event handler',
|
||||||
() => reject(
|
() => reject(
|
||||||
'<div (click)="click">{{person.name.first}}</div>', 'Unexpected callable expression'));
|
'<div (click)="click">{{person.name.first}}</div>', 'Unexpected callable expression'));
|
||||||
describe('with comparisions between nullable and non-nullable', () => {
|
describe('with comparisons between nullable and non-nullable', () => {
|
||||||
it('should accept ==', () => accept(`<div>{{e == 1 ? 'a' : 'b'}}</div>`));
|
it('should accept ==', () => accept(`<div>{{e == 1 ? 'a' : 'b'}}</div>`));
|
||||||
it('should accept ===', () => accept(`<div>{{e === 1 ? 'a' : 'b'}}</div>`));
|
it('should accept ===', () => accept(`<div>{{e === 1 ? 'a' : 'b'}}</div>`));
|
||||||
it('should accept !=', () => accept(`<div>{{e != 1 ? 'a' : 'b'}}</div>`));
|
it('should accept !=', () => accept(`<div>{{e != 1 ? 'a' : 'b'}}</div>`));
|
||||||
|
|
|
@ -141,7 +141,7 @@ describe('NgCompilerHost', () => {
|
||||||
.toBe('/tmp/src/a/child.d.ts');
|
.toBe('/tmp/src/a/child.d.ts');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should allow to skip the containg file for package imports', () => {
|
it('should allow to skip the containing file for package imports', () => {
|
||||||
const host =
|
const host =
|
||||||
createHost({files: {'tmp': {'node_modules': {'@core': {'index.d.ts': dummyModule}}}}});
|
createHost({files: {'tmp': {'node_modules': {'@core': {'index.d.ts': dummyModule}}}}});
|
||||||
expect(host.moduleNameToFileName('@core/index')).toBe('/tmp/node_modules/@core/index.d.ts');
|
expect(host.moduleNameToFileName('@core/index')).toBe('/tmp/node_modules/@core/index.d.ts');
|
||||||
|
|
|
@ -249,7 +249,7 @@ export class StaticSymbolResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hasDecorators checks a file's metadata for the presense of decorators without evalutating the
|
* hasDecorators checks a file's metadata for the presence of decorators without evaluating the
|
||||||
* metadata.
|
* metadata.
|
||||||
*
|
*
|
||||||
* @param filePath the absolute path to examine for decorators.
|
* @param filePath the absolute path to examine for decorators.
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
* particular offset in a source file. The head of the list is the top
|
* particular offset in a source file. The head of the list is the top
|
||||||
* most node. The tail is the node that contains the offset directly.
|
* most node. The tail is the node that contains the offset directly.
|
||||||
*
|
*
|
||||||
* For example, the expresion `a + b + c` might have an ast that looks
|
* For example, the expression `a + b + c` might have an ast that looks
|
||||||
* like:
|
* like:
|
||||||
* +
|
* +
|
||||||
* / \
|
* / \
|
||||||
|
|
|
@ -162,11 +162,11 @@ export class DirectiveNormalizer {
|
||||||
stylesheets: Map<string, CompileStylesheetMetadata>): CompileTemplateMetadata {
|
stylesheets: Map<string, CompileStylesheetMetadata>): CompileTemplateMetadata {
|
||||||
// Algorithm:
|
// Algorithm:
|
||||||
// - produce exactly 1 entry per original styleUrl in
|
// - produce exactly 1 entry per original styleUrl in
|
||||||
// CompileTemplateMetadata.externalStylesheets whith all styles inlined
|
// CompileTemplateMetadata.externalStylesheets with all styles inlined
|
||||||
// - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.
|
// - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.
|
||||||
// Reason: be able to determine how many stylesheets there are even without loading
|
// Reason: be able to determine how many stylesheets there are even without loading
|
||||||
// the template nor the stylesheets, so we can create a stub for TypeScript always synchronously
|
// the template nor the stylesheets, so we can create a stub for TypeScript always synchronously
|
||||||
// (as resouce loading may be async)
|
// (as resource loading may be async)
|
||||||
|
|
||||||
const styles = [...preparsedTemplate.styles];
|
const styles = [...preparsedTemplate.styles];
|
||||||
this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);
|
this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);
|
||||||
|
|
|
@ -670,7 +670,7 @@ export class _ParseAST {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An identifier, a keyword, a string with an optional `-` inbetween.
|
* An identifier, a keyword, a string with an optional `-` between.
|
||||||
*/
|
*/
|
||||||
expectTemplateBindingKey(): string {
|
expectTemplateBindingKey(): string {
|
||||||
let result = '';
|
let result = '';
|
||||||
|
|
|
@ -208,7 +208,7 @@ describe('compiler (unbundled Angular)', () => {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should error if not all arguments of an @Injectable class can be resolved if strictInjectionParamters is true',
|
it('should error if not all arguments of an @Injectable class can be resolved if strictInjectionParameters is true',
|
||||||
() => {
|
() => {
|
||||||
const FILES: MockDirectory = {
|
const FILES: MockDirectory = {
|
||||||
app: {
|
app: {
|
||||||
|
|
|
@ -255,7 +255,7 @@ describe('aot summaries for jit', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create and use reexports for imported NgModules ' +
|
it('should create and use reexports for imported NgModules ' +
|
||||||
'accross compilation units',
|
'across compilation units',
|
||||||
() => {
|
() => {
|
||||||
const lib1In = {
|
const lib1In = {
|
||||||
'lib1': {
|
'lib1': {
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ describe('StaticReflector', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Regression #18170
|
// Regression #18170
|
||||||
it('should agressively evaluate array indexes', () => {
|
it('should aggressively evaluate array indexes', () => {
|
||||||
const data = Object.create(DEFAULT_TEST_DATA);
|
const data = Object.create(DEFAULT_TEST_DATA);
|
||||||
const file = '/tmp/src/my_component.ts';
|
const file = '/tmp/src/my_component.ts';
|
||||||
data[file] = `
|
data[file] = `
|
||||||
|
@ -1148,7 +1148,7 @@ describe('StaticReflector', () => {
|
||||||
Function calls are not supported in decorators but 'functionToCall' was called.`);
|
Function calls are not supported in decorators but 'functionToCall' was called.`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should report a formatted error for a refernce to a function call', () => {
|
it('should report a formatted error for a reference to a function call', () => {
|
||||||
expect(() => {
|
expect(() => {
|
||||||
return reflector.annotations(
|
return reflector.annotations(
|
||||||
reflector.getStaticSymbol(fileName, 'ReferenceCalledFunction'));
|
reflector.getStaticSymbol(fileName, 'ReferenceCalledFunction'));
|
||||||
|
@ -1171,7 +1171,7 @@ describe('StaticReflector', () => {
|
||||||
'CALL_FUNCTION' calls 'functionToCall' at /tmp/src/invalid/function-call.ts(3,38).`);
|
'CALL_FUNCTION' calls 'functionToCall' at /tmp/src/invalid/function-call.ts(3,38).`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should report a formatted error for a double-indirect refernce to a function call', () => {
|
it('should report a formatted error for a double-indirect reference to a function call', () => {
|
||||||
expect(() => {
|
expect(() => {
|
||||||
return reflector.annotations(
|
return reflector.annotations(
|
||||||
reflector.getStaticSymbol(fileName, 'TwoLevelsIndirectReferenceCalledFunction'));
|
reflector.getStaticSymbol(fileName, 'TwoLevelsIndirectReferenceCalledFunction'));
|
||||||
|
@ -1551,7 +1551,7 @@ const DEFAULT_TEST_DATA: {[key: string]: any} = {
|
||||||
@CustomDecorator() get foo(): string { return ''; }
|
@CustomDecorator() get foo(): string { return ''; }
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
'/tmp/src/invalid-calll-definitions.ts': `
|
'/tmp/src/invalid-call-definitions.ts': `
|
||||||
export function someFunction(a: any) {
|
export function someFunction(a: any) {
|
||||||
if (Array.isArray(a)) {
|
if (Array.isArray(a)) {
|
||||||
return a;
|
return a;
|
||||||
|
@ -1560,7 +1560,7 @@ const DEFAULT_TEST_DATA: {[key: string]: any} = {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
'/tmp/src/invalid-calls.ts': `
|
'/tmp/src/invalid-calls.ts': `
|
||||||
import {someFunction} from './nvalid-calll-definitions.ts';
|
import {someFunction} from './nvalid-call-definitions.ts';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {NgIf} from '@angular/common';
|
import {NgIf} from '@angular/common';
|
||||||
|
|
||||||
|
|
|
@ -1433,7 +1433,7 @@ Binding to attribute 'onEvent' is disallowed for security reasons ("<my-componen
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should report references with values that dont match a directive as errors', () => {
|
it('should report references with values that don\'t match a directive as errors', () => {
|
||||||
expect(() => parse('<div #a="dirA"></div>', [])).toThrowError(`Template parse errors:
|
expect(() => parse('<div #a="dirA"></div>', [])).toThrowError(`Template parse errors:
|
||||||
There is no directive with "exportAs" set to "dirA" ("<div [ERROR ->]#a="dirA"></div>"): TestComp@0:5`);
|
There is no directive with "exportAs" set to "dirA" ("<div [ERROR ->]#a="dirA"></div>"): TestComp@0:5`);
|
||||||
});
|
});
|
||||||
|
@ -1455,7 +1455,7 @@ Reference "#a" is defined several times ("<div #a></div><div [ERROR ->]#a></div>
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should report duplicate reference names when using mutliple exportAs names', () => {
|
it('should report duplicate reference names when using multiple exportAs names', () => {
|
||||||
const pizzaDirective =
|
const pizzaDirective =
|
||||||
compileDirectiveMetadataCreate({
|
compileDirectiveMetadataCreate({
|
||||||
selector: '[dessert-pizza]',
|
selector: '[dessert-pizza]',
|
||||||
|
|
|
@ -797,7 +797,7 @@ export interface Pipe {
|
||||||
*
|
*
|
||||||
* Normally pipe's `transform` method is only invoked when the inputs to pipe`s
|
* Normally pipe's `transform` method is only invoked when the inputs to pipe`s
|
||||||
* `transform` method change. If the pipe has internal state (it's result are
|
* `transform` method change. If the pipe has internal state (it's result are
|
||||||
* dependant on state other than its arguments) than set `pure` to `false` so
|
* dependent on state other than its arguments) than set `pure` to `false` so
|
||||||
* that the pipe is invoked on each change-detection even if the arguments to the
|
* that the pipe is invoked on each change-detection even if the arguments to the
|
||||||
* pipe do not change.
|
* pipe do not change.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -41,7 +41,7 @@ export interface ObjectOrientedRenderer3 {
|
||||||
querySelector(selectors: string): RElement|null;
|
querySelector(selectors: string): RElement|null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns wether the `renderer` is a `ProceduralRenderer3` */
|
/** Returns whether the `renderer` is a `ProceduralRenderer3` */
|
||||||
export function isProceduralRenderer(renderer: ProceduralRenderer3 | ObjectOrientedRenderer3):
|
export function isProceduralRenderer(renderer: ProceduralRenderer3 | ObjectOrientedRenderer3):
|
||||||
renderer is ProceduralRenderer3 {
|
renderer is ProceduralRenderer3 {
|
||||||
return !!((renderer as any).listen);
|
return !!((renderer as any).listen);
|
||||||
|
|
|
@ -35,7 +35,7 @@ export interface TypeDecorator {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ANNOTATIONS = '__annotations__';
|
export const ANNOTATIONS = '__annotations__';
|
||||||
export const PARAMETERS = '__paramaters__';
|
export const PARAMETERS = '__parameters__';
|
||||||
export const PROP_METADATA = '__prop__metadata__';
|
export const PROP_METADATA = '__prop__metadata__';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -462,7 +462,7 @@ function updateProp(
|
||||||
// expected nodeIndex which a ngOnInit should be called. When sending
|
// expected nodeIndex which a ngOnInit should be called. When sending
|
||||||
// ngAfterContentInit and ngAfterViewInit it is the expected count of
|
// ngAfterContentInit and ngAfterViewInit it is the expected count of
|
||||||
// ngAfterContentInit or ngAfterViewInit methods that have been called. This
|
// ngAfterContentInit or ngAfterViewInit methods that have been called. This
|
||||||
// ensure that dispite being called recursively or after picking up after an
|
// ensure that despite being called recursively or after picking up after an
|
||||||
// exception, the ngAfterContentInit or ngAfterViewInit will be called on the
|
// exception, the ngAfterContentInit or ngAfterViewInit will be called on the
|
||||||
// correct nodes. Consider for example, the following (where E is an element
|
// correct nodes. Consider for example, the following (where E is an element
|
||||||
// and D is a directive)
|
// and D is a directive)
|
||||||
|
|
|
@ -36,7 +36,7 @@ function attachProjectedView(vcElementData: ElementData, view: ViewData) {
|
||||||
// - add a view to template._projectedViews only 1x throughout its lifetime,
|
// - add a view to template._projectedViews only 1x throughout its lifetime,
|
||||||
// and remove it not until the view is destroyed.
|
// and remove it not until the view is destroyed.
|
||||||
// (hard, as when a parent view is attached/detached we would need to attach/detach all
|
// (hard, as when a parent view is attached/detached we would need to attach/detach all
|
||||||
// nested projected views as well, even accross component boundaries).
|
// nested projected views as well, even across component boundaries).
|
||||||
// - don't track the insertion order of views in the projected views array
|
// - don't track the insertion order of views in the projected views array
|
||||||
// (hard, as when the views of the same template are inserted different view containers)
|
// (hard, as when the views of the same template are inserted different view containers)
|
||||||
view.state |= ViewState.IsProjectedView;
|
view.state |= ViewState.IsProjectedView;
|
||||||
|
|
|
@ -1923,7 +1923,7 @@ class TestLocals {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'root', template: 'emtpy'})
|
@Component({selector: 'root', template: 'empty'})
|
||||||
class Person {
|
class Person {
|
||||||
age: number;
|
age: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -55,7 +55,7 @@ function declareTests({useJit}: {useJit: boolean}) {
|
||||||
expect(cfr.resolveComponentFactory(NestedChildComp) !.componentType).toBe(NestedChildComp);
|
expect(cfr.resolveComponentFactory(NestedChildComp) !.componentType).toBe(NestedChildComp);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to get a component form a parent component (view hiearchy)', () => {
|
it('should be able to get a component form a parent component (view hierarchy)', () => {
|
||||||
TestBed.overrideComponent(MainComp, {set: {template: '<child></child>'}});
|
TestBed.overrideComponent(MainComp, {set: {template: '<child></child>'}});
|
||||||
|
|
||||||
const compFixture = TestBed.createComponent(MainComp);
|
const compFixture = TestBed.createComponent(MainComp);
|
||||||
|
|
|
@ -121,7 +121,7 @@ function declareTests({useJit}: {useJit: boolean}) {
|
||||||
expect(MyCountingComp.calls).toBe(1);
|
expect(MyCountingComp.calls).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should evalute a conditional in a statement binding', () => {
|
it('should evaluate a conditional in a statement binding', () => {
|
||||||
@Component({selector: 'some-comp', template: '<p (click)="nullValue?.click()"></p>'})
|
@Component({selector: 'some-comp', template: '<p (click)="nullValue?.click()"></p>'})
|
||||||
class SomeComponent {
|
class SomeComponent {
|
||||||
nullValue: SomeReferencedClass;
|
nullValue: SomeReferencedClass;
|
||||||
|
|
|
@ -163,7 +163,7 @@ export type Declarations = Declaration[];
|
||||||
* Adding a required member or changing a method's parameters, is considered a breaking change and
|
* Adding a required member or changing a method's parameters, is considered a breaking change and
|
||||||
* will only be done when breaking changes are allowed. When possible, a new optional member will
|
* will only be done when breaking changes are allowed. When possible, a new optional member will
|
||||||
* be added and the old member will be deprecated. The new member will then be made required in
|
* be added and the old member will be deprecated. The new member will then be made required in
|
||||||
* and the old member will be removed only when breaking chnages are allowed.
|
* and the old member will be removed only when breaking changes are allowed.
|
||||||
*
|
*
|
||||||
* While an interface is marked as experimental breaking-changes will be allowed between minor
|
* While an interface is marked as experimental breaking-changes will be allowed between minor
|
||||||
* releases. After an interface is marked as stable breaking-changes will only be allowed between
|
* releases. After an interface is marked as stable breaking-changes will only be allowed between
|
||||||
|
@ -261,7 +261,7 @@ export enum DiagnosticKind {
|
||||||
* DiagnosticMessageChain. The messages are intended to be formatted as separate
|
* DiagnosticMessageChain. The messages are intended to be formatted as separate
|
||||||
* sentence fragments and indented.
|
* sentence fragments and indented.
|
||||||
*
|
*
|
||||||
* For compatiblity previous implementation, the values are expected to override
|
* For compatibility previous implementation, the values are expected to override
|
||||||
* toString() to return a formatted message.
|
* toString() to return a formatted message.
|
||||||
*
|
*
|
||||||
* @experimental
|
* @experimental
|
||||||
|
@ -308,7 +308,7 @@ export interface Diagnostic {
|
||||||
export type Diagnostics = Diagnostic[];
|
export type Diagnostics = Diagnostic[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A section of hover text. If the text is code then langauge should be provided.
|
* A section of hover text. If the text is code then language should be provided.
|
||||||
* Otherwise the text is assumed to be Markdown text that will be sanitized.
|
* Otherwise the text is assumed to be Markdown text that will be sanitized.
|
||||||
*/
|
*/
|
||||||
export interface HoverTextSection {
|
export interface HoverTextSection {
|
||||||
|
@ -318,7 +318,7 @@ export interface HoverTextSection {
|
||||||
readonly text: string;
|
readonly text: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The langauge of the source if `text` is a souce code fragment.
|
* The language of the source if `text` is a source code fragment.
|
||||||
*/
|
*/
|
||||||
readonly language?: string;
|
readonly language?: string;
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ export interface HoverTextSection {
|
||||||
export interface Hover {
|
export interface Hover {
|
||||||
/**
|
/**
|
||||||
* The hover text to display for the symbol at the hover location. If the text includes
|
* The hover text to display for the symbol at the hover location. If the text includes
|
||||||
* source code, the section will specify which langauge it should be interpreted as.
|
* source code, the section will specify which language it should be interpreted as.
|
||||||
*/
|
*/
|
||||||
readonly text: HoverTextSection[];
|
readonly text: HoverTextSection[];
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ export class DummyResourceLoader extends ResourceLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implemntation of a `LanguageServiceHost` for a TypeScript project.
|
* An implementation of a `LanguageServiceHost` for a TypeScript project.
|
||||||
*
|
*
|
||||||
* The `TypeScriptServiceHost` implements the Angular `LanguageServiceHost` using
|
* The `TypeScriptServiceHost` implements the Angular `LanguageServiceHost` using
|
||||||
* the TypeScript language services.
|
* the TypeScript language services.
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This file is not used to build this module. It is only used during editing
|
// This file is not used to build this module. It is only used during editing
|
||||||
// by the TypeScript language serivce and during build for verifcation. `ngc`
|
// by the TypeScript language service and during build for verifcation. `ngc`
|
||||||
// replaces this file with production index.ts when it rewrites private symbol
|
// replaces this file with production index.ts when it rewrites private symbol
|
||||||
// names.
|
// names.
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ export class DomEventsPlugin extends EventManagerPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// should call native delegate in case
|
// should call native delegate in case
|
||||||
// in some enviroment part of the application
|
// in some environment part of the application
|
||||||
// will not use the patched Event
|
// will not use the patched Event
|
||||||
delegate && delegate.apply(this, arguments);
|
delegate && delegate.apply(this, arguments);
|
||||||
};
|
};
|
||||||
|
@ -221,7 +221,7 @@ export class DomEventsPlugin extends EventManagerPlugin {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// not found in taskDatas, the callback may be added inside of ngZone
|
// not found in taskDatas, the callback may be added inside of ngZone
|
||||||
// use native remove listener to remove the calback
|
// use native remove listener to remove the callback
|
||||||
target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
|
target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import {HammerGestureConfig, HammerGesturesPlugin} from '@angular/platform-brows
|
||||||
expect(() => plugin.addGlobalEventListener('document', 'swipe', () => {})).not.toThrowError();
|
expect(() => plugin.addGlobalEventListener('document', 'swipe', () => {})).not.toThrowError();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shoud warn user and do nothing when Hammer.js not loaeded', () => {
|
it('should warn user and do nothing when Hammer.js not loaeded', () => {
|
||||||
spyOn(mockConsole, 'warn');
|
spyOn(mockConsole, 'warn');
|
||||||
|
|
||||||
expect(plugin.supports('swipe')).toBe(false);
|
expect(plugin.supports('swipe')).toBe(false);
|
||||||
|
|
|
@ -91,7 +91,7 @@ export class DominoAdapter extends BrowserDomAdapter {
|
||||||
getProperty(el: Element, name: string): any {
|
getProperty(el: Element, name: string): any {
|
||||||
if (name === 'href') {
|
if (name === 'href') {
|
||||||
// Domino tries tp resolve href-s which we do not want. Just return the
|
// Domino tries tp resolve href-s which we do not want. Just return the
|
||||||
// atribute value.
|
// attribute value.
|
||||||
return this.getAttribute(el, 'href');
|
return this.getAttribute(el, 'href');
|
||||||
} else if (name === 'innerText') {
|
} else if (name === 'innerText') {
|
||||||
// Domino does not support innerText. Just map it to textContent.
|
// Domino does not support innerText. Just map it to textContent.
|
||||||
|
@ -103,7 +103,7 @@ export class DominoAdapter extends BrowserDomAdapter {
|
||||||
setProperty(el: Element, name: string, value: any) {
|
setProperty(el: Element, name: string, value: any) {
|
||||||
if (name === 'href') {
|
if (name === 'href') {
|
||||||
// Even though the server renderer reflects any properties to attributes
|
// Even though the server renderer reflects any properties to attributes
|
||||||
// map 'href' to atribute just to handle when setProperty is directly called.
|
// map 'href' to attribute just to handle when setProperty is directly called.
|
||||||
this.setAttribute(el, 'href', value);
|
this.setAttribute(el, 'href', value);
|
||||||
} else if (name === 'innerText') {
|
} else if (name === 'innerText') {
|
||||||
// Domino does not support innerText. Just map it to textContent.
|
// Domino does not support innerText. Just map it to textContent.
|
||||||
|
|
|
@ -195,7 +195,7 @@ export class HttpAfterExampleModule {
|
||||||
declarations: [MyServerApp],
|
declarations: [MyServerApp],
|
||||||
imports: [ServerModule, HttpClientModule, HttpClientTestingModule],
|
imports: [ServerModule, HttpClientModule, HttpClientTestingModule],
|
||||||
})
|
})
|
||||||
export class HttpClientExmapleModule {
|
export class HttpClientExampleModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'app', template: `<img [src]="'link'">`})
|
@Component({selector: 'app', template: `<img [src]="'link'">`})
|
||||||
|
@ -562,7 +562,7 @@ class EscapedTransferStoreModule {
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should call mutliple render hooks', async(() => {
|
it('should call multiple render hooks', async(() => {
|
||||||
const consoleSpy = spyOn(console, 'warn');
|
const consoleSpy = spyOn(console, 'warn');
|
||||||
renderModule(MultiRenderHookModule, {document: doc}).then(output => {
|
renderModule(MultiRenderHookModule, {document: doc}).then(output => {
|
||||||
// title should be added by the render hook.
|
// title should be added by the render hook.
|
||||||
|
@ -675,14 +675,14 @@ class EscapedTransferStoreModule {
|
||||||
it('can inject HttpClient', async(() => {
|
it('can inject HttpClient', async(() => {
|
||||||
const platform = platformDynamicServer(
|
const platform = platformDynamicServer(
|
||||||
[{provide: INITIAL_CONFIG, useValue: {document: '<app></app>'}}]);
|
[{provide: INITIAL_CONFIG, useValue: {document: '<app></app>'}}]);
|
||||||
platform.bootstrapModule(HttpClientExmapleModule).then(ref => {
|
platform.bootstrapModule(HttpClientExampleModule).then(ref => {
|
||||||
expect(ref.injector.get(HttpClient) instanceof HttpClient).toBeTruthy();
|
expect(ref.injector.get(HttpClient) instanceof HttpClient).toBeTruthy();
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
it('can make HttpClient requests', async(() => {
|
it('can make HttpClient requests', async(() => {
|
||||||
const platform = platformDynamicServer(
|
const platform = platformDynamicServer(
|
||||||
[{provide: INITIAL_CONFIG, useValue: {document: '<app></app>'}}]);
|
[{provide: INITIAL_CONFIG, useValue: {document: '<app></app>'}}]);
|
||||||
platform.bootstrapModule(HttpClientExmapleModule).then(ref => {
|
platform.bootstrapModule(HttpClientExampleModule).then(ref => {
|
||||||
const mock = ref.injector.get(HttpTestingController) as HttpTestingController;
|
const mock = ref.injector.get(HttpTestingController) as HttpTestingController;
|
||||||
const http = ref.injector.get(HttpClient);
|
const http = ref.injector.get(HttpClient);
|
||||||
ref.injector.get<NgZone>(NgZone).run(() => {
|
ref.injector.get<NgZone>(NgZone).run(() => {
|
||||||
|
@ -697,7 +697,7 @@ class EscapedTransferStoreModule {
|
||||||
it('requests are macrotasks', async(() => {
|
it('requests are macrotasks', async(() => {
|
||||||
const platform = platformDynamicServer(
|
const platform = platformDynamicServer(
|
||||||
[{provide: INITIAL_CONFIG, useValue: {document: '<app></app>'}}]);
|
[{provide: INITIAL_CONFIG, useValue: {document: '<app></app>'}}]);
|
||||||
platform.bootstrapModule(HttpClientExmapleModule).then(ref => {
|
platform.bootstrapModule(HttpClientExampleModule).then(ref => {
|
||||||
const mock = ref.injector.get(HttpTestingController) as HttpTestingController;
|
const mock = ref.injector.get(HttpTestingController) as HttpTestingController;
|
||||||
const http = ref.injector.get(HttpClient);
|
const http = ref.injector.get(HttpClient);
|
||||||
ref.injector.get<NgZone>(NgZone).run(() => {
|
ref.injector.get<NgZone>(NgZone).run(() => {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {PostMessageBus, PostMessageBusSink, PostMessageBusSource} from '@angular
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns a PostMessageBus thats sink is connected to its own source.
|
* Returns a PostMessageBus that's sink is connected to its own source.
|
||||||
* Useful for testing the sink and source.
|
* Useful for testing the sink and source.
|
||||||
*/
|
*/
|
||||||
export function createConnectedMessageBus(): MessageBus {
|
export function createConnectedMessageBus(): MessageBus {
|
||||||
|
|
|
@ -31,7 +31,7 @@ let lastCreatedRenderer: Renderer2;
|
||||||
if (!getDOM().supportsDOMEvents()) return;
|
if (!getDOM().supportsDOMEvents()) return;
|
||||||
// TODO(tbosch): investigate why this is failing on iOS7 for unrelated reasons
|
// TODO(tbosch): investigate why this is failing on iOS7 for unrelated reasons
|
||||||
// Note: it's hard to debug this as SauceLabs starts with iOS8. Maybe drop
|
// Note: it's hard to debug this as SauceLabs starts with iOS8. Maybe drop
|
||||||
// iOS7 alltogether?
|
// iOS7 altogether?
|
||||||
if (browserDetection.isIOS7) return;
|
if (browserDetection.isIOS7) return;
|
||||||
|
|
||||||
let uiRenderStore: RenderStore;
|
let uiRenderStore: RenderStore;
|
||||||
|
|
|
@ -38,7 +38,7 @@ describe('ParamsMap', () => {
|
||||||
expect(map.get('name')).toEqual(null);
|
expect(map.get('name')).toEqual(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return `[]` when a mulitple valued element is absent', () => {
|
it('should return `[]` when a multiple valued element is absent', () => {
|
||||||
const map = convertToParamMap({});
|
const map = convertToParamMap({});
|
||||||
expect(map.getAll('name')).toEqual([]);
|
expect(map.getAll('name')).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
|
@ -85,7 +85,7 @@ describe('UrlTree', () => {
|
||||||
expect(containsTree(t1, t2, false)).toBe(true);
|
expect(containsTree(t1, t2, false)).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return true container has its paths splitted into multiple segments', () => {
|
it('should return true container has its paths split into multiple segments', () => {
|
||||||
const t1 = serializer.parse('/one/(two//left:three)');
|
const t1 = serializer.parse('/one/(two//left:three)');
|
||||||
const t2 = serializer.parse('/one/two');
|
const t2 = serializer.parse('/one/two');
|
||||||
expect(containsTree(t1, t2, false)).toBe(true);
|
expect(containsTree(t1, t2, false)).toBe(true);
|
||||||
|
|
Loading…
Reference in New Issue