Commit Graph

2994 Commits

Author SHA1 Message Date
JoostK cd7b199219 feat(ivy): check regular attributes that correspond with directive inputs (#33066)
Prior to this change, a static attribute that corresponds with a
directive's input would not be type-checked against the type of the
input. This is unfortunate, as a static value always has type `string`,
whereas the directive's input type might be something different. This
typically occurs when a developer forgets to enclose the attribute name
in brackets to make it a property binding.

This commit lets static attributes be considered as bindings with string
values, so that they will be properly type-checked.

PR Close #33066
2019-10-14 20:25:20 +00:00
JoostK f05999730a build(docs-infra): fix template type check errors (#33066)
In #33066 a limitation of Ivy's template type checker was fixed, where
all directive inputs would incorrectly allow `undefined` to be passed,
even when the input's type did not allow for it. Due to the fix, some
additional type errors were uncovered in AIO, where potential
`undefined` values would be passed to inputs that were not typed to
allow `undefined`.

PR Close #33066
2019-10-14 20:25:20 +00:00
Harinder Singh 127cec0214 docs: add command for creating angular workspace (#32804)
Improved documentation

Add command to create Angular workspace, it is required for executing `ng generate library <my-lib>` .

PR Close #32804
2019-10-14 16:32:46 +00:00
Benjamin Liii 4b30108734 docs: add note to build Angular locally (#31053)
I got the compiled failed error when I followed the tutorial, which should be informed in advance as there are people who might not know the dependency in the package.json if they have no former relevant experience.

PR Close #31053
2019-10-14 16:31:52 +00:00
George Kalpakas 1a34fbce25 fix(ngcc): rename the executable from `ivy-ngcc` to `ngcc` (#33140)
Previously, the executable for the Angular Compatibility Compiler
(`ngcc`) was called `ivy-ngcc`. This would be confusing for users not
familiar with our internal terminology, especially given that we call it
`ngcc` in all our docs and presentations.

This commit renames the executable to `ngcc` and replaces `ivy-ngcc`
with a script that errors with an informative message (prompting the
user to use `ngcc` instead).

Jira issue: [FW-1624](https://angular-team.atlassian.net/browse/FW-1624)

PR Close #33140
2019-10-14 16:29:14 +00:00
Kapunahele Wong c88305d2eb docs: add Injectable migration docs (#32581)
PR Close #32581
2019-10-11 15:46:12 -07:00
crisbeto 0b1daa9ebd refactor(forms): remove ngForm element selector (#33058)
Removes the deprecated `ngForm` element selector and all of the code related to it.

BREAKING CHANGES:
* `<ngForm></ngForm>` can no longer be used as a selector. Use `<ng-form></ng-form>` instead.
* The `NgFromSelectorWarning` directive has been removed.
* `FormsModule.withConfig` has been removed. Use the `FormsModule` directly.

PR Close #33058
2019-10-11 15:43:56 -07:00
George Kalpakas 15e3b5f531 build(docs-infra): upgrade cli command docs sources to 38635d2d9 (#33098)
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](a0ecddbf1...38635d2d9):

**Modified**
- help/build.json
- help/xi18n.json

##

PR Close #33098
2019-10-11 15:43:20 -07:00
Adam J. Penn c8fd94ea44 style(router): removed extra semicolon (#33062)
PR Close #33062
2019-10-10 15:26:20 -07:00
Danny Skoog 6ab5f3648a refactor: utilize type narrowing (#33075)
PR Close #33075
2019-10-10 15:18:44 -07:00
Amadou Sall 1ae77da609 docs: update Stackblitz example for lazy-loading (#33070)
PR Close #33070
2019-10-10 15:17:32 -07:00
Amadou Sall 100ba0bd06 docs: align the lazy-loading guide to what's generated by the CLI (#33070)
PR Close #33070
2019-10-10 15:17:32 -07:00
George Kalpakas df78d7c0d9 build(docs-infra): upgrade cli command docs sources to a0ecddbf1 (#33081)
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](0a36071b8...a0ecddbf1):

**Modified**
- help/generate.json

##

PR Close #33081
2019-10-10 14:00:35 -07:00
George Kalpakas 3001716a2f test(docs-infra): ensure spy returns new observable every time (#32980)
Previously, some spies in `DovViewerComponent` tests would return the
same `of(undefined)` observable for all invocations of the spy in a
test. While there is usually only one invocation per spy in each test,
this is not always the case. In case of multiple invocations within the
same test, subsequent calls would return an already completed
observable, which deviates from the actual behavior of the spied
function.

This commit fixes it by ensuring a fresh `of(undefined)` observable is
returned on each invocation.

PR Close #32980
2019-10-10 13:56:15 -07:00
George Kalpakas ebd557c1e1 build(docs-infra): unpin `terser` now that size regression is fixed (#32980)
The latest terser version (4.3.8) includes a fix for the recent size
regression, so we can remove the pinning of transitive `terser`
dependencies to 4.3.2 (via `package.json > resolutions`).

PR Close #32980
2019-10-10 13:56:15 -07:00
George Kalpakas d349cd91b1 refactor(docs-infra): fix some linting warnings (#32980)
PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas a2d2a5d572 build(docs-infra): enable `fullTemplateTypeCheck` (and fix failures) (#32980)
PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas b2666a2857 build(docs-infra): enable more TypeScript strictness flags (#32980)
PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 9abc1f9156 build(docs-infra): update @angular/cli to 9.0.0-next.8 (#32980)
The payload size increase in the ES5 bundles is (at least partially)
expected, due to fixing some down-leveling corner cases.

Related CLI issue: angular/angular-cli#15673

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 4283e1f784 build(docs-infra): update @angular/material to 9.0.0-next.0 (#32980)
Upgrading to @angular/material 9.0.0-next.0 increases the bundle size
slightly (~1.3KB). This is a natural expectation of library
fixes/improvements.

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 4541b9b565 build(docs-infra): update payload sizes (#32980)
There seems to be a ~3KB regression for IVy introduced in 4e35e348a.

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas dcd28b591d build(docs-infra): clean up and update dependencies to match latest CLI (#32980)
This commit includes the following types of changes:
- Remove unused dependencies.
- Move dev dependencies from `devDependencies` to `dependencies` (and
  vice versa for production dependencies).
- Update `@types/*`.
- Update dependencies to more closely match the dependencies installed
  by the latest CLI for new apps.

Also, ensured that the latest version of `webdriver-manager` (v12.1.7)
was installed for `protractor`, which correctly installs a ChromeDriver
version that is compatible with the latest version of Chrome.

PR Close #32980
2019-10-10 13:56:14 -07:00
George Kalpakas 4e1f37fc17 refactor(docs-infra): replace `mousewheel` event with `wheel` event (#32980)
This commit replaces the non-standard, depecated [mousewheel][1] event
(which is not supported in Firefox and possibly other browsers too) with
the standard [wheel][2] event, which works on all supported browsers
according to [MDN's compatibility table][3].

I manually tested it in Chrome, Firefox, Edge and IE11.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event
[2]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
[3]: https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event#Browser_compatibility

PR Close #32980
2019-10-10 13:56:14 -07:00
Yulia Tsareva 676a95a21c docs: fix typo in guide (#32893)
PR Close #32893
2019-10-10 13:54:58 -07:00
John Ralph Umandal a3ef3e11c4 docs: changed 'function' word in to 'steps' (#32211)
changed word for better method's interpretation.

PR Close #32211
2019-10-10 13:54:23 -07:00
John Ralph Umandal 57d099ceea docs: fixed a misleading sentence (#32211)
Reading this sentence, make the reader think that the second argument strictly accepts one single animate, which is not
PR Close #32211
2019-10-10 13:54:23 -07:00
crisbeto 2265cb5938 refactor(core): remove deprecated Renderer (#33019)
Removes the `Renderer` and related symbols which have been deprecated since version 4.

BREAKING CHANGES:
* `Renderer` has been removed. Use `Renderer2` instead.
* `RenderComponentType` has been removed. Use `RendererType2` instead.
* `RootRenderer` has been removed. Use `RendererFactory2` instead.

PR Close #33019
2019-10-08 09:23:00 -07:00
Danny Skoog c507dda21a docs: correct sentence in AoT compiler guide (#33020)
PR Close #33020
2019-10-07 13:13:57 -07:00
Koala 40d87dd801 docs: fix accessibility lint rules (#32661)
Add and fix accessibility rules, bump codelyzer to support pseudo events
for template-click-events-have-key-events rule.

PR Close #32661
2019-10-07 11:22:48 -07:00
Santosh Yadav 0ce8621196 docs: add dotnettricks to training (#32771)
PR Close #32771
2019-10-07 11:03:03 -07:00
Santosh Yadav 393398e6f5 build(docs-infra): update in-memory-we-api and karma-jasmine-html-reporter version (#32892)
The `karma-jasmine-html-reporter` update also includes a fix for
taras42/karma-jasmine-html-reporter#31.

Fixes #29802

PR Close #32892
2019-10-07 10:51:19 -07:00
JiaLiPassion 53d13c3fc6 refactor: rename unpatched event flag in Zone from `BLACK_LISTED_EVENTS` to `UNPATCHED_EVENTS` (#29617)
Closes #28529

PR Close #29617
2019-10-04 08:44:58 -07:00
George Kalpakas 480b775ba7 build(docs-infra): update @angular/* to 9.0.0-next.9 (#32923)
PR Close #32923
2019-10-04 08:27:21 -07:00
George Kalpakas 32b16de8ea build(docs-infra): align config with what cli generates for new apps (#32923)
This is mainly to avoid some warning when building the app, such as:

```
WARNING in .../angular/aio/src/environments/environment.archive.ts is
part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your
tsconfig.
```

(Not turning on `fullTemplateTypeCheck` due to lots of errors.)

PR Close #32923
2019-10-04 08:27:21 -07:00
George Kalpakas ea9245446f refactor(docs-infra): replace `System.import()` with `import()` (#32923)
`System.import()` has been deprecated in webpack and produces the
following warning when building the app:

```
WARNING in ./src/app/custom-elements/code/pretty-printer.service.ts
System.import() is deprecated and will be removed soon. Use import()
instead.
```

Switching to `import()` to get rid of the warning.

Fixes #30365
Closes #30419

PR Close #32923
2019-10-04 08:27:21 -07:00
George Kalpakas ad753d3fa7 build(docs-infra): pin terser to 4.3.2 to avoid optimization bug (#32923)
This commit pins terser to version 4.3.2 (instead of 4.3.4 which it is
currently resolved to) to avoid this bug: terser/terser#470

See https://github.com/angular/angular/pull/32923#issuecomment-537370090
for more details.

PR Close #32923
2019-10-04 08:27:21 -07:00
George Kalpakas 7c9219f029 build(docs-infra): upgrade @angular/cli to 9.0.0-next.6 (#32923)
PR Close #32923
2019-10-04 08:27:21 -07:00
George Kalpakas eb72cecc42 build(docs-infra): turn on Ivy (#32923)
The angular.io project uses Angular and CLI v9, which by default turns
on Ivy mode. However, since ec4381dd4, we explicitly opt out of Ivy.

This commit removes the `enabledIvy: false` configuration, thus allowing
the default behavior of having Ivy on.

NOTE:
This commit only changes the angular.io projects. The docs examples need
to be updated separately (first to Angular and CLI v9 and then to Ivy).

PR Close #32923
2019-10-04 08:27:21 -07:00
George Kalpakas bc886a64a7 build(docs-infra): update current payload sizes (#32923)
PR Close #32923
2019-10-04 08:27:21 -07:00
George Kalpakas 9364a14d36 fix(docs-infra): ignore `ng*Def` members in API docs (#31378)
`ng*Def` properties (such as `ngInjectorDef`) are not considered part of
the public API and should not appear in the API docs. This commit adds a
filter to remove these properties from the docs metadata.

PR Close #31378
2019-10-03 10:24:34 -07:00
Showtim3 052cae6427 docs: fix typo in attribute-directives.md (#32943)
Fixes #32924

PR Close #32943
2019-10-02 14:30:50 -07:00
Jakub Pawlot e7729b6863 docs: add comment about newEvent utility function (#32001)
PR Close #32001
2019-10-02 13:28:38 -07:00
Kai Röder 3de59d48b5 docs(docs-infra): use recommended type assertion (#31042)
Angular uses tslint:recommended by default. The default for no-angle-bracket-type-assertion is true
See https://github.com/palantir/tslint/blob/master/src/configs/recommended.ts#L69

PR Close #31042
2019-10-02 13:25:39 -07:00
Nikita Potapenko 3c7ac5f835 docs: add ngOnInit description (#32789)
PR Close #32789
2019-10-02 13:24:30 -07:00
Stephen Fluin a3b6b109d8 docs: fix stackblitz example polyfills (#32969)
PR Close #32969
2019-10-02 13:20:37 -07:00
Judy Bogart 70429bf350 docs: add lib build note (#32940)
PR Close #32940
2019-10-02 10:59:05 -07:00
Jordan Amman 448749cafa docs: added '>' to ng-template closing tag. (#32939)
Fixes #32931

PR Close #32939
2019-10-02 09:44:23 -07:00
Filipe Silva fc3260d87e ci: use CircleCI parameterized jobs (#32745)
Parameterized jobs lets us reduce duplication of very similar jobs.

See https://circleci.com/docs/2.0/reusing-config/#authoring-parameterized-jobs for more info.

PR Close #32745
2019-10-02 09:34:11 -07:00
Alan Agius 5d5c94d83a feat(service-worker): remove deprecated `versionedFiles` option (#32862)
BREAKING CHANGE:

Remove deprecated option `versionedFiles` from service worker asset group configuration in `ngsw-config.json`

Before
```json
"assetGroups": [
  {
    "name": "test",
    "resources": {
      "versionedFiles": [
        "/**/*.txt"
      ]
    }
  }
]
```

After
```json
"assetGroups": [
  {
    "name": "test",
    "resources": {
      "files": [
        "/**/*.txt"
      ]
    }
  }
]
```

PR Close #32862
2019-10-02 09:30:59 -07:00
George Kalpakas 090732fc2d fix(docs-infra): show hamburger button on getting started guide (#32941)
In 1c3ee4190, the `getting-started` guide/tutorial was renamed to
`start`, but the corresponding CSS class that controls the display of
the top-left hamburger (and it automatically derived based on the URL)
was not updated.

This commit updates the class to ensure that the hamburger is not hidden
when navigating to the getting started guide.

PR Close #32941
2019-10-02 09:20:22 -07:00