Commit Graph

3048 Commits

Author SHA1 Message Date
Kara Erickson 3505692f75 docs: add @next to update instructions (#33410)
PR Close #33410
2019-10-25 13:01:04 -07:00
Kara Erickson 49bfc7421a docs: add ivy compatibility guide (#33390)
PR Close #33390
2019-10-25 09:34:01 -07:00
Kara Erickson 01455d70e3 docs: re-organize version 9 guide (#33390)
PR Close #33390
2019-10-25 09:34:01 -07:00
George Kalpakas e2310732d7 docs(docs-infra): document running docs examples in ivy mode (#33399)
PR Close #33399
2019-10-25 09:19:35 -07:00
Geoff Bass 2805af900f docs: fix typo in getting started guide (#33372)
Add a missing word to make the phrase grammatically correct
PR Close #33372
2019-10-24 09:51:36 -07:00
Andrus Diaz 2f3812a1ef docs: add example of a server in golang for deployment (#33092)
PR Close #33092
2019-10-24 09:51:05 -07:00
Alex Rickabaugh f1269d98dc feat(ivy): input type coercion for template type-checking (#33243)
Often the types of an `@Input`'s field don't fully reflect the types of
assignable values. This can happen when an input has a getter/setter pair
where the getter always returns a narrow type, and the setter coerces a
wider value down to the narrow type.

For example, you could imagine an input of the form:

```typescript
@Input() get value(): string {
  return this._value;
}

set value(v: {toString(): string}) {
  this._value = v.toString();
}
```

Here, the getter always returns a `string`, but the setter accepts any value
that can be `toString()`'d, and coerces it to a string.

Unfortunately TypeScript does not actually support this syntax, and so
Angular users are forced to type their setters as narrowly as the getters,
even though at runtime the coercion works just fine.

To support these kinds of patterns (e.g. as used by Material), this commit
adds a compiler feature called "input coercion". When a binding is made to
the 'value' input of a directive like MatInput, the compiler will look for a
static field with the name ngAcceptInputType_value. If such a field is found
the type-checking expression for the input will use the static field's type
instead of the type for the @Input field,allowing for the expression of a
type conversion between the binding expression and the value being written
to the input's field.

To solve the case above, for example, MatInput might write:

```typescript
class MatInput {
  // rest of the directive...

  static ngAcceptInputType_value: {toString(): string};
}
```

FW-1475 #resolve

PR Close #33243
2019-10-24 09:49:38 -07:00
Igor Minar c79d6ec502 docs: deprecate esm5 and fesm5 code distribution in our npm packages (#33360)
See diff for more info.

PR Close #33360
2019-10-23 16:39:36 -07:00
Stefanie Fluin ba29e4d953 feat(docs-infra): implement figure styles (#33259)
PR#28396 originally addressed an update via issue #23983 to make images more visible with a white background (implementation of gray "lightbox").

This PR implements those styles defined in PR#28396.

PR Close #33259
2019-10-23 12:59:34 -07:00
ODAVING 1b607529a6 docs: fix spelling error in angular component (#32971)
change component class section of the docs

Closes #32948

PR Close #32971
2019-10-23 11:46:41 -07:00
Keen Yee Liau 2ecc4c7886 docs: Fix appHighlightColor typo (#33331)
In the example, there's no directive nor input that's named `appHighlightColor`.
It should be `appHighlight`, referring to the input binding.

PR Close #33331
2019-10-23 11:08:17 -07:00
George Kalpakas b04de1363d build(docs-infra): upgrade cli command docs sources to 57e36893c (#33349)
Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in [commit range](38635d2d9...57e36893c):

**Modified**
- help/generate.json
- help/update.json

##

PR Close #33349
2019-10-23 10:00:27 -07:00
George Kalpakas f013515307 test(docs-infra): disable es5 size tracking in aio tests (#33346)
PR Close #33346
2019-10-23 09:13:46 -07:00
George Kalpakas 43ac02e566 fix(docs-infra): scroll to top when navigating to new page via address bar (#33344)
Previously, when navigating to a new page via a link, the scroll
position was correctly restored to 0, but navigating to a new page via
typing the URL in the browser address bar keeps the old scroll position.

This commit ensures that the scroll position is restored to 0 whenever
the `ScrollService` is instantiated anew (i.e. new page navigation). The
old behavior of retaining the scroll position on reload is kept by
storing the old URL when leaving a page and only applying the stored
scroll position if the new URL matches the stored one.

Fixes #33260

PR Close #33344
2019-10-23 09:12:02 -07:00
Kara Erickson ed4d96f858 docs: add migrating to version 9 guide (#33339)
This commit adds a guide to AIO navigation for
"Migrating to Version 9" and moves the schematics
section into the guide that previously lived in
the deprecations page. It also pastes a snippet
of the deprecations page in the new guide so users
don't have to filter out deprecations they've seen
before.

Note: Ivy compatibility section is coming up in a
follow-up PR.

PR Close #33339
2019-10-23 09:11:40 -07:00
Kara Erickson 383457f898 docs: clean up deprecation guide (#33338)
PR Close #33338
2019-10-23 09:11:13 -07:00
cexbrayat c0b90c2010 docs: update localize migration doc (#33275)
The error message has been updated in #33199 to mention `ng add @angular/localize`.

This also fixes the tslint config (it needs to mention the complete side effect import).

PR Close #33275
2019-10-23 09:10:01 -07:00
Kapunahele Wong 398ff1e7e7 docs: add ModuleWithProviders deprecation (#33266)
PR Close #33266
2019-10-22 14:35:27 -07:00
Kapunahele Wong b3d6d500be docs: add ngcc postinstall migration doc (#33328)
PR Close #33328
2019-10-22 14:26:15 -07:00
Kapunahele Wong 1b8b04cf26 docs: add ModuleWithProviders migration doc (#33085)
PR Close #33085
2019-10-22 12:00:44 -07:00
TinyMan ec482dadb1 docs: clarrify use of sw behind redirect (#32915)
Closes #30684

PR Close #32915
2019-10-21 16:50:52 -04:00
David Sánchez 427a1ccd9a docs: clarify steps in Hosting on Firebase (#33089)
PR Close #33089
2019-10-21 16:07:04 -04:00
Carlos Ortiz García 717bace7ba docs(core): Document TestBed.get deprecation (#32974)
It was replaced by TestBed.inject, documenting such change.

PR Close #32974
2019-10-21 15:54:42 -04:00
Diego Juliao 160547dad6 docs: update deployers table with ngx-deploy-npm (#33269)
ngx-deploy-npm is a custom deployer to publish Angular libraries to NPM

PR Close #33269
2019-10-21 11:28:18 -04:00
Alan Agius 755a80c7ec docs: update universal docs for new ivy implementation (#33040)
PR Close #33040
2019-10-21 11:25:44 -04:00
Judy Bogart 8d44b5edac docs: edit and organize language service doc (#33202)
PR Close #33202
2019-10-18 18:19:05 -04:00
Kapunahele Wong 32b042014d docs: add field decorators to undecorated classes migration (#33069)
PR Close #33069
2019-10-18 16:31:10 -04:00
Kapunahele Wong 940fbbb014 docs: add localize migration doc (#33086)
PR Close #33086
2019-10-18 16:30:39 -04:00
crisbeto 1799f621b7 refactor(core): deprecate entryComponents (#33205)
With Ivy the `entryComponents` array isn't necessary anymore. These changes mark it as deprecated so that it can be removed in a future version.

PR Close #33205
2019-10-18 16:29:23 -04:00
ayazhafiz c44a1a78a9 docs: add ayaz hafiz as a contributor (#32975)
PR Close #32975
2019-10-18 14:43:13 -04:00
Amadou Sall 01d3599f32 docs: clarify instructions on where to create the proxy.conf.json file (#33244)
PR Close #33244
2019-10-18 14:40:57 -04:00
Igor Minar 86e1e6c082 feat: typescript 3.6 support (#32946)
BREAKING CHANGE: typescript 3.4 and 3.5 are no longer supported, please update to typescript 3.6

Fixes #32380

PR Close #32946
2019-10-18 13:15:16 -04:00
Olivier Combe 9e7668f16b fix(common): remove deprecated support for intl API (#29250)
BREAKING CHANGE:
In v5, we deprecated support for the intl API in order to improve the browser support. We are now removing these deprecated APIs for v9. See the original change here for more info on why: #18284.

PR Close #29250
2019-10-17 20:44:17 -04:00
Matias Niemelä f45c43188f fix(ivy): ensure errors are thrown during checkNoChanges for style/class bindings (#33103)
Prior to this fix, all style/class bindings (e.g. `[style]` and
`[class.foo]`) would quietly update a binding value if and when the
current binding value changes during checkNoChanges.

With this patch, all styling instructions will properly check to see
if the value has changed during the second pass of detectChanges()
if checkNoChanges is active.

PR Close #33103
2019-10-17 16:46:49 -04:00
crisbeto 9d54679e66 test: clean up explicit dynamic query usages (#33015)
Cleans up all the places where we explicitly set `static: false` on queries.

PR Close #33015
2019-10-17 16:10:10 -04:00
George Kalpakas ab09895810 build(docs-infra): update protractor/webdriver-manager to support latest Chrome (#33206)
Update `protractor` and ensure that the latest version of
`webdriver-manager` (v12.1.7) is installed, which correctly installs a
ChromeDriver version that is compatible with the latest version of
Chrome.

With the previous version of `webdriver-manager`, ChromeDriver v75 would
be installed by default, which was not compatible with the latest
version of Chrome (v77).

PR Close #33206
2019-10-17 14:12:29 -04:00
George Kalpakas a9fd36f2f8 build(docs-infra): ensure `setup-local` and similar scripts build local packages (#33206)
The `setup-local` scripts (and others that are based on it, such as
`setup-local-viewengine`), mainly does two things: Replace the Angular
packages with the locally built ones for `aio/` and the docs examples
(`aio/tools/examples/shared/`). It does this by calling two other npm
scripts: `aio-use-local` and `example-use-local` respectively.

For these scripts to work, the local Angular packages must be already
built (via `scripts/build-packages-dist.sh`). In order to make it easier
for people to test against local packages, the scripts support a
`--build-packages` option, that (if passed) will result in building the
local packages as well.

Given that the same local packages are used for both `aio/` and the
examples, we only need to build the packages once. Also, to speed up
execution on CI, we do not need to build the packages there, because the
packages would have been built already in a previous CI job.

However, the various setup npm scripts were not implemented correctly to
meet these requirements. Specifically, when running locally,
`aio-use-local` would build the packages, while `example-use-local`
would not (it was supposed to use the already built packages from
`aio-use-local`). The `example-use-local` script, though, was configured
to run before `aio-use-local`. As a result, the packages were not built,
by the time `example-use-local` needed them, which would cause an error.

This commit fixes it by ensuring that `aio-use-local` (which builds the
local Angular packages) runs before `example-use-local`, so that the
latter can use the same packages already built by the former.

PR Close #33206
2019-10-17 14:12:29 -04:00
George Kalpakas 16fe90d6ac fix(docs-infra): consider all formats when compiling docs examples with `ngcc` (#33206)
Previously, when compiling the docs examples with `ngcc` (to run them in
Ivy mode), we would only consider the `es2015` property. However, some
packages (such as `angular-in-memory-web-api`) may not have that
property in their `package.json`. They might still be compilable by
`ngcc`, if they define other format properties (such as `module` or
`main`), but `ngcc` would still fail if it could not find any of the
_specified_ properties (here only `es2015`):

```
Error: Unable to process any formats for the following entry-points (tried es2015):
  - /.../node_modules/angular-in-memory-web-api
```

This commit fixes potential issues by considering all properties that
would be considered if `ngcc` was run implicitly by `@angular/cli` and
aligns the command with the one that will be generated for new apps:
https://github.com/angular/angular/blob/3e14c2d02/packages/core/schematics/migrations/postinstall-ngcc/index.ts#L22

PR Close #33206
2019-10-17 14:12:29 -04:00
paulceli 3dc6490e72 docs: fix code-example displayed path (#33228)
PR Close #33228
2019-10-17 14:06:40 -04:00
Matias Niemelä d192a7b47a revert: fix(docs-infra): consider all formats when compiling docs examples with `ngcc` (#33216)
This reverts commit ccccb80fbecbe99cd913a494892f172962766f85.

PR Close #33216
2019-10-17 02:42:45 -04:00
Matias Niemelä 9e9491272f revert: build(docs-infra): ensure `setup-local` and similar scripts build local packages (#33216)
This reverts commit 9098a4018795031f3c516a4e17e1ee9599e02c9b.

PR Close #33216
2019-10-17 02:42:45 -04:00
Matias Niemelä e4504a40bd revert: build(docs-infra): update protractor/webdriver-manager to support latest Chrome (#33216)
This reverts commit b6574f24e1370238c9d6d1faa5a56fb4cb3adf79.

PR Close #33216
2019-10-17 02:42:45 -04:00
George Kalpakas e71a93afb3 build(docs-infra): update protractor/webdriver-manager to support latest Chrome (#33206)
Update `protractor` and ensure that the latest version of
`webdriver-manager` (v12.1.7) is installed, which correctly installs a
ChromeDriver version that is compatible with the latest version of
Chrome.

With the previous version of `webdriver-manager`, ChromeDriver v75 would
be installed by default, which was not compatible with the latest
version of Chrome (v77).

PR Close #33206
2019-10-16 19:02:43 -04:00
George Kalpakas 25bc56ed64 build(docs-infra): ensure `setup-local` and similar scripts build local packages (#33206)
The `setup-local` scripts (and others that are based on it, such as
`setup-local-viewengine`), mainly does two things: Replace the Angular
packages with the locally built ones for `aio/` and the docs examples
(`aio/tools/examples/shared/`). It does this by calling two other npm
scripts: `aio-use-local` and `example-use-local` respectively.

For these scripts to work, the local Angular packages must be already
built (via `scripts/build-packages-dist.sh`). In order to make it easier
for people to test against local packages, the scripts support a
`--build-packages` option, that (if passed) will result in building the
local packages as well.

Given that the same local packages are used for both `aio/` and the
examples, we only need to build the packages once. Also, to speed up
execution on CI, we do not need to build the packages there, because the
packages would have been built already in a previous CI job.

However, the various setup npm scripts were not implemented correctly to
meet these requirements. Specifically, when running locally,
`aio-use-local` would build the packages, while `example-use-local`
would not (it was supposed to use the already built packages from
`aio-use-local`). The `example-use-local` script, though, was configured
to run before `aio-use-local`. As a result, the packages were not built,
by the time `example-use-local` needed them, which would cause an error.

This commit fixes it by ensuring that `aio-use-local` (which builds the
local Angular packages) runs before `example-use-local`, so that the
latter can use the same packages already built by the former.

PR Close #33206
2019-10-16 19:02:43 -04:00
George Kalpakas 31b5db6fa8 fix(docs-infra): consider all formats when compiling docs examples with `ngcc` (#33206)
Previously, we would only consider the `es2015` property, but some
packages (such as `angular-in-memory-web-api`) may not have that. They
might still be compilable by `ngcc`, is they have other format
properties (e.g. `module` or `main`).

This commit fixes potential issues by considering all properties that
would be considered via the cli integration and aligns the command to
turn on ivy for docs examples with the one used in new cli apps:
https://github.com/angular/angular/blob/3e14c2d02/packages/core/schematics/migrations/postinstall-ngcc/index.ts#L22

PR Close #33206
2019-10-16 19:02:43 -04:00
Kara Erickson 86104b82b8 refactor(core): rename ngInjectableDef to ɵprov (#33151)
Injectable defs are not considered public API, so the property
that contains them should be prefixed with Angular's marker
for "private" ('ɵ') to discourage apps from relying on def
APIs directly.

This commit adds the prefix and shortens the name from
ngInjectableDef to "prov" (for "provider", since injector defs
are known as "inj"). This is because property names cannot
be minified by Uglify without turning on property mangling
(which most apps have turned off) and are thus size-sensitive.

PR Close #33151
2019-10-16 16:36:19 -04:00
Kara Erickson cda9248b33 refactor(core): rename ngInjectorDef to ɵinj (#33151)
Injector defs are not considered public API, so the property
that contains them should be prefixed with Angular's marker
for "private" ('ɵ') to discourage apps from relying on def
APIs directly.

This commit adds the prefix and shortens the name from
ngInjectorDef to inj. This is because property names
cannot be minified by Uglify without turning on property
mangling (which most apps have turned off) and are thus
size-sensitive.

PR Close #33151
2019-10-16 16:36:19 -04:00
Mayur Barge 51b9ce44ea docs: fix typo in getting started guide (#33185)
Fixes #33181

PR Close #33185
2019-10-16 10:23:01 -04:00
Filipe Silva ec6a9f2a02 docs: add postinstall script removal to Ivy guide (#32999)
PR Close #32999
2019-10-15 17:54:39 +00:00
Harinder Singh 0bdb71c122 docs: Update link (#33166)
Update multi-project workspace link

weblink on the angular.io website was not working, therefore, updated the multi-project workspace link.
PR Close #33166
2019-10-15 16:52:31 +00:00