Skip to content

Commit 12c9bd2

Browse files
brandonrobertsjasonaden
authored andcommitted
docs: add new getting started guide (angular#27684)
PR Close angular#27684
1 parent e8768ac commit 12c9bd2

File tree

137 files changed

+2662
-671
lines changed

Some content is hidden

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

137 files changed

+2662
-671
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,10 @@ testing/** @angular/fw-test
754754
/aio/content/examples/toh-pt4/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
755755
/aio/content/examples/toh-pt5/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
756756
/aio/content/examples/toh-pt6/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
757+
/aio/content/examples/getting-started-v0/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
758+
/aio/content/examples/getting-started/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
759+
/aio/content/getting-started/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
760+
/aio/content/images/guide/getting-started/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
757761

758762

759763

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use strict'; // necessary for es6 output in node
2+
3+
import { browser, element, by } from 'protractor';
4+
5+
describe('Getting Started V0', () => {
6+
beforeEach(() => {
7+
return browser.get('/');
8+
});
9+
10+
it('should display "My Store" in the top bar', async() => {
11+
const title = await element(by.css('app-root app-top-bar h1')).getText();
12+
13+
expect(title).toEqual('My Store');
14+
});
15+
16+
it('should display "Products" on the homepage', async() => {
17+
const title = await element(by.css('app-root app-product-list h2')).getText();
18+
19+
expect(title).toEqual('Products');
20+
});
21+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"useCommonBoilerplate": false,
3+
"projectType": "getting-started"
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
p {
2+
font-family: Lato;
3+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<app-top-bar></app-top-bar>
2+
3+
<div class="container">
4+
<router-outlet></router-outlet>
5+
</div>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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 {}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { NgModule } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
import { RouterModule } from '@angular/router';
4+
import { ReactiveFormsModule } from '@angular/forms';
5+
6+
import { AppComponent } from './app.component';
7+
import { TopBarComponent } from './top-bar/top-bar.component';
8+
import { ProductListComponent } from './product-list/product-list.component';
9+
10+
@NgModule({
11+
imports: [
12+
BrowserModule,
13+
ReactiveFormsModule,
14+
RouterModule.forRoot([
15+
{ path: '', component: ProductListComponent },
16+
])
17+
],
18+
declarations: [
19+
AppComponent,
20+
TopBarComponent,
21+
ProductListComponent
22+
],
23+
bootstrap: [ AppComponent ]
24+
})
25+
export class AppModule { }

aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h2>Products</h2>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component } from '@angular/core';
2+
3+
import { products } from '../products';
4+
5+
@Component({
6+
selector: 'app-product-list',
7+
templateUrl: './product-list.component.html',
8+
styleUrls: ['./product-list.component.css']
9+
})
10+
export class ProductListComponent {
11+
products = products;
12+
13+
share() {
14+
window.alert('The product has been shared!');
15+
}
16+
}

0 commit comments

Comments
 (0)