Commit Graph

9144 Commits

Author SHA1 Message Date
George Kalpakas 22ae17bb0b build(aio): upgrade to latest `@angular/material` and `@angular/cdk` (#18428)
PR Close #18428
2017-12-08 10:11:15 -08:00
George Kalpakas d546be48e1 build(aio): upgrade to latest `@angular/*` (#18428)
PR Close #18428
2017-12-08 10:11:15 -08:00
George Kalpakas 753a130aaa build(aio): upgrade to latest `rxjs` (#18428)
PR Close #18428
2017-12-08 10:11:15 -08:00
George Kalpakas 94e2ea7361 fix(aio): fix embedded ToC and improve ToC, destroying components and scroll timing (#18428)
- Fix embedded ToC:
  Previously, the element was added too late and was never instantiated.

- Improve ToC update timing:
  Previously, the ToC was updated after the entering animation was over, which
  resulted in the ToC being outdated for the duration of the animation.

- Improve destroying components timing:
  Previously, the old embedded components were destroyed as soon as a
  new document was requested. Even if the transition ended up never
  happening (e.g. due to error while preparing the new document), the
  embedded components would have been destroyed and the displayed
  document would not work as expected.
  Now the old embedded components are destroyed only after the new
  document has been fully prepared.

- Improve scroll-to-top timing:
  Previously, the page was scrolled to top after the entering animation was
  over, which resulted in "jumpi-ness". Now the scrolling happens after the
  leaving document has been removed and before the entering document has been
  inserted.

PR Close #18428
2017-12-08 10:11:15 -08:00
George Kalpakas 1539cd8819 feat(aio): animate the leaving/entering documents (#18428)
This commit adds a simple fade-in/out animation.

Fixes #15629

PR Close #18428
2017-12-08 10:11:15 -08:00
George Kalpakas 131c8ab6be fix(aio): do not show new document until embedded components are ready (#18428)
Previously, the document was shown as soon as the HTML was received, but before
the embedded components were ready (e.g. downloaded and instantiated). This
caused FOUC (Flash Of Uninstantiated Components).
This commit fixes it by preparing the new document in an off-DOM node and
swapping the nodes when the embedded components are ready.

PR Close #18428
2017-12-08 10:11:15 -08:00
Georgios Kalpakas 7d81309e11 feat(aio): lazy-load embedded components (#18428)
Fixes #16127

PR Close #18428
2017-12-08 10:11:15 -08:00
Trotyl Yu 225baf4686 docs(aio): fix typo for missing quote (#20888)
PR Close #20888
2017-12-08 10:06:41 -08:00
Ward Bell 70b061be2e fix(aio): tsconfig.app.json excludes all testing files (#20779)
Fixes app build error in testing guide which has testing folder at multiple levels,
with files in them referring to files in the root `testing` folder.
Also removed the exclusion of files with `.1` in the name because
all app `.ts` files must be buildable per aio policy.
must build

PR Close #20779
2017-12-08 10:02:43 -08:00
Matias Niemelä 46aa0a1cf6 fix(animations): properly recover and cleanup DOM when CD failures occur (#20719)
Closes #19093

PR Close #20719
2017-12-07 17:16:27 -08:00
Matias Niemelä 661fdcd3e2 refactor(animations): instantiate Set-matching code with values in constructor (#20725)
For some reason, prior to this fix, the boolean set matching
code (within `animation_transition_expr.ts`) failed to remain
the same when compiled with closure. This refactor makes sure
that the code stays in tact.

Reproduction Details:
Passes without `ng build --prod`: https://burger.stackblitz.io/
Fails with `ng build --prod`: http://burger.fxck.cz/

Closes #20374

PR Close #20725
2017-12-07 17:16:21 -08:00
Matias Niemelä 590d93b30d feat(animations): re-introduce support for transition matching functions (#20723)
Closes #18959

PR Close #20723
2017-12-07 17:16:09 -08:00
Matias Niemelä c26e1bba1d fix(animations): ensure the web-animations driver properly handles empty keyframes (#20648)
Closes #15858

PR Close #20648
2017-12-07 17:16:02 -08:00
Matias Niemelä 10771d0bd8 fix(animations): support webkit-based vendor prefixes for prop validations (#19055)
Closes #18921

PR Close #19055
2017-12-07 17:15:53 -08:00
vsavkin d8cc09b76c fix(router): NavigatonError and NavigationCancel should be emitted after resetting the URL (#20803)
PR Close #20803
2017-12-07 13:34:20 -08:00
Fabian Wiles d41d2c460a feat(forms): allow nulls on setAsyncValidators (#20327)
closes #20296

PR Close #20327
2017-12-07 13:34:12 -08:00
Martin Probst 4efc32dabf fix(compiler-cli): disable checkTypes in emit. (#20828)
Closure Compiler by default will report diagnostics from type checks in
any JavaScript code, including code emitted by the Angular compiler.
Disabling `checkTypes` substantially reduces warning spam for users, and
allows them to run with stricter compiler flags (e.g. treating actual
diagnostics from user code as errors).

Closure Compiler will still type check the code and use types (where
found and correct) for optimizations.

PR Close #20828
2017-12-07 13:34:05 -08:00
Alex Eagle ef534c0cc1 build: upgrade bazel rules to latest (#20768)
Add enough BUILD files to make it possible to
`bazel build packages/core/test`

Also re-format BUILD.bazel files with Buildifier.
Add a CI lint check that they stay formatted.

PR Close #20768
2017-12-07 11:27:50 -08:00
Keen Yee Liau 073f485c72 fix(compiler-cli): Fix swallowed Error messages (#20846)
This commit fixes a bug in which non-formatted errors are silently
dropped.

Internal issue: b/67739418

PR Close #20846
2017-12-06 16:49:22 -08:00
Igor Minar c2dbc55f11 release: cut the 5.1.0 release 2017-12-06 12:17:04 -08:00
Igor Minar 9ee2703824 docs: add changelog for 5.1.0 2017-12-06 12:17:04 -08:00
Matias Niemelä b78ada198a fix(animations): ensure DOM is cleaned up after multiple @trigger leave animations finish (#20740)
Closes #20541

PR Close #20740
2017-12-06 07:02:42 -08:00
Alex Eagle 6790e02a13 ci: upgrade to node 8 and Bazel 0.8 (#20807)
Closes #19648

PR Close #20807
2017-12-06 06:58:33 -08:00
Fabian Wiles 7cabaa0ae7 fix(service-worker): ensure initialised in browser only (#20782)
closes #20360

PR Close #20782
2017-12-06 06:55:33 -08:00
Mathias Døhl da3563ce19 fix(service-worker): esm2015 points to wrong path (#20800)
The package.json esm2015 points to the wrong path.
"esm15" should be "esm2015"

Service Worker can't be compiled with use of Closure Compiler
PR Close #20800
2017-12-06 06:53:30 -08:00
Kapunahele Wong 9bbec42a6c docs(aio): add service worker guide content and update nav (#20736)
PR Close #20736
2017-12-06 06:52:20 -08:00
Olivier Combe be994496cd docs(core): add docs for i18n tokens (#17920)
PR Close #17920
2017-12-05 21:56:43 -08:00
hartraft 77ef527993 docs(aio): update myUnless references to appUnless (#20658)
fixes Issue Number: #20447

PR Close #20658
2017-12-05 21:54:39 -08:00
Oussama Ben Brahim f092a7c824 docs(aio): fix numbering of the three ways to access hero details (#20647)
Fixes #20628

PR Close #20647
2017-12-05 21:54:34 -08:00
Ward Bell 5e25d3986d docs: component-styles guide - inline styles must be CSS (#20701)
Cannot write them in less, sass, or stylus
See CLI issue https://github.com/angular/angular-cli/issues/8472

PR Close #20701
2017-12-05 21:54:23 -08:00
WilliamKoza 35977e3830 fix(forms): Broken link NG_VALIDATORS replace by an example (#15480)
PR Close #15480
2017-12-05 21:53:12 -08:00
Jesus Rodriguez f7328c69b3 docs(aio): architecture review for a11y (#17848)
PR Close #17848
2017-12-05 21:49:27 -08:00
Frédéric DUPERIER 25f2211726 docs: add We Are One Sàrl as onsite training (#20714)
Adding We Are One Sàrl as an onsite training company in Switzerland.
PR Close #20714
2017-12-05 21:48:41 -08:00
ite-klass 18793c896b docs(aio): Fix typo (#20732)
Remove duplicate word 'to'

PR Close #20732
2017-12-05 21:46:56 -08:00
Yuan Gao e7cdb9f660 ci(core): Improve the payload size message (#20786)
PR Close #20786
2017-12-05 21:46:10 -08:00
Victor Berchet 6911a250ef build: set `preserveWhitespaces` to false by default on Bazel (#20783)
`preserveWhitespaces: false` will be the default in Angular 6+

You can opt-out at component or element level.

Docs: https://angular.io/api/core/Component#preserveWhitespaces

PR Close #20783
2017-12-04 16:16:01 -08:00
George Kalpakas 7e7ff2e0aa ci: fix the payload-size checking scripts (#20683)
The scripts were accidentally broken in #20524. More specifically, when a limit
was exceeded the script would break while trying to log an error message due to
a missing `commit` variable.
This commit fixes it and also does some minor clean-up (improve docs, use more
descriptive variable names, remove dead code, etc).

PR Close #20683
2017-12-04 14:52:15 -08:00
Alex Rickabaugh d34f0bf573 docs: add changelog for 5.1.0-rc.1 2017-12-01 14:55:51 -08:00
Alex Rickabaugh 1f5fa25583 release: cut the 5.1.0-rc.1 release 2017-12-01 14:55:39 -08:00
Alex Rickabaugh d507057476 docs: add changelog for 5.0.5 2017-12-01 14:41:48 -08:00
Alex Rickabaugh f582620d5b fix(service-worker): use relative path for ngsw.json
Not every application is served from the domain root. The Service
Worker made a bad assumption that it would be, and so requested
/ngsw.json from the domain root.

This change corrects this assumption, and requests ngsw.json without
the leading slash. This causes the request to be interpreted
relative to the SW origin, which will be the application root.
2017-12-01 14:21:07 -08:00
Alex Rickabaugh 3fbcde9048 fix(service-worker): send initialization signal from the application
The Service Worker contains a mechanism by which it will postMessage
itself a signal to initialize its caches. Through this mechanism,
initialization happens asynchronously while keeping the SW process
alive.

Unfortunately in Firefox, the SW does not have the ability to
postMessage itself during the activation event. This prevents the
above mechanism from working, and the SW initializes on the next
fetch event, which is often too late.

Therefore, this change has the application wait for SW changes and
tells each new SW to initialize itself. This happens in addition to
the self-signal that the SW attempts to send (as self-signaling is
more reliable). That way even on browsers such as Firefox,
initialization happens eagerly.
2017-12-01 14:21:07 -08:00
Alex Eagle f841fbe60f fix(compiler-cli): propagate ts.SourceFile moduleName into metadata 2017-12-01 14:19:06 -08:00
Alex Rickabaugh b9a91a5e74 fix(service-worker): don't crash if SW not supported
Currently a bug exists where attempting to inject SwPush crashes the
application if Service Workers are unsupported. This happens because
SwPush doesn't properly detect that navigator.serviceWorker isn't
set.

This change ensures that all passive observation of SwPush and
SwUpdate doesn't cause crashes, and that calling methods to perform
actions on them results in rejected Promises. It's up to applications
to detect when those services are not available, and refrain from
attempting to use them.

To that end, this change also adds an `isSupported` getter to both
services, so users don't have to rely on feature detection directly
with browser APIs. Currently this simply detects whether the SW API
is present, but in the future it will be expanded to detect whether
a particular browser supports specific APIs (such as push
notifications, for example).
2017-12-01 14:18:16 -08:00
Alex Rickabaugh 65f4fad801 fix(service-worker): allow disabling SW while still using services
Currently, the way to not use the SW is to not install its module.
However, this means that you can't inject any of its services.

This change adds a ServiceWorkerModule.disabled() MWP, that still
registers all of the right providers but acts as if the browser does
not support Service Workers.
2017-12-01 14:18:16 -08:00
Misko Hevery 60a30818ef docs: add changelog for 5.1.0-rc.0 2017-11-30 21:38:52 -08:00
Misko Hevery b967cbfc66 release: cut the 5.1.0-rc.0 release 2017-11-30 21:37:42 -08:00
Misko Hevery 8826a8235b docs: add changelog for 5.0.4 2017-11-30 21:34:44 -08:00
George Kalpakas 47addd169d revert: docs(aio): add service worker guide content and update nav (#20021) (#20716)
* revert: style: broken build due to missing new lines

This reverts commit ba6af2a6dd.
The commit that introduced these files (48300067f) will also get
reverted.

* revert: docs(aio): add service worker guide content and update nav (#20021)

This reverts commit 48300067fb.
This commit has some issues (e.g. breaks some e2e tests, adds images
to the wrong directories, breaks linting, etc).
Reverting in order to investigate and fix.
2017-11-30 09:53:07 -08:00
Misko Hevery ba6af2a6dd style: broken build due to missing new lines 2017-11-29 20:27:25 -08:00