1361 Commits

Author SHA1 Message Date
Peter Bacon Darwin
0d63e2a586 docs(aio): copy devguide images from angular.io 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
d83b7ba4c0 refactor(aio): rename activeNodes to selectedNodes
This keeps the naming consistent with the nav-menu
and nav-item component properties
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
46d6e8d191 fix(aio): reimplement side-nav 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
61ef756ef2 fix(aio): ensure that only one request for navigation.json is made 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
3529813ca0 fix(aio): move interfaces into their own files to workaround compile weirdness
For some reason the tree-shaker is not picking up these interfaces
(perhaps TS is not passing it through) when they are in the same file
as their related services. This results in a distracting warning message.
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
b81693b30c fix(aio): no need for path and url properties in nav 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
5815983178 fix(aio): correctly intercept links with LinkDirective 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
fe962f6de7 fix(aio): LocationService urls should never start with a slash
There is a weirdness in the Angular Location service.
If the `baseHref` is only a single slash (`'/'`) then it
changes it to be an empty string (`''`). The effect of this
is that `Location.normaliseUrl(url)` does not strip off the
leading slash from url paths.

The problem is that the leading slash only appears on the
initial Location path, and not on urls that arrive from subscribing
to the Location service.

This commit is a workaround this problem.
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
04e14589c4 docs(aio): make home doc the default home page
Now the `/` url will display the home page.

Closes #14849
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
d6c1ccaf14 fix(aio): emit a hard-coded doc if file-not-found fails
Closes #14848
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
4abd6f333c fix(aio): map the empty url to the correct doc path 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
dd50922747 refactor(aio): move document path computation
Do the path computation before doing the cache look up.
2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
66cc88c8a8 fix(aio): ensure that only one request per document is made 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
b44bc9c022 test(aio): add mock services 2017-03-06 22:27:32 -08:00
Peter Bacon Darwin
ab0db66bf7 build(aio): move gulp tasks to package.json
Generate the docs with `yarn docs`.
Test the doc generation code with `yarn docs-test`

The docs are automatically built as part of the `yarn build` task,
so there is no need to rebuild them in the test_aio.sh file
2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
8757656508 build(aio): upgrade to angular 4.0.0-rc.2 2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
01ff427685 test(aio): reimplemented all the commented-out unit tests 2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
2ebfa2ff31 test(aio): add placeholder test descriptions 2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
b09ee424bf refactor(aio): reorganize search service for easier testing 2017-03-05 08:41:26 -08:00
Peter Bacon Darwin
207298cd3a build(aio): generate marketing docs JSON files 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
62eafa4eec test(aio): fix up links in app e2e test 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
4626ca2bff build(aio): add file-not-found doc 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
38bb744008 fix(aio): remove external HTML and SCSS from app component 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
dca83ec738 feat(aio): add search service and search UI 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
71e22b8d11 feat(aio): implement doc and navigation UI 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
371dc4744c feat(aio): add navigation service 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
4767f107fb feat(aio): add logger service 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
5ae4b77d8b feat(aio): add document service 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
887d32a9bf feat(aio): add location service 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
3883b736c0 build(aio): content documents should have a contents field 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
c2e672cd1c docs(aio): add NOTES 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
93c0ab7131 fix(aio): remove previous files 2017-03-02 00:21:06 -08:00
Peter Bacon Darwin
1f3198cb50 feat(aio): copy example code from angular.io 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin
3e34ba01bd docs(aio): migrate content docs from angular.io
This content was generated by a tool: https://github.com/petebacondarwin/aio-migrator
2017-02-23 23:23:58 -08:00
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
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
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
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
Pete Bacon Darwin
88755b0dae build(aio): update dgeni-packages to 0.16.8 (#14597) 2017-02-22 11:27:09 -08:00