Commit Graph

6802 Commits

Author SHA1 Message Date
Peter Bacon Darwin c3247c64a4 docs(aio): remove unused partial file 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 1282da1b14 feat(aio): support unannotated JSON example files 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 1c08f1a6b2 fix(aio): remove unused extractTitleFromGuides processor 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin dfed388139 fix(aio): convert API and content docs to JSON 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 5e9474d24c feat(aio): include guide and tutorial in the doc generation 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin b92f52649b fix(aio): remove unused `getExampleFilename` service 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 3f8d5ac478 feat(aio): support annotating JSON files with doc-regions
This change allows the example writer to add doc-region annotations to
files that do not allow comments. This is done by creating a clone of the
file and adding `.annotated` to the file name. This new file can contain
inline `// ...` comments that can be used to annotate the doc regions.

Example:

**package.json**

```
{
  "name": "angular.io",
  "version": "0.0.0",
  "main": "index.js",
  "repository": "git@github.com:angular/angular.git",
  "author": "Angular",
  "license": "MIT",
  "private": true,
}
````

**package.json.annotated**

```
{
  "name": "angular.io",
// #docregion version
  "version": "0.0.0",
// #enddocregion
  "main": "index.js",
  "repository": "git@github.com:angular/angular.git",
  "author": "Angular",
  "license": "MIT",
  "private": true,
}
````

This region can then be referenced in examples just like any other doc region:

