Skip to content

Commit 67e950b

Browse files
Foxandxsswardbell
authored andcommitted
docs(aio): update ToH for CLI
1 parent 3997d97 commit 67e950b

182 files changed

Lines changed: 3838 additions & 4775 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict'; // necessary for es6 output in node
2+
3+
import { browser, element, by } from 'protractor';
4+
5+
describe('Tour of Heroes', () => {
6+
beforeEach(() => {
7+
return browser.get('/');
8+
});
9+
10+
it('should display "Tour of Heroes"', () => {
11+
let title = element(by.css('app-root h1')).getText();
12+
expect(title).toEqual('Tour of Heroes');
13+
});
14+
});

‎aio/content/examples/toh-pt0/example-config.json‎

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"description": "Tour of Heroes: Part 0",
3+
"basePath": "src/",
4+
"files":[
5+
"!**/*.d.ts",
6+
"!**/*.js",
7+
"!**/*.[1].*"
8+
],
9+
"tags": ["tutorial", "tour", "heroes"]
10+
}

‎aio/content/examples/toh-pt0/src/app/app.component.css‎

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>{{title}}</h1>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { TestBed, async } from '@angular/core/testing';
2+
3+
import { AppComponent } from './app.component';
4+
5+
describe('AppComponent', () => {
6+
beforeEach(async(() => {
7+
TestBed.configureTestingModule({
8+
declarations: [
9+
AppComponent
10+
],
11+
}).compileComponents();
12+
}));
13+
14+
it('should create the app', async(() => {
15+
const fixture = TestBed.createComponent(AppComponent);
16+
const app = fixture.debugElement.componentInstance;
17+
expect(app).toBeTruthy();
18+
}));
19+
20+
it(`should have as title 'app'`, async(() => {
21+
const fixture = TestBed.createComponent(AppComponent);
22+
const app = fixture.debugElement.componentInstance;
23+
expect(app.title).toEqual('app');
24+
}));
25+
26+
it('should render title in a h1 tag', async(() => {
27+
const fixture = TestBed.createComponent(AppComponent);
28+
fixture.detectChanges();
29+
const compiled = fixture.debugElement.nativeElement;
30+
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
31+
}));
32+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-root',
5+
templateUrl: './app.component.html',
6+
styleUrls: ['./app.component.css']
7+
})
8+
export class AppComponent {
9+
// #docregion set-title
10+
title = 'Tour of Heroes';
11+
// #enddocregion set-title
12+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { BrowserModule } from '@angular/platform-browser';
2+
import { NgModule } from '@angular/core';
3+
4+
import { AppComponent } from './app.component';
5+
6+
@NgModule({
7+
declarations: [
8+
AppComponent
9+
],
10+
imports: [
11+
BrowserModule
12+
],
13+
providers: [],
14+
bootstrap: [AppComponent]
15+
})
16+
export class AppModule { }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Tour of Heroes</title>
6+
<base href="/">
7+
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<link rel="icon" type="image/x-icon" href="favicon.ico">
10+
</head>
11+
<body>
12+
<app-root></app-root>
13+
</body>
14+
</html>
File renamed without changes.

0 commit comments

Comments
 (0)