Skip to content

Commit 95c34d2

Browse files
committed
docs: temporary TS-referencing chapters for gaps in JS/Dart
Also displays styleguide at language level Fragmented glossary for JS & Dart
1 parent 8bc53b2 commit 95c34d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+429
-815
lines changed

public/_includes/_footer.jade

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
if current.path[1]
2+
- var language = current.path[1]
3+
if current.path[2]
4+
- var version = current.path[2].replace(/\_+/gm, ".")
5+
if version && language
6+
- var styleguide = "/docs/"+language+"/"+ version +"/styleguide.html"
7+
else
8+
- var styleguide = "/docs/ts/latest/styleguide.html"
9+
110
.main-footer
211
nav.background-silver.grid-fluid
312

@@ -44,5 +53,5 @@
4453

4554
footer(class="background-steel")
4655
small.text-caption Powered by Google ©2010-2016. Code licensed under an <a href="/license" class="text-snow">MIT-style License</a>. Documentation licensed under <a class="text-snow" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
47-
a(aria-label="View Style Guide" href="/docs/styleguide.html" title="Style Guide" class="styleguide-trigger text-snow" md-button)
56+
a(aria-label="View Style Guide" href=styleguide title="Style Guide" class="styleguide-trigger text-snow" md-button)
4857
span.icon-favorite

public/_includes/_version-dropdown.jade

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
- var version = ''
66
- var page = ''
77

8-
<!-- Replace _ undscores with . dots -->
8+
<!-- Replace _ underscores with . dots -->
99
if current.path[2]
1010
- var version = current.path[2].replace(/\_+/gm, ".")
1111

12-
<!-- Replace _ undscores with . dots -->
13-
if current.path[3]
12+
if current.path[4]
13+
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
14+
- var page = current.path[3] + '/' + current.path[4] + '/'
15+
else
16+
- var page = current.path[3] + '/' + current.path[4] + '.html'
17+
18+
else if current.path[3]
1419
if public.docs[current.path[1]][current.path[2]][current.path[3]]
1520
- var page = current.path[3] + '/'
1621
else

public/docs/_includes/_ts-temp.jade

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
- var language = current.path[1]
2+
- var lang = 'your choosen language'
3+
4+
if language == 'dart'
5+
- lang = 'Dart'
6+
if language == 'js'
7+
- lang = 'JavaScript'
8+
if language == 'ts'
9+
- lang = 'TypeScript'
10+
11+
- var page = ''
12+
if current.path[4]
13+
- var page = current.path[4] + '.html'
14+
15+
- var path = '/docs/ts/latest/'+ current.path[3] + '/' + page
16+
17+
- var name = 'it'
18+
- var secondaryPath = public.docs[current.path[1]][current.path[2]][current.path[3]]
19+
if secondaryPath
20+
- var data = secondaryPath._data
21+
- var listType = data._listtype
22+
- var items = listType == 'api' ? secondaryPath : data
23+
24+
for item, slug in items
25+
if slug == current.path[4]
26+
- name = 'the <b><i>' + item.title + '</i></b> chapter'
27+
28+
p.
29+
This chapter is not yet available in #{lang}.
30+
We recommend reading the TypeScript version.
31+
a(href=path, class='md-primary md-button md-ink-ripple').
32+
Read !{name} in TypeScript
33+
// != partial(path)

public/docs/_includes/styleguide/_code-examples.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ include ../../../_includes/_util-fns
170170
as can CSS files:
171171

172172
code-example(format="linenums" language="css").
173-
/* #docregion bar */
173+
/* #docregion center-global */
174174
.center-global {
175175
max-width: 1020px;
176176
margin: 0 auto;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.grid-fluid
2+
.c10
3+
!= partial("_layouts")
4+
!= partial("_code-examples")
5+
!= partial("_alerts")
6+
!= partial("_callouts")
7+
!= partial("_tables")
8+
!= partial("_aside")
9+
10+
//!= partial("_jump-nav")

public/docs/dart/latest/_data.json

+12
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,24 @@
1111
"title": "5 Min Quickstart"
1212
},
1313

14+
"tutorial": {
15+
"icon": "list",
16+
"title": "Tutorial",
17+
"banner": "Angular 2 is currently in Beta."
18+
},
19+
1420
"guide": {
1521
"icon": "list",
1622
"title": "Developers Guide",
1723
"banner": "Angular 2 is currently in Beta."
1824
},
1925