```
{@example 'package.json' region="version"}
```
2017-02-23 23:23:58 -08:00
Peter Bacon Darwin bee567afad fix(aio): add `@suppress` tag that is used in the API docs 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 649bab8ff8 fix(aio): handle html docregions that do not end on the same line 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 6a9251874b fix(aio): region parser error line numbers were off by one 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin c208f97461 fix(aio): correctly handle "empty" region names 2017-02-23 23:23:58 -08:00
Jason Aden 2da3844673 build(language-service): support deep import bundling of language services (#14689) 2017-02-23 22:53:17 -08:00
Victor Berchet 41da5998cd feat(router): add an option to rerun guards and resolvers when query changes (#14624)
Closes #14514
Closes #14567
2017-02-23 22:12:30 -08:00
Matias Niemelä be8510356a fix(animations): microtasks should not be timeouts (#14687) 2017-02-23 21:23:57 -08:00
Victor Berchet 01907bafb0 build(platform-server): update parse5 to v3 (#14538) 2017-02-23 21:14:04 -08:00
Marc Laval 39f56fafdd feat(compiler-cli): add an `outFile` option to ng-xi18n
Fixes #11416
Closes #14508
Closes #14657
2017-02-23 20:39:46 -08:00
Marc Laval 234f05996c feat(compiler-cli): add a `locale` option to ng-xi18n
Fixes #12303
Closes #14537
2017-02-23 20:39:46 -08:00
Victor Berchet e99d721612 feat(compiler): Add a `enableLegacyTemplate` option to support `<template>`
When the `enableLegacyTemplate` is set to `false`, `<template>` tags and the
`template` attribute are no more used to define angular templates but are
treated as regular tag and attribute.

The default value is `true`.

In order to define a template, you have to use the `<ng-template>` tag.

This option applies to your application and all the libraries it uses. That is
you should make sure none of them rely on the legacy way to defined templates
when this option is turned off (`false`).
2017-02-23 20:03:16 -08:00
Victor Berchet bf8eb41248 feat(compiler): introduce `<ng-template>`, deprecate `<template>` and `template` attribute
The rationale of this change is to improve the inter-operability with web
components that might make use of the `<template>` tag.

DEPRECATION

The template tags and template attribute are deprecated:

    <template ngFor [ngFor]=items let-item><li>...</li></template>
    <li template="ngFor: let item of items">...</li>

should be rewritten as:

    <ng-template ngFor [ngFor]=items let-item><li>...</li></ng-template>

Note that they still be supported in 4.x with a deprecartion warning in
development mode.

MIGRATION

- `template` tags (or elements with a `template` attribute) should be rewritten
as a `ng-template` tag,
- `ng-content` selectors should be updated to referto a `ng-template` where they
use to refer to a template: `<ng-content selector="template[attr]">` should be
rewritten as `<ng-content selector="ng-template[attr]">`
- if you consume a component relying on your templates being actual `template`
elements (that is they include a `<ng-content selector="template[attr]">`). You
should  still migrate to `ng-template` and make use of `ngProjectAs` to override
the way `ng-content` sees the template:
`<ng-template projectAs="template[attr]">`
- while `template` elements are deprecated in 4.x they continue to work.
2017-02-23 20:03:16 -08:00
Victor Berchet 3f519207a4 refactor(compiler): misc + add a test for directives on inline templates 2017-02-23 20:03:16 -08:00
Dzmitry Shylovich ee747f7d0c refactor(core): change abstract classes for interfaces (#12324)
BREAKING CHANGE: Because all lifecycle hooks are now interfaces
the code that uses 'extends' keyword will no longer compile.

To migrate the code follow the example below:

Before:
```
@Component()
class SomeComponent extends OnInit {}
```
After:
```
@Component()
class SomeComponent implements OnInit {}
```

we don't expect anyone to be affected by this change.

Closes #10083
2017-02-23 18:04:51 -08:00
Chuck Jazdzewski a23634dfd0 fix(common): do not reference deprecated classes in providers (#14523) (#14523)
References to `NgFor` are now an alias for `NgForOf` instead of a
derived class.

Fixes #14521
2017-02-23 17:23:56 -08:00
Jason Aden c53621be8e build: resolve review comments on flat modules PR and fix more bugs (#14660) 2017-02-23 16:39:44 -08:00
Tobias Bosch 4b54c0e23f refactor(core): enable new animations dsl
Also deletes old tests that are not needed any
more with the new view engine.
2017-02-23 13:59:16 -08:00
Tobias Bosch ccb636c2e9 refactor: deprecate `RootRenderer` / `Renderer`
Use `RendererV2` instead of `Renderer` now. `Renderer` can still be injected
and delegates to `RendererV2`.

Use `RendererFactoryV2` instead of `RootRenderer`. `RootRenderer` cannot be used
anymore.

BREAKING CHANGE:
- `RootRenderer` cannot be used any more, use `RendererFactoryV2` instead.
  Note: `Renderer` can still be injected/used, but is deprecated.
2017-02-23 13:59:16 -08:00
Tobias Bosch d3a98c74d6 feat(core): enable new view engine 2017-02-23 13:59:16 -08:00
Matias Niemelä 187f7b68f2 refactor(animations): always remove elements right away unless they have a leave animation 2017-02-23 13:02:45 -08:00
Matias Niemelä 835e18709d refactor(animations): always flush animations when inserting children 2017-02-23 13:02:45 -08:00
Matias Niemelä 36b78e9502 refactor(animations): defer the noop engine's event deregistration 2017-02-23 13:02:45 -08:00
Tobias Bosch 4301dce7b0 fix(packaging): properly build the core-testing bundle 2017-02-23 12:57:07 -08:00
Tobias Bosch 6277f16187 fix: small fixes for view engine 2017-02-23 12:57:07 -08:00
Matias Niemelä e8d2743cfb feat(animations): noop animation module and zone fixes (#14661) 2017-02-23 08:51:00 -08:00
Tobias Bosch ab3527c99b refactor(core): view engine - misc
- fix bug when detaching view from `ApplicationRef`
- fix integration of adding `ng-reflect` attributes
  in debug mode.
2017-02-23 08:26:47 -08:00
Tobias Bosch 5049a50bf6 fix(core): host bindings and host listeners for animations
Host bindings / listeners for animation properties should use
the renderer of the component view.
2017-02-23 08:26:47 -08:00
Igor Minar 6b7937f112 test: fix flaky e2e inbox-app test due to net::ERR_SSL_PROTOCOL_ERROR from fetching google fonts (#14665)
example broken build: https://travis-ci.org/angular/angular/jobs/204456086#L2355
2017-02-22 22:00:01 -08:00
George Kalpakas 175dbce354 build: check yarn version in `check-environment` (#14499)
As discussed in
https://github.com/angular/angular/pull/14382#discussion_r100620839.
2017-02-22 20:55:25 -08:00
Ward Bell e8a27447c4 ci: update local chrome to v56
Change required in previous commit ab96257bc that upgrades the CLI version.
env.sh: protractor v.5 requires a later version of chromium. Upping to 433059/Chrome 56.
2017-02-22 17:53:56 -08:00
Ward Bell 9a2ea55bff build(aio): upgrade to CLI beta.32 and MD beta.2 2017-02-22 17:53:56 -08:00
Ward Bell a26eb4c04e test(aio): redefine pipe test as a pending test to confirm code example 2017-02-22 17:53:56 -08:00
Chuck Jazdzewski 801b09066b fix(compiler-cli): import shallow import to @angular/upgrade/static correctly (#14658)
Fixes #14648
2017-02-22 17:23:08 -08:00
vikerman a1d4769199 feat: add a PLATFORM_ID token that provides a platform id Object. (#14647) 2017-02-22 16:49:46 -08:00
Alex Rickabaugh 88bc143431 fix: app ids for better <style> management for ssr (#14632)
Currently styles are rendered to the root component element, which ensures they're cleaned up automatically
when the client application is bootstrapped. This is less than ideal as progressive rendering can cause HTML
to be rendered before the CSS is loaded, causing flicker.

This change returns to rendering <style> elements in the <head>, and introduces a mechanism for removing
them on client bootstrap. This relies on associating the server and client bootstrap. Another way to think
of this is that the client, when bootstrapping an app, needs to know whether to expect a server rendered
application exists on the page, and to identify the <style> elements that are part of that app in order
to remove them.

This is accomplished by providing a string TRANSITION_ID on both server and client. For most applications,
this will be achieved by writing a client app module that imports BrowserModule.withServerTransition({appId: <id>}).
The server app module will import this client app module and therefore inherit the provider for
TRANSITION_ID. renderModule[Factory] on the server will validate that a TRANSITION_ID has been provided.
2017-02-22 16:06:21 -08:00
Matias Niemelä 830393d234 refactor(animations): support browser animation rendering (#14578) 2017-02-22 15:14:49 -08:00
Pete Bacon Darwin 88755b0dae build(aio): update dgeni-packages to 0.16.8 (#14597) 2017-02-22 11:27:09 -08:00
Chuck Jazdzewski c9bfc59a21 fix(tsc-wrapped): use agreed on options names (#14630) 2017-02-22 10:57:01 -08:00
Chuck Jazdzewski fcc1d17ccb fix(compiler-cli): avoid generating unnecessary factories 2017-02-21 20:48:55 -08:00
Jason Aden de795ea233 perf: distrubute smaller bundled code and include es2015 bundle
TypeScript compiler will now build to ES2015 code and modules. Babili is used to minify ES2015
code, providing an initial optimization that we couldn't previously get just from Uglify. Uses
Babel to convert ES2015 to UMD/ES5 code, and Uglify to minimize the output.
2017-02-21 20:48:55 -08:00
Miško Hevery 738d93caf7 refactor: rewrite private export using the ɵ prefix 2017-02-21 20:48:55 -08:00
Tobias Bosch bb0460b93b refactor(core): don’t use switch fall through but rather multiple `if`s
V8 does this internally any ways. This way, we can also keep the existing
dirty checking order, which some apps sadly rely on.
2017-02-21 09:12:21 -08:00
Tobias Bosch 90226f7714 refactor(core): conditionally disable tests for the view engine. 2017-02-21 09:12:21 -08:00