Commit Graph

7535 Commits

Author SHA1 Message Date
Tobias Bosch ce1d7c4a6e refactor: use view engine also for `NgModuleFactory`s (#16658)
* refactor(core): provide error message in stack for reflective DI

Fixes #16355

* fix(compiler): make AOT work with `noUnusedParameters`

Fixes #15532

* refactor: use view engine also for `NgModuleFactory`s

This is a prerequisite for being able to mock providers
in AOTed code later on.
2017-05-11 10:26:02 -07:00
Chuck Jazdzewski b9521b568f feat(compiler): support a non-null postfix assert (#16672)
Template expressions can now use a post-fix `!` operator
that asserts the target of the operator is not null. This is
similar to the TypeScript non-null assert operator. Expressions
generated in factories will be generated with the non-null assert
operator.

Closes: #10855
2017-05-11 10:15:54 -07:00
Peter Bacon Darwin 2eca6e67e1 test(aio): add tests for renderAttributes helper 2017-05-11 10:30:10 +01:00
Georgios Kalpakas c757e5794f build(aio): serve gzipped content from the preview server
Fixes #16699
2017-05-11 10:29:24 +01:00
Peter Bacon Darwin 67dc970ce4 docs(common): remove h1s from API docs
Only one h1 is allowed per document, and this is provided by the template.
So we cannot have any h1 tags (or `#` markdown shorthand) in any API docs.

Closes #16193
2017-05-11 08:15:19 +01:00
Peter Bacon Darwin 56ccd5e6a1 docs(aio): remove excess h1s from guides
Only one h1 is allowed per document.

(Also took the opportunity to remove unnecessary blank lines from these
docs, and a bit of general tidying.)

Closes #16193
2017-05-11 08:15:19 +01:00
Peter Bacon Darwin bcbee13e26 build(aio): fail build if more than h1 is found in a doc
Closes #16193
2017-05-11 08:15:19 +01:00
Aaron Hoffman d28a3f7878 docs(router): Change CanDeactivate to CanLoad (#16237)
fix mistake in docs. CanDeactivate should be CanLoad
2017-05-10 16:34:34 -07:00
Jason Aden 162dffb7e8 docs: add changelog for 4.2.0-beta.1 2017-05-10 16:26:34 -07:00
Jason Aden 0f0b9896b7 release: cut the 4.2.0-beta.1 release 2017-05-10 16:26:34 -07:00
Georgios Kalpakas e242e20ca3 fix(aio): style TOC scrollbar similar to other scrollbars 2017-05-10 15:02:44 +01:00
Jesus Rodriguez f148ebe99e docs(aio): remove warning when testing in the webpack guide 2017-05-10 15:02:21 +01:00
Georgios Kalpakas f795f649cf refactor(aio): remove redundant styles
Due to the new structure of `live-example`, the only style in
`_live-example.scss` was not applied. This is OK according to
https://github.com/angular/angular/issues/15935#issuecomment-295482503, since we
want it to take the full width.

Fixes #15935
2017-05-10 14:49:37 +01:00
Georgios Kalpakas 063db641f8 fix(aio): style sidenav-content scrollbar similar to other scrollbars 2017-05-10 14:48:29 +01:00
Jesus Rodriguez b44f5c69e1 build(aio): make less verbose tools 2017-05-10 14:26:14 +01:00
Jesus Rodriguez 56833a6171 docs(aio): more content fixes 2017-05-10 12:51:01 +01:00
Jesus Rodriguez efa2928547 docs(aio): add a progress reporter for the webpack guide 2017-05-10 11:54:39 +01:00
Peter Bacon Darwin f5335d17ec build(aio): fail the doc-gen if there is an invalid `{@link ...}` tag
This fail behaviour is only turned on for `yarn docs`;
in `yarn docs-watch` you only receive a warning.
This is because you can get false errors when watching
since we don't parse all the docs in that case.
2017-05-10 11:39:07 +01:00
Stefanie Fluin dc7d24267d feat(aio): update code style 2017-05-10 07:57:45 +01:00
Peter Bacon Darwin 412ab3f20c fix(aio): basic fix to the TOC styling
Without any major refactoring these changes bring the TOC much closer to
how the Google developer docs TOC looks.

Closes #16646
2017-05-10 07:49:59 +01:00
Peter Bacon Darwin 954c08e97c fix(aio): remove unwanted code styling from styleguide doc
Closes #16514
2017-05-10 07:49:03 +01:00
Jason Aden a2dcb7b476 build: update key for pushing to PACKAGE-builds repos (#16667) 2017-05-09 16:37:05 -07:00
Chuck Jazdzewski bb0902c592 refactor(compiler-cli): move the expression expression type checker (#16562)
The expression type checker moved from the language service
to the compiler-cli in preparation to using it to check
template expressions.
2017-05-09 16:16:50 -07:00
Pete Bacon Darwin 9e661e58d1 docs(aio): image sweep (#16609)
* fix(aio): allow code blocks to clear floated images

Previously the negative margin on the code headings were causing
floated images to overlay the start of a code block. Now all code block
successfully clear all floated elements.

* feat(aio): add a `.clear` class for clearing floating images

* fix(aio): tidy up image styles

The css rules for `img.right` and `img.left` allow authors easy
access to floating an image on the left or right, respectively.

The `.image-display` rule which was always found on a figure
has been simplified so that all figures have this styling. It is very
unlikely that a figure will be used outside the content area; and
at this time it seems like `figure` is as good an indicator that we
want this kind of styling as anything.

Now that images are all tagged with width and height values, we cannot
assume to modify these dimensions via CSS as it can cause the image to
lose its correct proportions.  Until we find a better solition we must set
`height` to `auto` when the screen width is below 1300px to ensure that
these images maintain their proportions as they get shrunk to fit.

* docs(aio): general tidy up of image HTML in guides

Previously, the guides have a lot of inline image styling and unnecessary
use of the `image-display` css class.
Images over 700px are problematic for guide docs, so those have been given
specific widths and associated heights.

* docs(aio): use correct anchor for "back to the top" link

The `#toc` anchor does not work when the page is
wide enough that the TOC is floating to the side.

* build(aio): add `#top-of-page` to path variants for link checking

Since the `#top-of-page` is outside the rendered docs
the `checkAnchorLinks` processor doesn't find them
as valid targets for links.
Adding them as a `pathVariant` solves this problem
but will still catch links to docs that do not actually exist.

* fix(aio): ensure that headings clear floated images

* fix(aio): do not force live-example embedded image to 100% size

This made them look too big, generally. Leaving them with no size means
that they will look reasonable in large viewports and switch to 100% width
in narrow viewports.
2017-05-09 15:53:32 -07:00
Pete Bacon Darwin d0e72a8f8f docs(*) fix dangling links in API docs (#16632)
* docs(animations): fix links to `Component` animations

* docs(core): fix links to `ReflectiveInjector` methods

The `resolve` and other methods were moved from the
`Injector` to the `ReflectiveInjector`.

* docs(core): fix links to `Renderer`

The local links were assuming that that methods were on the
current document (e.g. `RootRenderer`), but they are actually
on the `Renderer` class.

* docs(router): fix links to methods

* docs(forms): fix links to methods

* docs(core): fix links to methods

* docs(router): fix API page links and an internal link
2017-05-09 15:51:37 -07:00
Pete Bacon Darwin b44eb328e0 docs(core): remove link to non-existent class in `InjectableDecorator` (#16653)
Closes #16640
2017-05-09 15:51:23 -07:00
Pete Bacon Darwin 7b4a8d53a7 build(aio): remove "pure" property from pipe template (#16655)
This information is not relevant to users, right now.

Closes #16641
2017-05-09 15:44:10 -07:00
Ward Bell 73505e2ff0 feat(aio): scrolling tweaks per 16619 (#16660) 2017-05-09 15:36:24 -07:00
Peter Bacon Darwin e11f5294ab build(aio): run docs after plunkers and zips (in setup) 2017-05-09 14:33:40 +01:00
Peter Bacon Darwin 0190df9cf3 build(aio): local assets are not dangling links
Closes #16615
Closes #16616
2017-05-09 14:33:40 +01:00
Ward Bell 1af42aedfa docs(aio): doc guide tweaks (GS thru Components)
Working through obvious non-image content defects, from top of menu (Getting Started) through Fundamentals/Components.
2017-05-09 14:27:27 +01:00
Ward Bell 215611aa9e refactor(aio): rename auto-scroll -> scroll and refactor
Refactor inspired by @gkalpak feedback on PR #16619
2017-05-09 14:11:23 +01:00
Ward Bell 98d83b2e2d feat(aio): scroll back to top when TOC more-items clicked to close
closes  #16482
Usability feature. When long embedded TOC, collapsing it should scroll user to TOC top, not leave in the middle of the page.
2017-05-09 14:11:23 +01:00
Ward Bell cf7689ea7b refactor(aio): simplify/clarify some observables 2017-05-09 14:10:58 +01:00
Ward Bell 2848f0499f fix(aio): do not nav to an image url
closes #16608
Formerly, tried to navigate when user clicked an anchor with an image url (to view image in a new tab) resulting in 404.
Now ignores href URL with any extension and lets browser handle it.
2017-05-09 14:10:36 +01:00
Victor Berchet 5d4b36f80f fix(router): fix redirect to a URL with a param having multiple values (#16376)
fixes #16310

PR Close #16376
2017-05-08 17:50:33 -05:00
Victor Berchet 415a0f8047 test(router): simplify redirect tests (#16376) 2017-05-08 17:50:29 -05:00
Martin Probst e0a8376237 fix(compiler): avoid a `...null` spread in extraction (#16547)
This code only runs in ES5 mode in the test suite, so this is difficult to test.
However `updateFromTemplate` is being called with a spread operator, as
`...updateFromTemplate(...)`. The spread operator should fail on `null` values.
This change avoids the problem by always returning a (possibly empty) array.

PR Close #16547
2017-05-08 17:49:43 -05:00
Tobias Bosch f0f65443c6 fix(core): detach projected views when a parent view is destroyed (#16592)
This also clarifies via a test 
that we only update projected views when the view is created or destroyed,
but not when it is attached/detached/moved.

Fixes #15578

PR Close #16592
2017-05-08 17:49:02 -05:00
Tobias Bosch fcc91d862f fix(core): projected views should be dirty checked when the declaring component is dirty checked. (#16592)
Previously a projected view was only dirty checked when the
component in which it was inserted was dirty checked.

This fix changes the behavior so that a view is also dirty checked if
the declaring component is dirty checked.

Note: This does not change the order of change detection,
only the fact whether a projected view is dirty checked or not.

Fixes #14321
2017-05-08 17:48:58 -05:00
Ward Bell 3887d8a429 feat(aio): close sidenav in narrow (mobile) mode when select a new document (#16617)
closes #16603
As before this PR, when wide (side-by-side), the sidenav open/close status only changes when nav to/from marketing page in which case it opens for guide/api and closes for marketing page.
2017-05-08 15:41:19 -07:00
Pete Bacon Darwin 041f57cb7d feat(aio): focus search when `/` is pressed (#16636)
This will aid accessibility.

Closes #16129
2017-05-08 15:40:32 -07:00
David Herges c5ce0408a1 docs(core): EventEmitter docs for isAsync defaults (#15780)
- solves #15758
2017-05-08 10:47:53 -07:00
Jason Hodges 98dd609f89 docs(animations): remove duplicate word (#16508) 2017-05-08 10:47:13 -07:00
Peter Bacon Darwin 6dc67772b0 docs(aio): move links from nav groups to items
Fundamentals and Techniques nav groups we also links to pages. This caused
counterintuitive behaviour when clicking on them.

This commit moves each link from the group item to a children item, called
Introduction.

Closes #16604
2017-05-07 08:14:10 +01:00
Peter Bacon Darwin 5cf64266f8 docs(aio): fix sizing of marketing doc images
This commit ensures that all the images in the marketing docs are correcly
sized.

Related to #16600
2017-05-06 14:35:24 +01:00
Peter Bacon Darwin 03513e9d70 fix(aio): constrain header-link styles
The CSS rule for positioning the automated header links was too general,
causing other links inside headings to be positioned incorrectly.

Closes #16573
2017-05-06 14:32:49 +01:00
Peter Bacon Darwin b9ed97c0d9 fix(aio): do not display a Toc initially
Previously the `hasToc` was initialised to true, which caused a flash of
unwanted "Contents" [sic] even if the page was not going to need a ToC.

Closes #16597
2017-05-06 14:32:09 +01:00
Stefanie Fluin 799be9c98a feat(aio): TOC float right + service refactor
TOC appears in right panel when wide and hides embedded TOC
Right TOC panel height adjusts dynamically during scroll
Refactored `TocService` and its tests for clarity.
2017-05-06 07:13:31 +01:00
Alex Rickabaugh 566dab1140 build(aio): upgrade to @angular/service-worker@1.0.0-beta.11 (#16594) 2017-05-05 16:16:55 -07:00