313 Commits

Author SHA1 Message Date
Kara Erickson
e2e80ec61c refactor(ivy): remove pipe references from the template ()
PR Close 
2018-03-28 09:17:27 -07:00
Kara Erickson
5a86f7144f fix(ivy): store local variables in data instead of calling loadDirective ()
PR Close 
2018-03-28 09:17:05 -07:00
Alex Rickabaugh
884bf0ef09 fix: consistently rewrite Injector to INJECTOR ()
In Ivy mode we rewrite references to Injector to INJECTOR in ngInjectableDef, to fix tree-shaking.

This changes the rewrite to happen always, even in non-Ivy mode, and makes Angular understand
INJECTOR across the board at runtime.

PR Close 
2018-03-28 09:14:32 -07:00
Veres Lajos
de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer ()
PR Close 
2018-03-27 14:51:53 -04:00
Kara Erickson
f739f756ce test(ivy): fix flaky tests ()
PR Close 
2018-03-27 14:48:50 -04:00
Kara Erickson
910a16a1ff refactor(ivy): remove directive references from template ()
PR Close 
2018-03-26 22:33:23 -04:00
Alex Rickabaugh
6f0191744c fix(core): don't override ngInjectableDef in the decorator if present on the type ()
Previously, @Injectable() would generate an ngInjectableDef on the type it was
decorating, even if that type already had a compiled ngInjectableDef, overwriting
the compiled version.

PR Close 
2018-03-23 16:13:06 -04:00
Misko Hevery
b9cbe83104 docs(ivy): update STATUS.md with compiler work breakdown ()
PR Close 
2018-03-23 15:04:55 -04:00
Kara Erickson
49396ca2ae refactor(ivy): move directives into separate array ()
PR Close 
2018-03-22 21:23:02 -04:00
Kara Erickson
e44f69c387 refactor(ivy): move dir flags to tnode ()
PR Close 
2018-03-22 19:19:40 -04:00
Matias Niemelä
d77bb460b0 revert: docs(ivy): update STATUS.md with compiler work breakdown ()
This reverts commit b524e4b142eb1e7dd52ce6b239ef1ee825e2b42c.
2018-03-22 18:09:45 -04:00
Misko Hevery
b524e4b142 docs(ivy): update STATUS.md with compiler work breakdown ()
PR Close 
2018-03-22 18:01:38 -04:00
Miško Hevery
17fb9832f4 fix(ivy): fix type error in newer version of TS ()
Newer version of TS is stricter about types and flags counter-variant
types in some  situations. This change inlines the DirectiveDefArgs
into the arguments which:
1) removes the inheritance which caused the issue and
2) Makes it more friendly to IDEs since they will not report comments.

Closes 
Closes 

PR Close 
2018-03-20 15:49:45 -07:00
Igor Minar
b43f8bc7d3 feat(core): upgrade rxjs to 6.0.0-alpha.4 ()
PR Close 
2018-03-19 21:51:51 -07:00
Misko Hevery
fc50c77bd3 test(ivy): switch HelloWorld to ivy compiler ()
PR Close 
2018-03-19 16:00:38 -07:00
Igor Minar
0bede54b2d style: fix formatting issues on the master branch ()
PR Close 
2018-03-18 14:03:26 -07:00
Kara Erickson
e27cfd6236 refactor(ivy): split up directiveCreate for tree shaking ()
PR Close 
2018-03-18 11:56:35 -07:00
Kara Erickson
1612985e48 refactor(ivy): allow tick and deps to be tree-shaken ()
PR Close 
2018-03-18 11:47:44 -07:00
Kara Erickson
4f21d373b7 refactor(ivy): move hostBindings calls out of template ()
PR Close 
2018-03-18 11:41:39 -07:00
Miško Hevery
f258ec67bf docs(ivy): update status of ivy ()
PR Close 
2018-03-16 22:20:21 -07:00
Alex Rickabaugh
6ef9f2278f feat(ivy): @NgModule -> ngInjectorDef compilation ()
This adds compilation of @NgModule providers and imports into
ngInjectorDef statements in generated code. All @NgModule annotations
will be compiled and the @NgModule decorators removed from the
resultant js output.

