Much of the formatting was hardcoded and copied from the old anguar.io
jade files. This gives us a clean start.
Also, more use has been made of include files to make the templates
easier to understand and manage.
Note, this affects the underlying class and should not affect usage.
DEPRECATION:
- the `NgFor` class is now deprecated. Use `NgForOf<T>` instead.
IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor`
directive. The `*ngFor` and related directives are unaffected by
this change as references to the `NgFor` class generated from
templates will be automatically converted to references to
`NgForOf<T>` without requiring any template modifications.
- `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead.
Migration:
- Replace direct references to the `NgFor` class to `NgForOf<any>`.
- Replace references to `TrackByFn` to `TrackByFunction<any>`.
BREAKING CHANGE:
A definition of `Iterable<T>` is now required to correctly compile
Angular applications. Support for `Iterable<T>` is not required at
runtime but a type definition `Iterable<T>` must be available.
`NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at
runtime. With this change the type definition is updated to reflect
this support.
Migration:
- add "es2015.iterable.ts" to your tsconfig.json "libs" fields.
Part of #12398
PR Close#14104
Correctly wire up hierarchical injectors for downgraded components in
`upgrade/static`: Downgraded components inherit the injector of the first
downgraded component up the DOM tree.
This is similar to (part of) d91a86a, but for `upgrade/static`.
POSSIBLE BREAKING CHANGE:
In order to enable more control over the wiring of downgraded components and
their content (which eventually allows better control over features like
injector setup and content projection), it was necessary to change the
implementation of the directives generated for downgraed components.
The directives are now terminal and manually take care of projecting and
compiling their contents in the post-linking function. This is similar to how
the dynamic version of `upgrade` does it.
This is not expected to affect apps, since the relative order of individual
operations is preserved. Still, it is difficult to predict how every possible
usecase may be affected.
This affects the dynamic version of `upgrade` and makes it more consistent with
the static version, while removing an artificial limitation.
This commit also refactors the file layout and code, in order to share code wrt
to dowgrading components between the dynamic and static versions.
This makes it more consistent with the dynamic version of `upgrade` and makes it
possible to share code between the dynamic and static versions.
This commit also refactors the file layout, moving common and dynamic-specific
files to `common/` and `dynamic/` directories respectively and renaming `aot/`
to `static/`.
Some private keys, used as AngularJS DI tokens, have also been renamed, but this
should not affect apps, since these keys are undocumented and not supposed to
be used externally.
BREAKING CHANGE:
Previously, `upgrade/static/downgradeInjectable` returned an array of the form:
```js
['dep1', 'dep2', ..., function factory(dep1, dep2, ...) { ... }]
```
Now it returns a function with an `$inject` property:
```js
factory.$inject = ['dep1', 'dep2', ...];
function factory(dep1, dep2, ...) { ... }
```
It shouldn't affect the behavior of apps, since both forms are equally suitable
to be used for registering AngularJS injectable services, but it is possible
that type-checking might fail or that current code breaks if it relies on the
returned value being an array.
`params` has been introduced in 4.0.0-beta.0
Before:
http.get(url, new RequestOptions({params: searchParams}))
After:
http.get(url, {params: searchParams})
Fixes#14100
PR Close#14101