26+
"cookbook": {
27+
"icon": "list",
28+
"title": "Cookbook",
29+
"banner": "How to solve common implementation challenges."
30+
},
31+
2032
"api": {
2133
"icon": "book",
2234
"title": "API Proposal"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"_listtype": "alpha",
3+
4+
"index": {
5+
"title": "Cookbook",
6+
"description": "A collection of recipes for common Angular application scenarios"
7+
},
8+
9+
"a1-a2-quick-reference": {
10+
"title": "Angular 1 to 2 Quick Ref",
11+
"description": "Learn how Angular 1 concepts and techniques map to Angular 2"
12+
},
13+
14+
"component-communication": {
15+
"title": "Component Interaction",
16+
"description": "Share information between different directives and components"
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")

public/docs/dart/latest/guide/_data.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"cheatsheet": {
99
"title": "Angular Cheat Sheet"
1010
},
11-
11+
1212
"architecture": {
1313
"title": "Architecture Overview"
1414
},
@@ -73,6 +73,11 @@
7373
"intro": "Angular's hierarchical dependency injection system supports nested injectors in parallel with the component tree."
7474
},
7575

76+
"upgrade": {
77+
"title": "Upgrading from 1.x",
78+
"intro": "Angular 1 applications can be incrementally upgraded to Angular 2."
79+
},
80+
7681
"glossary": {
7782
"title": "Glossary",
7883
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary"
+12-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
include ../../../../_includes/_util-fns
2+
+includeShared('{ts}', 'intro')
3+
+includeShared('{ts}', 'a2')
4+
+includeShared('{ts}', 'b-c')
5+
+includeShared('{ts}', 'd1')
6+
+includeShared('{ts}', 'd2')
7+
+includeShared('{ts}', 'e1')
8+
+includeShared('{ts}', 'e2')
9+
+includeShared('{ts}', 'f-l')
10+
+includeShared('{ts}', 'm1')
11+
+includeShared('{ts}', 'n-s')
12+
+includeShared('{ts}', 't1')
213

3-
:marked
4-
We're working on the Dart version of this glossary.
5-
In the meantime, please read the
6-
[TypeScript version of the glossary](/docs/ts/latest/guide/glossary.html).
14+
+includeShared('{ts}', 'u-z')

public/docs/dart/latest/guide/server-communication.jade

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ include ../../../../_includes/_util-fns
55
In the meantime, please see these resources:
66

77
* [Http Client](/docs/ts/latest/guide/server-communication.html):
8-
The TypeScript version of this chapter
8+
The TypeScript version of this chapter.
99

1010
* [Dart source code](https://github.com/angular/angular.io/tree/master/public/docs/_examples/server-communication/dart):
11-
A preliminary version of the example code that will appear in this chapter
12-
11+
A preliminary version of the example code that will appear in this chapter.

public/docs/dart/latest/guide/template-syntax-NEW.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include ../../../../_includes/_util-fns
22

3-
+includeShared('../../../ts/latest/guide/template-syntax.jade', 'intro')
3+
+includeShared('{ts}', 'intro')
44

55
+includeShared('../../../ts/latest/guide/template-syntax.jade', 'html-1')
66
+makeExample('template-syntax/dart/lib/app_component.html', 'my-first-app')(format=".")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../_includes/styleguide/_styleguide")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"_listtype": "ordered",
3+
4+
"index": {
5+
"title": "Tutorial: Tour of Heroes",
6+
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript."
7+
},
8+
"toh-pt1": {
9+
"title": "The Hero Editor",
10+
"intro": "We build a simple hero editor"
11+
},
12+
"toh-pt2": {
13+
"title": "Master/Detail",
14+
"intro": "We build a master/detail page with a list of heroes"
15+
},
16+
"toh-pt3": {
17+
"title": "Multiple Components",
18+
"intro": "We refactor the master/detail view into separate components"
19+
},
20+
"toh-pt4": {
21+
"title": "Services",
22+
"intro": "We create a reusable service to manage our hero data calls"
23+
},
24+
"toh-pt5": {
25+
"title": "Routing",
26+
"intro": "We add the Angular Component Router and learn to navigate among the views"
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")

public/docs/js/latest/_data.json

+12
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,24 @@
1111
"title": "5 Min Quickstart"
1212
},
1313

14+
"tutorial": {
15+
"icon": "list",
16+
"title": "Tutorial",
17+
"banner": "Angular 2 is currently in Beta."
18+
},
19+
1420
"guide": {
1521
"icon": "list",
1622
"title": "Developer Guide",
1723
"banner": "Angular 2 is currently in Beta."
1824
},
1925

26+
"cookbook": {
27+
"icon": "list",
28+
"title": "Cookbook",
29+
"banner": "How to solve common implementation challenges."
30+
},
31+
2032
"api": {
2133
"icon": "book",
2234
"title": "API Preview"
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"_listtype": "alpha",
3+
4+
"index": {
5+
"title": "Cookbook",
6+
"description": "A collection of recipes for common Angular application scenarios"
7+
},
8+
9+
"a1-a2-quick-reference": {
10+
"title": "Angular 1 to 2 Quick Ref",
11+
"description": "Learn how Angular 1 concepts and techniques map to Angular 2"
12+
},
13+
14+
"component-communication": {
15+
"title": "Component Interaction",
16+
"description": "Share information between different directives and components"
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")

public/docs/js/latest/guide/_data.json

+62-3
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,84 @@
22
"_listtype": "ordered",
33

44
"index": {
5-
"title": "Developer Guide"
5+
"title": "Developer Guides"
66
},
77

88
"cheatsheet": {
99
"title": "Angular Cheat Sheet"
1010
},
11+
12+
"architecture": {
13+
"title": "Architecture Overview"
14+
},
1115

1216
"displaying-data": {
1317
"title": "Displaying Data",
14-
"intro": "Displaying data is job number one for any good application. In Angular, you bind data to elements in HTML templates and Angular automatically updates the UI as data changes."
18+
"intro": "Interpolation and other forms of property binding help us show app data in the UI."
1519
},
1620

1721
"user-input": {
1822
"title": "User Input",
19-
"intro": "DOM events drive user input in Angular. You can use the native events like click, mouseover, and keyup. Angular uses a special syntax to register events to DOM elements. This section covers all the ins and outs of using the event syntax."
23+
"intro": "User input triggers DOM events. We listen to those events with event bindings that funnel updated values back into our components and models."
2024
},
2125

2226
"forms": {
2327
"title": "Forms",
2428
"intro": "A form creates a cohesive, effective, and compelling data entry experience. An Angular form coordinates a set of data-bound user controls, tracks changes, validates input, and presents errors."
29+
},
30+
31+
"dependency-injection": {
32+
"title": "Dependency Injection",
33+
"intro": "Angular's dependency injection system creates and delivers dependent services \"just-in-time\"."
34+
},
35+
36+
"template-syntax": {
37+
"title": "Template Syntax",
38+
"intro": "Learn how to write templates that display data and consume user events with the help of data binding."
39+
},
40+
41+
"pipes": {
42+
"title": "Pipes",
43+
"intro": "Pipes transform displayed values within a template."
44+
},
45+
46+
"router": {
47+
"title": "Routing & Navigation",
48+
"intro": "Discover the basics of screen navigation with the Angular 2 router."
49+
},
50+
51+
"server-communication": {
52+
"title": "Http Client",
53+
"intro": "Talk to a remote server with the Angular Http Client."
54+
},
55+
56+
"lifecycle-hooks": {
57+
"title": "Lifecycle Hooks",
58+
"intro": "Angular calls lifecycle hook methods on directives and components as it creates, changes, and destroys them."
59+
},
60+
61+
"attribute-directives": {
62+
"title": "Attribute Directives",
63+
"intro": "Attribute directives attach behavior to elements."
64+
},
65+
66+
"structural-directives": {
67+
"title": "Structural Directives",
68+
"intro": "Angular has a powerful template engine that lets us easily manipulate the DOM structure of our elements."
69+
},
70+
71+
"hierarchical-dependency-injection": {
72+
"title": "Hierarchical Injectors",
73+
"intro": "Angular's hierarchical dependency injection system supports nested injectors in parallel with the component tree."
74+
},
75+
76+
"upgrade": {
77+
"title": "Upgrading from 1.x",
78+
"intro": "Angular 1 applications can be incrementally upgraded to Angular 2."
79+
},
80+
81+
"glossary": {
82+
"title": "Glossary",
83+
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary"
2584
}
2685
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")

0 commit comments

Comments
 (0)