All @Injectables will also be compiled in Ivy mode, and the decorator
removed.

PR Close 
2018-03-16 12:57:11 -07:00
Chuck Jazdzewski
cedc04c320 docs(ivy): document project status ()
Moves the status reporting from the issue  to a file that
can be updated as changes are being made. This addresses one of the
comments on the issue and allows better tracking of updates to this
status and changes made.

PR Close 
2018-03-16 11:27:15 -07:00
Kara Erickson
bafdad9083 fix(ivy): cache local names and support multiple locals with same value ()
PR Close 
2018-03-16 11:26:38 -07:00
Victor Berchet
0ebd577db4 refactor(compiler): Drop support for the deprecated <template>. Use <ng-template> instead ()
BREAKING CHANGE:

The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when
using Web Components).

This commit removes support for `<template>`. `<ng-template>` should be used
instead.

BEFORE:

    <!-- html template -->
    <template>some template content</template>

    # tsconfig.json
    {
      # ...
      "angularCompilerOptions": {
        # ...
        # This option is no more supported and will have no effect
        "enableLegacyTemplate": [true|false]
      }
    }

AFTER:

    <!-- html template -->
    <ng-template>some template content</ng-template>

PR Close 
2018-03-15 14:52:22 -07:00
Kara Erickson
4e6ac185e5 refactor(ivy): double size of DI bloom filter ()
PR Close 
2018-03-15 14:49:39 -07:00
Kara Erickson
e55bf8fa79 refactor(ivy): access component def through tData ()
PR Close 
2018-03-15 14:49:23 -07:00
Miško Hevery
112431db69 test(ivy): add canonical compiler spec for class/style ()
Adds a stub for `elementStyle` and `elementClass` instruction
with a canonical spec for the compiler. The spec shows the the
compiler should be using `elementStyle` and `elementClass` instruction
in place of `[class]` and `[style]` bindings respectively.
PR Close 
2018-03-14 12:59:52 -07:00
Miško Hevery
a0a01f1e1e refactor(ivy): rename class/style to make space for new instruction ()
Rename:
- `elementClass` (short: `k`) => `elementClassNamed` (short: `kn`)
- `elementStyle` (short: `s`) => `elementStyleNamed` (short: `sn`)

Currently `[class.name]` is `elementClass(0, ‘name’, value)`. We would
like to introduce new binding `[class]` which needs a new instruction
ideally `elementClass(0, value)`. Doing the rename creates space
to create such an instruction in subsequent change.

PR Close 
2018-03-14 12:59:52 -07:00
Miško Hevery
ae19d071bb test(ivy): add ComponentFixture for cleaner tests. ()
PR Close 
2018-03-14 12:59:52 -07:00
Matias Niemelä
f5a98f41fe fix(core): remove core animation import symbols ()
This patch removes the deprecated support for animation
symbol imports from @angular/core.

BREAKING CHANGE: it is no longer possible to import
animation-related functions from @angular/core. All
animation symbols must now be imported from @angular/animations.

PR Close 
2018-03-14 12:23:51 -07:00
Pawel Kozlowski
c09bd67aee fix(ivy): fix views manipulation logic ()
This commit fixes a bug that would result in views insert / remove
even if a view needed only refresh operation.

The crux of the bug was that we were looking for a view to update
only in the LContainer.nextIndex position. This is incorrect as a
view with a given block id could be present later in the views
array (this happens if we about to remove a view in the middle of
the views array).

The code in this fix searches for a view to update in the views array and
can remove views in the middle of the views collection. Previously we
would remove views at the end of the collection only.

