Commit Graph

6982 Commits

Author SHA1 Message Date
Peter Bacon Darwin a9e91115bf build(aio): add version into navigation.json
The navigation.json is now passed through the dgeni pipeline.
The source file has been moved to `aio/content/navigation.json`
but the generated file will now appear where the original source file
was found, `aio/src/content/navigation.json`.

Everything inside `aio/src/content` is now generated and ignored by git.

The `processNavigationMap` processor in this commit adds the current version
information to the navigation.json file and verifies the relative urls in
the file map to real documents.

The navigationService exposes the versionInfo as an observable, which the
AppComponent renders at the top of the sidenav.
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 90f699fdcf build(aio): ensure that internal document links work with base href 2017-03-21 15:20:28 -05:00
Peter Bacon Darwin fd7b855cfc test(aio): fix test descriptions for ordering of processors 2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 20aab64c65 test(aio): use MockLogger in AppComponent tests
This component sends a lot of messages to the console, which makes the
test run less easy to follow.
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 2eb027a793 build(aio): don't process unnecessary example files in doc-gen
This lowers the `yarn docs` processing time by about 40% (from 50 secs
to 30 secs).
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin b0a7bc77ee build(aio): remove cheatsheet processing and content
This will be replaced by a single file migrated from angular.io
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 4e10faf1eb build(aio): add version into navigation.json
The navigation.json is now passed through the dgeni pipeline.
The source file has been moved to `aio/content/navigation.json`
but the generated file will now appear where the original source file
was found, `aio/src/content/navigation.json`.

Everything inside `aio/src/content` is now generated and ignored by git.

The `processNavigationMap` processor in this commit adds the current version
information to the navigation.json file and verifies the relative urls in
the file map to real documents.

The navigationService exposes the versionInfo as an observable, which the
AppComponent renders at the top of the sidenav.
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin a0c6d44e18 build(aio): ensure that internal document links work with base href 2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 9bc998c7a1 build(aio): use forked version of Rho rendering engine
The original Rho is too strict when it comes to markdown headings.
It requires that there be a blank line separating the heading and the
next paragraph.  The forked version here fixes that; but the Rho project
will not merge it as it goes against there basic rules.
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 1a0c6d89b1 build(aio): do not render ignored docs 2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 8c12374c4c build(aio): do not render private classes and members 2017-03-21 15:20:28 -05:00
Stefanie Fluin 45e2126273 refactor(aio): removed dead code 2017-03-21 15:20:28 -05:00
Stefanie Fluin 41497b052d feat(aio): font change and toolbar shadow 2017-03-21 15:20:28 -05:00
Igor Minar 068cad1c1b build: update to angular 4.0.0-rc.4 and service-worker@1.0.0-beta.7 2017-03-21 15:20:28 -05:00
Peter Bacon Darwin 31ef92fc36 build(aio): fix generated github links
The change from `modules` to `packages` needed to be applied to these links.
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin b4081e3713 build(aio): update to dgeni-packages 0.17.0
This new version fixes the problem with mistaking
content inside inline HTML blocks as tags

