Commit Graph

535 Commits

Author SHA1 Message Date
Andrew Kushnir add1198b88 fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir bc1f2d6411 fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir d7326d81ba fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir c683f74225 feat(ivy): fixed typo in test case description 2018-09-27 11:52:07 -07:00
Andrew Kushnir b286abeabe feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Kara Erickson 6a62ed2245 fix(ivy): objects like ElementRef should not use a special injection fn (#26064)
PR Close #26064
2018-09-25 12:51:29 -07:00
Pete Bacon Darwin 23ec88ef23 refactor(ivy): remove unreferenced utils file (#26076)
PR Close #26076
2018-09-24 11:39:52 -07:00
Alan Agius d7e5bbf2d0 feat(compiler-cli): add support to extend `angularCompilerOptions` (#22717)
`TypeScript` only supports merging and extending of `compilerOptions`. This is an implementation to support extending and inheriting of `angularCompilerOptions` from multiple files.

Closes: #22684

PR Close #22717
2018-09-19 16:17:28 -07:00
Pete Bacon Darwin 9b1bb370a3 fix(ivy): ngcc should compile entry-points in the correct order (#25862)
The compiler should process all an entry-points dependencies
before processing that entry-point.

PR Close #25862
2018-09-18 13:06:28 -07:00
Pete Bacon Darwin 976389836e build: update node type version (#25862)
PR Close #25862
2018-09-18 13:06:28 -07:00
Pete Bacon Darwin f76a9ad156 style(ivy): remove unused import (#25862)
PR Close #25862
2018-09-18 13:06:28 -07:00
Pete Bacon Darwin 6f1100a7e9 refactor(ivy): use `canonical-path` in ngcc (#25862)
It turns out that `path.posix` does not always reliably
return forward slash paths on Windows.

PR Close #25862
2018-09-18 13:06:28 -07:00
Greg Magolan b99d7ed5bf build(bazel): update to rules_typescript 0.17.0 & rules_nodejs 0.13.4 (#25920)
PR Close #25920
2018-09-18 13:05:38 -07:00
Alex Eagle bdbb2f9bfa ci: update to bazel 0.17 (#25967)
this includes support for @ character in labels, which we need for fine-grained deps

PR Close #25967
2018-09-17 12:51:52 -07:00
cexbrayat 21009b06a1 fix(ivy): use proper sanitizer names (#25817)
Fixes #25816

PR Close #25817
2018-09-11 16:22:38 -07:00
Miško Hevery d5bd86ae5d fix(ivy): don't accidently read the inherited definition (#25736)
Create getter methods `getXXXDef` for each definition which
uses `hasOwnProperty` to verify that we don't accidently read form the
parent class.

Fixes: #24011
Fixes: #25026

PR Close #25736
2018-09-11 07:09:38 -07:00
Alex Rickabaugh 96d6b79ada feat(ivy): resolve references to vars in .d.ts files (#25775)
Previously, if ngtsc encountered a VariableDeclaration without an
initializer, it would assume that the variable was undefined, and
return that result.

However, for symbols exported from external modules that resolve to
.d.ts files, variable declarations are of the form:

export declare let varName: Type;

This form also lacks an initializer, but indicates the presence of an
importable symbol which can be referenced. This commit changes the
static resolver to understand variable declarations with the 'declare'
keyword and to generate references when it encounters them.

PR Close #25775
2018-09-11 06:53:21 -07:00
Alex Rickabaugh 13ccdfd89d feat(ivy): support bootstrap in ngModuleDef (#25775)
The bootstrap property of @NgModule was not previously compiled by
the compiler in AOT or JIT modes (in Ivy). This commit adds support
for bootstrap.

PR Close #25775
2018-09-11 06:53:21 -07:00
Alex Rickabaugh a0c4b2d8f0 fix(ivy): add @nocollapse when writing closure-annotated code (#25775)
Closure requires @nocollapse on Ivy definition static fields in order
to not convert them to standalone constants. However tsickle, the tool
which would ordinarily be responsible for adding @nocollapse, doesn't
properly annotate fields which are added synthetically via transforms.
So this commit adds @nocollapse by applying regular expressions against
code during the final write to disk.

PR Close #25775
2018-09-11 06:53:21 -07:00
Matias Niemelä e3633888ed feat(ivy): support animation @triggers in templates (#25849)
PR Close #25849
2018-09-10 13:59:27 -07:00
Matias Niemelä d2dfd48be0 feat(ivy): patch animations into metadata (#25828)
PR Close #25828
2018-09-07 13:46:06 -07:00
Alex Eagle 34ec9244a6 build: update to Node 10 (#25822)
PR Close #25822
2018-09-06 14:58:30 -07:00
Pete Bacon Darwin d96e962da3 test(ivy): mock the filesystem in ngcc main() integration tests (#25557)
Bazel does not like the filesystem being modified.
This commit a temporary mock filesystem that can be modified as needed.

PR Close #25557
2018-09-05 11:35:47 -07:00
Pete Bacon Darwin b0cb134815 feat(ivy): implement ngcc build marker (#25557)
`ngcc` adds marker files to each folder that has been
compiled, containing the version of the ngcc used.

When compiling, it will ignore folders that contain these
marker files, as long as the version matches.

PR Close #25557
2018-09-05 11:35:47 -07:00
Alex Rickabaugh cc29b9cf93 fix(ivy): use globally unique names for i18n constants (#25689)
Closure compiler requires that the i18n message constants of the form

const MSG_XYZ = goog.getMessage('...');

have names that are unique across an entire compilation, even if the
variables themselves are local to a given module. This means that in
practice these names must be unique in a codebase.

The best way to guarantee this requirement is met is to encode the
relative file name of the file into which the constant is being written
into the constant name itself. This commit implements that solution.

PR Close #25689
2018-09-04 12:09:29 -07:00
Pawel Kozlowski 6def18a95e fix(ivy): support directive outputs on ng-template (#25717)
Compiler part of #25698
Fixes #25697

PR Close #25717
2018-08-31 13:37:16 -07:00
Greg Magolan 31349fde90 build(bazel): make resolveTypeReferenceDirectives override work with both ts 2.9 & ts 3.0 (#25581)
PR Close #25581
2018-08-31 11:12:03 -07:00
Greg Magolan 910381ddbd build(bazel): fix bazel types reference directive resolves (#25581)
PR Close #25581
2018-08-31 11:12:03 -07:00
Pete Bacon Darwin 20b9c61d4c perf(ivy): speed up ngcc ivy switch processing (#25534)
Only parse the AST for ngcc ivy switch constants
if the marker is not found in the module text.

PR Close #25534
2018-08-31 09:47:50 -07:00
Pete Bacon Darwin e964319fe9 test(ivy): test `Esm5Renderer.getSwitchableDeclarations` (#25534)
Also incorporates a refactoring of the tests to make them less fragile.

PR Close #25534
2018-08-31 09:47:50 -07:00
Pete Bacon Darwin 26cd9f5433 feat(ivy): implement `Renderer.getSwitchableDeclarations` (#25534)
This supports the "ngcc ivy switch" specified in #25238.

PR Close #25534
2018-08-31 09:47:50 -07:00
Pete Bacon Darwin e73e864f87 test(ivy): refactor Esm5Renderer tests to make them less fragile (#25534)
PR Close #25534
2018-08-31 09:47:50 -07:00
Pete Bacon Darwin 73047483a1 test(ivy): refactor Esm2015Renderer tests to make them less fragile (#25534)
PR Close #25534
2018-08-31 09:47:50 -07:00
Pete Bacon Darwin 6f168b7a0f feat(ivy): implement `NgccReflectionHost.getSwitchableDeclarations()` (#25534)
This method will be used to find all the places where the "ivy switch"
will occur. See #25238

PR Close #25534
2018-08-31 09:47:49 -07:00
Alex Rickabaugh a469c2c412 feat(ivy): produce contextual diagnostics in ngtsc mode (#25647)
TypeScript has a more modern diagnostic emit function which produces
contextually annotated error information, using colors in the console
to indicate where in the code the error occurs.

This commit swiches ngtsc to use this format for diagnostics when
emitting them after a failed compilation.

PR Close #25647
2018-08-31 09:43:31 -07:00
Alex Rickabaugh 38f624d7e3 feat(ivy): output diagnostics for many errors in ngtsc (#25647)
This commit takes the first steps towards ngtsc producing real
TypeScript diagnostics instead of simply throwing errors when
encountering incorrect code.

A new class is introduced, FatalDiagnosticError, which can be thrown by
handlers whenever a condition in the code is encountered which by
necessity prevents the class from being compiled. This error type is
convertable to a ts.Diagnostic which represents the type and source of
the error.

Error codes are introduced for Angular errors, and are prefixed with -99
(so error code 1001 becomes -991001) to distinguish them from other TS
errors.

A function is provided which will read TS diagnostic output and convert
the TS errors to NG errors if they match this negative error code
format.

PR Close #25647
2018-08-31 09:43:30 -07:00
Kara Erickson b424b3187e fix(compiler): add hostVars and support pure functions in host bindings (#25626)
PR Close #25626
2018-08-31 09:42:58 -07:00
Marc Laval 00f13110be feat(ivy): support injecting Renderer2 (#25523)
PR Close #25523
2018-08-31 09:42:36 -07:00
Alex Eagle 29761ea5f8 refactor(compiler-cli): remove tsickle from dependencies (#25649)
Users can still install tsickle if they want closure-compatible output.

PR Close #25649
2018-08-28 16:44:43 -04:00
Alex Eagle a22fb91e1a refactor(compiler-cli): remove a test that we no longer care about (#25649)
Alex R. says that we no longer care about the behavior this is testing.

PR Close #25649
2018-08-28 16:44:43 -04:00
Igor Minar 317d40d879 test(compiler-cli): improve testing harness for incremental compilation (#25275)
In tsc 3.0 the check that enables program structure reuse in tryReuseStructureFromOldProgram has changed
and now uses identity comparison on arrays within CompilerOptions. Since we recreate the options
on each incremental compilation, we now fail this check.

After this change the default set of options is reused in between incremental compilations, but we still
allow options to be overriden if needed.

PR Close #25275
2018-08-27 21:07:53 -04:00
Alex Rickabaugh ab32ac6bb7 test(compiler-cli): fix the incremental ngc tests so that they run under bazel (#25275)
PR Close #25275
2018-08-27 21:07:53 -04:00
Alan Agius 5653fada32 feat: add TypeScript 3 support (#25275)
PR Close #25275
2018-08-27 21:07:53 -04:00
Pawel Kozlowski 6a0f78fabf fix(ivy): match directives on bindings and element outputs (#25614)
Closes #23560

PR Close #25614
2018-08-27 18:17:25 -04:00
Matias Niemelä a37bcc3bfe feat(ivy): bridge component styles into the component renderer (#25255)
PR Close #25255
2018-08-23 16:51:15 -04:00
Alex Rickabaugh eb1fe19088 fix(ivy): ngtsc directive compilation should use shared ConstantPool (#25620)
This fixes a bug in ngtsc where each @Directive was compiled using a
separate ConstantPool. This resulted in two issues:

* Directive constants were not shared across the file
* Extra statements from directive compilation were dropped instead of
added to the file

This commit fixes both issues and adds a test to verify @Directive is
working properly.

PR Close #25620
2018-08-22 21:14:54 -04:00
Kara Erickson 27e2039630 fix(compiler): update compiler to generate new slot allocations (#25607)
PR Close #25607
2018-08-22 21:08:39 -04:00
Alex Rickabaugh 5c95b4b3a3 feat(ivy): support enum values in static resolution (#25619)
This commit adds support for enumeration values. An enumeration value
is now a first-class return value of the resolver, which provides both
a Reference to the enum type itself and the name of the value from that
enum. Resolving an enum itself returns a Map<string, EnumValue>.

PR Close #25619
2018-08-22 19:30:23 -04:00
Pete Bacon Darwin 7500f0eafb feat(ivy): find all packages to be compiled by ngcc (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
Pete Bacon Darwin 68acc5b355 feat(ivy): compile all package formats in ngcc (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
Pete Bacon Darwin 7d3b70c2af fix(ivy): ngcc is resilient to bad source-map comments (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
Pete Bacon Darwin 7ce291c72a feat(ivy): implement `Esm5ReflectionHost.getGenericArityOfClass()` (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
Pete Bacon Darwin 6ae1e63c89 refactor(ivy): rename `Esm2015ReflectionHost` to `Fesm2015ReflectionHost` (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
Alex Rickabaugh d33e0091df fix(ivy): emit generic types when needed in defs in .d.ts file (#25406)
Ivy definitions in .d.ts files often reference the type of a class.
Sometimes, those classes have generic type parameters. When this is
the case, ngtsc needs to emit generic type parameters in the .d.ts
files (usually by passing 'any').

PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas b97d770e60 feat(ivy): add support for typings in ngcc (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas a3158bff27 refactor(ivy): minor re-organization of ngcc `PackageTransformer#transform` (#25406)
In preparation of adding support for transforming `.d.ts` files.

PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas d6e91ba545 feat(ivy): support getting the corresponding `.d.ts` file in ngcc (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas cdb0215d0b test(ivy): clean up ngcc spec (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas 396766104b refactor(ivy): rename spec files to match corresponding source files (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas e77f0fd6e6 refactor(ivy): export ngcc import prefix into constant (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas cdd4c9be63 feat(ivy): support custom prefix for imports in `DtsFileTransformer` (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas 29705dd8f2 refactor(ivy): make `ReflectionHost` a parameter of `Renderer` (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
George Kalpakas ea68ba048a refactor(ivy): minor refactorings (#25406)
PR Close #25406
2018-08-22 19:28:55 -04:00
George Kalpakas 9081efa961 feat(ivy): enable processing of esm5 format in ngcc (#25406)
PR Close #25406
2018-08-22 19:28:55 -04:00
George Kalpakas 9e179cb311 fix(ivy): correctly detect classes in ngcc `Esm5ReflectionHost` (#25406)
PR Close #25406
2018-08-22 19:28:55 -04:00
George Kalpakas 3211432d2a feat(ivy): add support for esm2015 and esm5 in ngcc `PackageParser` (#25406)
Since non-flat module formats (esm2015, esm5) have different structure
than their flat counterparts (and since we are operating on JS files
inside `node_modules/`, we need to configure TS to include deeply nested
JS files (by specifying a sufficiently high `maxNodeModuleJsDepth`).

Remains to be determined if this has any (noticeable) performance
implications.

PR Close #25406
2018-08-22 19:28:55 -04:00
George Kalpakas a7134dbc37 refactor(ivy): remove unused arg from ngcc `Analyzer` (#25406)
PR Close #25406
2018-08-22 19:28:55 -04:00
Pete Bacon Darwin a528636f56 fix(ivy): allow `FunctionExpression` to indicate a method declaration (#25406)
In some code formats (e.g. ES5) methods can actually be function
expressions. For example:

```js
function MyClass() {}
// this static method is declared as a function expression
MyClass.staticMethod = function() { ... };
```

PR Close #25406
2018-08-22 19:28:55 -04:00
Pete Bacon Darwin f87b499dde feat(ivy): implement `getDefinitionOfFunction` on ES2015 and ES5 reflection hosts (#25406)
PR Close #25406
2018-08-22 19:28:55 -04:00
Alex Rickabaugh a45f2bfb8f feat(ivy): use the ReflectionHost to resolve parameters and initializers (#25406)
ngtsc's static resolver can evaluate function calls where parameters
have default values. In TypeScript code these default values live on the
function definition, but in ES5 code the default values are represented
by statements in the function body.

A new ReflectionHost method getDefinitionOfFunction() abstracts over
this difference, and allows the static reflector to more accurately
evaluate ES5 code.

PR Close #25406
2018-08-22 19:28:55 -04:00
Marc Laval 6176974832 test(compiler-cli): fix failing test after bad merge (#25599)
PR Close #25599
2018-08-21 11:30:42 -07:00
Pawel Kozlowski 11e2d9da1a feat(ivy): add support to template local refs in the compiler (#25576)
Fixes #23316

PR Close #25576
2018-08-20 16:24:56 -07:00
Kara Erickson 21a14407f6 refactor(ivy): generate vars in component defs (#25562)
PR Close #25562
2018-08-20 11:08:10 -07:00
Kara Erickson f2aa9c6a7f refactor(ivy): use generated consts value to set binding index (#25533)
PR Close #25533
2018-08-17 14:32:55 -07:00
Miško Hevery 116946fb11 style: tslint enforces no debugger statements left behind (#25532)
PR Close #25532
2018-08-16 16:00:22 -07:00
Kara Erickson 6482f6f0fe refactor(ivy): separate container into 2 instructions (#25509)
PR Close #25509
2018-08-16 13:47:14 -07:00
Greg Magolan 9605456b66 build: refactor ambient node & jasmine types so they are only included where needed (#25491)
PR Close #25491
2018-08-16 13:46:43 -07:00
Miško Hevery 9ee6702fa9 refactor(ivy): remove short instruction names as they provide no value (#25493)
PR Close #25493
2018-08-16 11:04:34 -07:00
Ben Lesh a0a29fdd27 feat(ivy): Add AOT handling for bare classes with Input and Output decorators (#25367)
PR Close #25367
2018-08-14 16:36:18 -07:00
Alex Rickabaugh 26066f282e fix(ivy): consider exported modules from other compilation scopes (#25425)
PR Close #25425
2018-08-14 14:23:24 -07:00
Alex Rickabaugh b40c437379 fix(ivy): ensure factory statements are emitted correctly (#25425)
A small bug caused base factory variable statements for @Component to
not be emitted properly. At the same time as this is fixed, those
statements are now emitted as const.

PR Close #25425
2018-08-14 14:23:24 -07:00
Kara Erickson 4a4d6fb0e6 test(ivy): compiler compliance tests should support ? (#25435)
PR Close #25435
2018-08-10 17:12:18 -07:00
Pawel Kozlowski 2d759927d4 feat(ivy): add support for ng-container in the compiler (#25383)
PR Close #25383
2018-08-09 13:13:04 -07:00
Alex Rickabaugh 33fd7e0784 fix(ivy): export NgModuleFactory via r3_symbols for core factories (#25392)
When @angular/core is compiled by ngtsc, a factory file is generated
for ApplicationModule, that is currently invalid because r3_symbols
does not export NgModuleFactory. This change fixes that issue and
ensures the generated ngfactory file for @angular/core is valid.

PR Close #25392
2018-08-09 09:58:13 -07:00
Alex Rickabaugh 2befc65777 fix(ivy): ngtsc should pay attention to declaration order (#25392)
When generating the 'directives:' property of ngComponentDef, ngtsc
needs to be conscious of declaration order. If a directive being
written into the array is declarated after the component currently
being compiled, then the entire directives array needs to be wrapped
in a closure.

This commit fixes ngtsc to pay attention to such ordering issues
within directives arrays.

PR Close #25392
2018-08-09 09:58:13 -07:00
Alex Rickabaugh 6f085f8610 fix(ivy): add missing exportAs field to ngDirectiveDef (#25392)
This commit includes the missing exportAs field from @Directive and
propagates it into the ngDirectiveDef.

PR Close #25392
2018-08-09 09:58:13 -07:00
Alex Rickabaugh 5be186035f feat(ivy): enable inheritance of factory functions in definitions (#25392)
This commit creates an API for factory functions which allows them
to be inherited from one another. To do so, it differentiates between
the factory function as a wrapper for a constructor and the factory
function in ngInjectableDefs which is determined by a default
provider.

The new form is:

factory: (t?) => new (t || SomeType)(inject(Dep1), inject(Dep2))

The 't' parameter allows for constructor inheritance. A subclass with
no declared constructor inherits its constructor from the superclass.
With the 't' parameter, a subclass can call the superclass' factory
function and use it to create an instance of the subclass.

For @Injectables with configured providers, the factory function is
of the form:

factory: (t?) => t ? constructorInject(t) : provider();

where constructorInject(t) creates an instance of 't' using the
naturally declared constructor of the type, and where provider()
creates an instance of the base type using the special declared
provider on @Injectable.

PR Close #25392
2018-08-09 09:58:13 -07:00
Alex Rickabaugh fba276d3d1 fix(ivy): use a single constant pool per source file (#25392)
Previously, ngtsc used a new ConstantPool for each decorator
compilation. This could result in collisions between constants in the
top-level scope.

Now, ngtsc uses a single ConstantPool for each source file being
compiled, and merges the constant statements into the file after the
import section.

PR Close #25392
2018-08-09 09:58:13 -07:00
Alex Eagle a3f1e2cb42 style: format .bzl files with buildifier (#23544)
PR Close #23544
2018-08-08 13:12:07 -07:00
Ádám Lippai c6e5b971d6 fix(compiler-cli): use the oldProgram option in watch mode (#21364)
The performCompilation() is always called with an undefined oldProgram option (even in watch mode).
This was regression introduced in: 957be960d2

Partial fix, discovered in: #21361

PR Close #21364
2018-08-07 11:58:38 -07:00
Alex Rickabaugh fefc860f35 fix(ivy): fix bug with banana-in-a-box expressions in nested templates (#25321)
Inside of a nested template, an attempt to generate code for a banana-
in-a-box expression would cause a crash in the _AstToIrVisitor, as it
was not handling the case where a write would be generated to a local
variable.

This change supports such a mode of operation.

PR Close #25321
2018-08-07 11:45:32 -07:00
Victor Berchet 795e1e8a38 test(ivy): improve error message for the compiler compliance test (#25291)
before:

```
Expected to find features 'import * as i0 from "@angular/core";
import { Directive, Input } from '@angular/core';

```

after:

```
Failed to find "template" after "...Component_Factory() { return new
MyComponent(); }," in:
'import * as i0 from "@angular/core";
import { Directive, Input } from '@angular/core';```

```

PR Close #25291
2018-08-05 15:31:19 -07:00
Victor Berchet 1e7ca22078 refactor(ivy): make all directives public by default (#25291)
To match the View Engine behavior.

We should make this configurable so that the node injector is tree shaken when
directives do not need to be published.

PR Close #25291
2018-08-05 15:31:19 -07:00
Kara Erickson 79a9c71422 test(ivy): remove unnecessary common import (#25297)
PR Close #25297
2018-08-03 14:34:02 -07:00
Alex Rickabaugh eb999300d9 test(ivy): run compiler compliance tests without rebuilding core,common (#25248)
Previously the compiler compliance tests ran and built test code with
real dependencies on @angular/core and @angular/common. This meant that
any changes to the compiler would result in long rebuild processes
for tests to rerun.

This change removes those dependencies and causes test code to be built
against the fake_core stub of @angular/core that the ngtsc tests use.
This change also removes the dependency on @angular/common entirely, as
locality means it's possible to reference *ngIf without needing to link
to an implementation.

PR Close #25248
2018-08-03 13:08:51 -07:00
Alex Rickabaugh 0822dc70f2 feat(ivy): generate .ngfactory stubs if requested (#25176)
Existing bootstrap code in the wild depends on the existence of
.ngfactory files, which Ivy does not need. This commit adds the
capability in ngtsc to generate .ngfactory files which bridge
existing bootstrap code with Ivy.

This is an initial step. Remaining work includes complying with
the compiler option to specify a generated file directory, as well
as presumably testing in g3.

PR Close #25176
2018-08-03 09:42:06 -07:00
Victor Berchet 728d98d3a9 fix(ivy): add bound proerties name to template (#25272)
Before this change bound properties would not be used when matching directives
at runtime.

That is `<ng-template [ngIf]=cond>...</ng-template>` would not trigger the
`ngIf` directive.

PR Close #25272
2018-08-02 22:59:04 -07:00
Martin Probst 01e6dab544 fix(compiler-cli): correct realPath to realpath. (#25023)
The optional property on `ts.CompilerHost` is called `realpath` (lower
case), not `realPath` (lower camel case).

It is not clear to me what the impact of this is, but the author's
intent was clearly to override `realpath`.

PR Close #25023
2018-08-01 10:54:51 -07:00
Kara Erickson c8a4fb1faf fix(ivy): walk declaration views in listener (#25228)
PR Close #25228
2018-07-31 16:35:20 -07:00
Carlos Ortiz Garcia e99d860393 feat(compiler): add "original" placeholder value on extracted XMB (#25079)
Update XMB placeholders(<ph>) to include the original value on top of an
example. Placeholders can by definition have one example(<ex>) tag and a
text node. The text node is used by TC as the "original" value from the
placeholder, while the example should represent a dummy value.
For example: <ph name="PET"><ex>Gopher</ex>{{ petName }}</ph>.
This change makes sure that we have the original text, but it *DOES NOT*
make sure that the example is correct. The example has the same wrong
behavior of showing the interpolation text rather than a useful
example.

No breaking changes, but tools that depend on the previous behavior and
don't consider the full XMB definition may fail to parse the XMB.
Fixes b/72565847

PR Close #25079
2018-07-30 16:49:00 -07:00