PR Close 
2018-03-14 12:07:15 -07:00
Michael Giambalvo
37fedd001c feat(core): add task tracking to Testability ()
Allow passing an optional timeout to Testability's whenStable(). If
specified, if Angular is not stable before the timeout is hit, the
done callback will be invoked with a list of pending macrotasks.

Also, allows an optional update callback, which will be invoked whenever
the set of pending macrotasks changes. If this callback returns true,
the timeout will be cancelled and the done callback will not be invoked.

If the optional parameters are not passed, whenStable() will work
as it did before, whether or not the task tracking zone spec is
available.

This change also migrates the Testability unit tests off the deprecated
AsyncTestCompleter.

PR Close 
2018-03-14 08:48:48 -07:00
Kara Erickson
b1365d1fa8 refactor(ivy): remove directiveRefresh instruction ()
PR Close 
2018-03-13 23:29:21 -07:00
Kara Erickson
bd9d4df735 refactor(ivy): remove inputsPropertyName ()
Closes 

PR Close 
2018-03-13 13:26:15 -07:00
Matias Niemelä
58b94e6f5e feat(animations): expose element and params within transition matchers ()
PR Close 
2018-03-13 09:42:24 -07:00
Alex Rickabaugh
db56836425 feat: tree-shakeable providers API updates ()
Rename @Injectable({scope -> providedIn}).

Instead of {providedIn: APP_ROOT_SCOPE}, accept {providedIn: 'root'}.
Also, {providedIn: null} implies the injectable should not be added
to any scope.

PR Close 
2018-03-13 09:28:05 -07:00
Marc Laval
f95730b8e2 fix(ivy): elements properties should not be stringified ()
PR Close 
2018-03-12 13:16:05 -07:00
Chuck Jazdzewski
8449eb8d62 build: upgrade to TypeScript 2.7 ()
Fixes: 

PR Close 
2018-03-12 09:27:23 -07:00
Kara Erickson
aa7dba244b feat(ivy): support checkNoChanges ()
PR Close 
2018-03-11 22:16:38 -07:00
Kara Erickson
fa451bcd19 feat(ivy): support markForCheck ()
PR Close 
2018-03-09 20:29:05 -08:00
Kara Erickson
b26a90567c feat(ivy): support attaching and detaching views from change detection ()
PR Close 
2018-03-08 23:44:33 -08:00
Kara Erickson
5412e10bcd docs(core): replace ancient live demos ()
PR Close 
2018-03-08 16:43:14 -08:00
Misko Hevery
2fee5cc095 test(ivy): add injection canonical specs ()
PR Close 
2018-03-08 12:09:39 -08:00
Kara Erickson
4c089c1d93 feat(ivy): support ChangeDetectorRef.detectChanges ()
PR Close 
2018-03-07 21:08:25 -08:00
Kara Erickson
d485346d3c fix(ivy): lifecycle hooks should be queued for root component ()
PR Close 
2018-03-07 21:08:25 -08:00
Marc Laval
f64ee15487 feat(ivy): implement pipes ()
PR Close 
2018-03-07 20:58:48 -08:00
Marc Laval
5d4fa7f0c8 test(ivy): add canonical examples of bindings on elements ()
PR Close 
2018-03-07 20:55:49 -08:00
Miško Hevery
6d1367d297 feat(ivy): provide sanitization methods which can be tree shaken ()
By providing a top level sanitization methods (rather than service) the
compiler can generate calls into the methods only when needed. This makes
the methods tree shakable.

PR Close 
2018-03-07 18:24:07 -08:00
Miško Hevery
538f1d980f refactor(core): move sanitization into core ()
This is in preparation of having Ivy have sanitization inline.

PR Close 
2018-03-07 18:24:06 -08:00
Pawel Kozlowski
2c75acc5b3 feat(ivy): add support for the ngProjectAs attribute ()
PR Close 
2018-03-06 06:55:51 -08:00