Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 6c0c635

Browse files
committed
docs: rename heros to heroes
1 parent ddfbbb5 commit 6c0c635

File tree

5 files changed

+70
-70
lines changed

5 files changed

+70
-70
lines changed

public/docs/_examples/cb-component-communication/ts/app/app.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 id="top">Component Communication Cookbook</h1>
22

3-
<a href="#parent-to-child">Pass data from parent to child with input binding ("Heros")</a><br/>
3+
<a href="#parent-to-child">Pass data from parent to child with input binding ("Heroes")</a><br/>
44
<a href="#parent-to-child-setter">Intercept input property changes with a setter ("Master")</a><br/>
55
<a href="#parent-to-child-on-changes">Intercept input property changes with <i>ngOnChanges</i> ("Source code version")</a><br/>
66
<a href="#child-to-parent">Parent listens for child event ("Colonize Universe")</a><br/>

public/docs/_examples/cb-dependency-injection/ts/app/hero.service.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import {Hero} from './hero';
66
export class HeroService {
77

88
//TODO move to database
9-
private _heros:Array<Hero> = [
9+
private _heroes:Array<Hero> = [
1010
new Hero(1, 'RubberMan','Hero of many talents', '123-456-7899'),
1111
new Hero(2, 'Magma','Hero of all trades', '555-555-5555'),
1212
new Hero(3, 'Mr. Nice','The name says it all','111-222-3333')
1313
];
1414

1515
getHeroById(id:number):Hero{
16-
return this._heros.filter(hero => hero.id === id)[0];
16+
return this._heroes.filter(hero => hero.id === id)[0];
1717
}
1818

1919
getAllHeroes():Array<Hero>{
20-
return this._heros;
20+
return this._heroes;
2121
}
22-
}
22+
}

public/docs/_examples/dependency-injection/e2e-spec.js

+62-62
Original file line numberDiff line numberDiff line change
@@ -9,205 +9,205 @@ describe('Dependency Injection Tests', function () {
99
});
1010