Related to #15199
2017-03-21 15:20:28 -05:00
Peter Bacon Darwin c8b4a33a7f ci(aio): lower prerender browser instances
Hopefully this will reduce aio test flakes
2017-03-21 15:20:28 -05:00
Ward Bell a13ddf2e8a feat(aio): expand nav menu branch of select item on page load 2017-03-21 15:20:28 -05:00
Tobias Bosch 64beae9527 fix(core): mark components for check when host events trigger. (#15359)
Fixes #15352

PR Close #15359
2017-03-21 14:27:01 -05:00
Alex Rickabaugh 15a082c74e fix(platform-server): throw a better error message for relative URLs (#15357)
Unlike in the browser, on the server there is no concept of a document origin.
Thus, it is illegal to make requests for relative URLs against Http on platform-server.

Currently this fails with a vague error:

Error: Uncaught (in promise): Error at resolvePromise

This change adds explicit validation and a friendlier error message:

Error: URLs requested via Http on the server must be absolute. URL: /testing

Another option considered was to track the concept of an origin for the platform
and automatically prepend it to relative URLs. This would cause automatic "local
RPCs" to be made, though, which would be an unexpected and undesirable default
behavior.

Fixes #15349

PR Close #15357
2017-03-21 14:26:51 -05:00
Matias Niemelä fbccd5cd38 fix(animations): ensure empty animate() steps work at the end of a sequence (#15328)
Closes #15310
Closes #15328

PR Close #15328
2017-03-21 14:26:43 -05:00
Tobias Bosch 1e8b132ade refactor(compiler): only produce `log` expressions for elements / text (#15350)
This change reduces the amount of generated code by only adding `log`
calls for elements and text nodes.

We need the `log` calls to allow users to jump to the right place
in the template via source maps. However, we only need it for element
and text nodes, but not for directives, queries, … as for them we 
first locate the corresponding element or text node.

Related to #15239

PR Close #15350
2017-03-21 14:26:30 -05:00
Tobias Bosch 431eb309f3 fix(core): provide `NgModuleRef` in `ViewContainerRef.createComponent`. (#15350)
This is needed to support the corner cases:
- usage of a `ComponentFactory` that was created on the fly via `Compiler`
- overwriting of the `NgModuleRef` that is associated to a
  `ComponentFactory` by the `ComponentFactoryResolver` from
  which it was read.

Fixes #15241
2017-03-21 14:26:26 -05:00
Dzmitry Shylovich 8e6995c91e fix(core): stringify shouldn't throw when toString returns null/undefined (#14975)
Fixes #14948

PR Close #14975
2017-03-21 12:20:44 -05:00
Georgios Kalpakas 0759911431 docs(compiler-cli): mention that `.ngsummary.json` files should be gitignore'd (#15047)
PR Close #15047
2017-03-21 12:20:38 -05:00
Olivier Combe 1d7693c1e1 fix(compiler): use attribute id to merge translations (#15302)
We extracted ids from i18n attributes but forgot to use them when merging the translations, resulting in an error about missing translations even when they were correctly defined.

Fixes #15234

PR Close #15302
2017-03-21 12:20:31 -05:00
Chuck Jazdzewski 16e0423085 revert: feat(compiler-cli): support metadata file aliases (#15331)
This reverts commit 0ab49d4cec.

PR Close #15331
2017-03-21 12:20:14 -05:00
Chuck Jazdzewski c2ffb6bfcd build: remove use of alias metadata (#15331) 2017-03-21 12:20:06 -05:00
Stanimira Vlaeva 2489e4ba1b fix(animations): correct the main entry path in package.json (#15300)
PR Close #15300
2017-03-20 22:36:37 -05:00
Matias Niemelä 94da80148e fix(animations): stringify boolean values as `1` and `0` (#15311)
Closes #15247
Closes #15311

PR Close #15311
2017-03-20 22:36:29 -05:00
Tobias Bosch 764e90f9bb fix(compiler): don’t call `check` if we don’t need to (#15322)
If a directive has not bindings nor has a `ngDoCheck` / `ngOnInit`
lifecycle hook, don’t generate a `check` call.

This does not have an impact on the behavior, but produces
less code.

PR Close #15322
2017-03-20 22:36:20 -05:00
Matias Niemelä 9bf2fb4a74 fix(animations): ensure enter/leave cancellations work (#15323)
Closes #15315
Closes #15323

PR Close #15323
2017-03-20 22:36:11 -05:00
Alex Rickabaugh de3d2eeeba fix(platform-server): interpret Native view encapsulation as Emulated on the server (#15155)
PR Close #15155
2017-03-20 17:14:09 -05:00
Kara Erickson a805d00256 ci(forms): add tina as secondary for forms (#15262)
PR Close #15262
2017-03-20 17:13:52 -05:00
Miško Hevery 61135bc842 fix: remove left over debugger statement (#15309)
PR Close #15309
2017-03-20 17:13:44 -05:00
Miško Hevery fa36ffda14 Revert "fix(compiler): shouldn't throw when Symbol is used as DI token (#13701)" (#15319)
This reverts commit 8b5c6b2732.

This feature is not compatible with the `Injector.get` which now only 
takes `Type` or `InjectableToken`. `Symbol` is not a valid type.

Closes #15183

PR Close #15319
2017-03-20 17:13:37 -05:00
Victor Berchet d3eda7a5b5 feat(router): add `ParamMap.keys` to get a list of parameters 2017-03-20 09:19:32 -07:00
Victor Berchet a755b715ed feat(router): introduce `ParamMap` to access parameters
The Router use the type `Params` for all of:
- position parameters,
- matrix parameters,
- query parameters.

`Params` is defined as follow `type Params = {[key: string]: any}`

Because parameters can either have single or multiple values, the type should
actually be `type Params = {[key: string]: string | string[]}`.

The client code often assumes that parameters have single values, as in the
following exemple:

```
class MyComponent {
sessionId: Observable<string>;

constructor(private route: ActivatedRoute) {}

ngOnInit() {
    this.sessionId = this.route
      .queryParams
      .map(params => params['session_id'] || 'None');
}
}

```

The problem here is that `params['session_id']` could be `string` or `string[]`
but the error is not caught at build time because of the `any` type.

Fixing the type as describe above would break the build because `sessionId`
would becomes an `Observable<string | string[]>`.

However the client code knows if it expects a single or multiple values. By
using the new `ParamMap` interface the user code can decide when it needs a
single value (calling `ParamMap.get(): string`) or multiple values (calling
`ParamMap.getAll(): string[]`).

The above exemple should be rewritten as:

```
class MyComponent {
sessionId: Observable<string>;

constructor(private route: ActivatedRoute) {}

ngOnInit() {
    this.sessionId = this.route
      .queryParamMap
      .map(paramMap => paramMap.get('session_id') || 'None');
}
}

```

Added APIs:
- `interface ParamMap`,
- `ActivatedRoute.paramMap: ParamMap`,
- `ActivatedRoute.queryParamMap: ParamMap`,
- `ActivatedRouteSnapshot.paramMap: ParamMap`,
- `ActivatedRouteSnapshot.queryParamMap: ParamMap`,
- `UrlSegment.parameterMap: ParamMap`
2017-03-20 09:19:32 -07:00
Victor Berchet a9d5de0e56 refactor(router): misc minor updates 2017-03-20 09:19:32 -07:00
Filipe Silva f634c62cb3 test: add systemjs+umd integration test (#14196)
This test ensures the `__esModule` is set on UMD bundles, thus making them compatible with SystemJS@^0.22.3.

Followup from https://github.com/frankwallis/plugin-typescript/issues/185.

PR Close #14196
2017-03-19 12:23:07 -05:00
Tobias Bosch f8c075ae27 fix(core): don’t create a comment for components with empty template. (#15260)
Fixes #15143

PR Close #15260
2017-03-19 12:22:26 -05:00
Matias Niemelä aeb99645bb test(animations): test various combinations of animations with host bindings (#15251)
PR Close #15251
2017-03-19 12:21:54 -05:00
Tobias Bosch 0d3e314df0 fix(core): trigger host animations for elements that are removed. (#15251)
Fixes #14813
Fixes #15193
2017-03-19 12:21:42 -05:00
Tobias Bosch 28ce68a13d refactor(core): view engine - change `BindingType` to `BindingFlags` (#15251) 2017-03-19 12:21:37 -05:00
Matias Niemelä 80075afe8a fix(animations): only process element nodes through the animation engine (#15268)
Closes #15267
Closes #15268

PR Close #15268
2017-03-19 10:50:07 -05:00
Jason Aden bcc29ffdd1 build: update rollup (#15258)
PR Close #15258
2017-03-17 17:39:19 -05:00
Tobias Bosch 0c43535ccc fix(core): only apply `WrappedValue` to the binding of the pipe (#15257)
Previously, a pipe that returned a `WrappedValue` would force the change
of the next bound property, independent of the binding in which the pipe
was used.

Now only the binding in which the `WrappedValue` is used will be assumed
as changed.

Fixes #15116

PR Close #15257
2017-03-17 17:38:36 -05:00
Jason Aden 49829b4a4d build: add package names to secondary endpoint package.json files (#15253)
Fixes #14736

PR Close #15253
2017-03-17 16:52:55 -05:00
Vikram Subramanian 5c5c2ae405 fix(platform-server): setup NoopAnimationsModule in ServerModule by default (#15131)
This is so that server side rendering does not throw an exception when it encounters animations on the server side and does not need the user to explicitly setup NoopAnimationsModule in their app server module.

Fixes #15098, #14784.

PR Close #15131
2017-03-17 16:21:51 -05:00
Chuck Jazdzewski 6e9264a79c fix(tsc-wrapped): emit flat module format correctly on Windows (#15215)
File name needed to be normalized before comparison when using
synthetic file names.

Fixes #15192

PR Close #15215
2017-03-17 15:35:28 -05:00