1111
describe('Cars:', function() {
12-
12+
1313
it('DI car displays as expected', function () {
1414
expectedMsg = 'DI car with 4 cylinders and Flintstone tires.';
1515
expect(element(by.css('#di')).getText()).toEqual(expectedMsg);
1616
});
17-
17+
1818
it('No DI car displays as expected', function () {
19-
expectedMsg = 'No DI car with 4 cylinders and Flintstone tires.';
19+
expectedMsg = 'No DI car with 4 cylinders and Flintstone tires.';
2020
expect(element(by.css('#nodi')).getText()).toEqual(expectedMsg);
2121
});
22-
22+
2323
it('Injector car displays as expected', function () {
24-
expectedMsg = 'Injector car with 4 cylinders and Flintstone tires.';
24+
expectedMsg = 'Injector car with 4 cylinders and Flintstone tires.';
2525
expect(element(by.css('#injector')).getText()).toEqual(expectedMsg);
2626
});
27-
27+
2828
it('Factory car displays as expected', function () {
29-
expectedMsg = 'Factory car with 4 cylinders and Flintstone tires.';
29+
expectedMsg = 'Factory car with 4 cylinders and Flintstone tires.';
3030
expect(element(by.css('#factory')).getText()).toEqual(expectedMsg);
3131
});
32-
32+
3333
it('Simple car displays as expected', function () {
34-
expectedMsg = 'Simple car with 4 cylinders and Flintstone tires.';
34+
expectedMsg = 'Simple car with 4 cylinders and Flintstone tires.';
3535
expect(element(by.css('#simple')).getText()).toEqual(expectedMsg);
3636
});
37-
37+
3838
it('Super car displays as expected', function () {
39-
expectedMsg = 'Super car with 12 cylinders and Flintstone tires.';
39+
expectedMsg = 'Super car with 12 cylinders and Flintstone tires.';
4040
expect(element(by.css('#super')).getText()).toEqual(expectedMsg);
4141
});
42-
42+
4343
it('Test car displays as expected', function () {
44-
expectedMsg = 'Test car with 8 cylinders and YokoGoodStone tires.';
44+
expectedMsg = 'Test car with 8 cylinders and YokoGoodStone tires.';
4545
expect(element(by.css('#test')).getText()).toEqual(expectedMsg);
4646
});
4747
});
48-
48+
4949
describe('Other Injections:', function() {
5050
it('DI car displays as expected', function () {
51-
expectedMsg = 'DI car with 4 cylinders and Flintstone tires.';
51+
expectedMsg = 'DI car with 4 cylinders and Flintstone tires.';
5252
expect(element(by.css('#car')).getText()).toEqual(expectedMsg);
5353
});
5454

5555
it('Hero displays as expected', function () {
56-
expectedMsg = 'Mr. Nice';
56+
expectedMsg = 'Mr. Nice';
5757
expect(element(by.css('#hero')).getText()).toEqual(expectedMsg);
5858
});
5959

6060
it('Optional injection displays as expected', function () {
61-
expectedMsg = 'R.O.U.S.\'s? I don\'t think they exist!';
61+
expectedMsg = 'R.O.U.S.\'s? I don\'t think they exist!';
6262
expect(element(by.css('#rodent')).getText()).toEqual(expectedMsg);
63-
});
63+
});
6464
});
65-
65+
6666
describe('Tests:', function() {
67-
67+
6868
it('Tests display as expected', function () {
6969
expectedMsg = /Tests passed/;
7070
expect(element(by.css('#tests')).getText()).toMatch(expectedMsg);
7171
});
7272

7373
});
74-
74+
7575
describe('Provider variations:', function() {
76-
76+
7777
it('P1 (class) displays as expected', function () {
7878
expectedMsg = 'Hello from logger provided with Logger class';
7979
expect(element(by.css('#p1')).getText()).toEqual(expectedMsg);
80-
});
81-
80+
});
81+
8282
it('P2 (Provider) displays as expected', function () {
8383
expectedMsg = 'Hello from logger provided with Provider class and useClass';
8484
expect(element(by.css('#p2')).getText()).toEqual(expectedMsg);
8585
});
86-
86+
8787
it('P3 (provide) displays as expected', function () {
8888
expectedMsg = 'Hello from logger provided with useClass';
8989
expect(element(by.css('#p3')).getText()).toEqual(expectedMsg);
9090
});
91-
91+
9292
it('P4 (useClass:BetterLogger) displays as expected', function () {
9393
expectedMsg = 'Hello from logger provided with useClass:BetterLogger';
9494
expect(element(by.css('#p4')).getText()).toEqual(expectedMsg);
9595
});
96-
96+
9797
it('P5 (useClass:EvenBetterLogger - dependency) displays as expected', function () {
9898
expectedMsg = 'Message to Bob: Hello from EvenBetterlogger.';
9999
expect(element(by.css('#p5')).getText()).toEqual(expectedMsg);
100100
});
101-
101+
102102
it('P6a (no alias) displays as expected', function () {
103103
expectedMsg = 'Hello OldLogger (but we want NewLogger)';
104104
expect(element(by.css('#p6a')).getText()).toEqual(expectedMsg);
105105
});
106-
106+
107107
it('P6b (alias) displays as expected', function () {
108108
expectedMsg = 'Hello from NewLogger (via aliased OldLogger)';
109109
expect(element(by.css('#p6b')).getText()).toEqual(expectedMsg);
110110
});
111-
111+
112112
it('P7 (useValue) displays as expected', function () {
113113
expectedMsg = 'Silent logger says "Shhhhh!". Provided via "useValue"';
114114
expect(element(by.css('#p7')).getText()).toEqual(expectedMsg);
115115
});
116-
116+
117117
it('P8 (useFactory) displays as expected', function () {
118118
expectedMsg = 'Hero service injected successfully';
119119
expect(element(by.css('#p8')).getText()).toEqual(expectedMsg);
120120
});
121-
121+
122122
it('P9a (string token) displays as expected', function () {
123123
expectedMsg = '"app.config" Application title is Dependency Injection';
124124
expect(element(by.css('#p9a')).getText()).toEqual(expectedMsg);
125125
});
126-
126+
127127
it('P9b (OpaqueToken) displays as expected', function () {
128128
expectedMsg = 'APP_CONFIG Application title is Dependency Injection';
129129
expect(element(by.css('#p9b')).getText()).toEqual(expectedMsg);
130-
});
131-
130+
});
131+
132132
it('P10a (required dependency) displays as expected', function () {
133133
expectedMsg = 'Hello from the required logger.';
134134
expect(element(by.css('#p10a')).getText()).toEqual(expectedMsg);
135135
});
136-
136+
137137
it('P10b (optional dependency) displays as expected', function () {
138138
expectedMsg = 'Optional logger was not available.';
139139
expect(element(by.css('#p10b')).getText()).toEqual(expectedMsg);
140-
})
140+
})
141141
});
142-
142+
143143
describe('User/Heroes:', function() {
144144
it('User is Bob - unauthorized', function () {
145145
expectedMsg = /Bob, is not authorized/;
146146
expect(element(by.css('#user')).getText()).toMatch(expectedMsg);
147-
});
148-
147+
});
148+
149149
it('should have button', function () {
150150
expect(element.all(by.cssContainingText('button','Next User'))
151151
.get(0).isDisplayed()).toBe(true, "'Next User' button should be displayed");
152152
});
153-
153+
154154
it('unauthorized user should have multiple unauthorized heroes', function () {
155155
var heroes = element.all(by.css('#unauthorized hero-list div'));
156-
expect(heroes.count()).toBeGreaterThan(0);
156+
expect(heroes.count()).toBeGreaterThan(0);
157157
});
158-
158+
159159
it('unauthorized user should have no secret heroes', function () {
160160
var heroes = element.all(by.css('#unauthorized hero-list div'));
161161
expect(heroes.count()).toBeGreaterThan(0);
162-
162+
163163
heroes.filter(function(elem, index){
164164
return elem.getText().then(function(text) {
165165
return /secret/.test(text);
166166
});
167167
}).then(function(filteredElements) {
168168
//console.log("******Secret heroes count: "+filteredElements.length);
169169
expect(filteredElements.length).toEqual(0);
170-
});
171-
});
172-
173-
it('unauthorized user should have no authorized heros listed', function () {
170+
});
171+
});
172+
173+
it('unauthorized user should have no authorized heroes listed', function () {
174174
expect(element.all(by.css('#authorized hero-list div')).count()).toEqual(0);
175175
});
176-
176+
177177
describe('after button click', function() {
178-
178+
179179
beforeAll(function (done) {
180180
var buttonEle = element.all(by.cssContainingText('button','Next User')).get(0);
181181
buttonEle.click().then(done,done);
182182
});
183-
183+
184184
it('User is Alice - authorized', function () {
185185
expectedMsg = /Alice, is authorized/;
186186
expect(element(by.css('#user')).getText()).toMatch(expectedMsg);
187187
});
188-
188+
189189
it('authorized user should have multiple authorized heroes ', function () {
190190
var heroes = element.all(by.css('#authorized hero-list div'));
191-
expect(heroes.count()).toBeGreaterThan(0);
191+
expect(heroes.count()).toBeGreaterThan(0);
192192
});
193-
193+
194194
it('authorized user should have secret heroes', function () {
195195
var heroes = element.all(by.css('#authorized hero-list div'));
196-
expect(heroes.count()).toBeGreaterThan(0);
197-
196+
expect(heroes.count()).toBeGreaterThan(0);
197+
198198
heroes.filter(function(elem, index){
199199
return elem.getText().then(function(text) {
200200
return /secret/.test(text);
201201
});
202202
}).then(function(filteredElements) {
203203
//console.log("******Secret heroes count: "+filteredElements.length);
204204
expect(filteredElements.length).toBeGreaterThan(0);
205-
});
206-
});
207-
208-
it('authorized user should have no unauthorized heros listed', function () {
205+
});
206+
});
207+
208+
it('authorized user should have no unauthorized heroes listed', function () {
209209
expect(element.all(by.css('#unauthorized hero-list div')).count()).toEqual(0);
210-
});
210+
});
211211
});
212-
});
212+
});
213213
});

public/docs/_examples/hierarchical-dependency-injection/e2e-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('Hierarchical dependency injection', function () {
99
"edit button should be displayed");
1010
});
1111

12-
it('should have multiple heros listed', function () {
12+
it('should have multiple heroes listed', function () {
1313
expect(element.all(by.css('heroes-list li')).count()).toBeGreaterThan(1);
1414
});
1515

public/docs/ts/latest/guide/router-aux.jade

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
:marked
2626
In this auxiliary chat experience, it overlays the current screen and persists.
27-
If you navigate from the Heros to Crisis Center, the chat auxiliary route remains
27+
If you navigate from the Heroes to Crisis Center, the chat auxiliary route remains
2828
active and in view.
2929
3030
Therefore the auxiliary routing is truly independent of the other
@@ -73,7 +73,7 @@
7373
In the chat components, we can use `RouterLink` to reference routes just the same as
7474
a normal route. Since this is inside of an Auxiliary route, these relative links will
7575
resolve within the chat component and not change the primary route (the Crisis Center or
76-
Heros pages).
76+
Heroes pages).
7777
7878
+_makeExample('router/ts/app/chat/chat-init.component.ts', 'chat-links')
7979

0 commit comments

Comments
 (0)