Skip to content

Commit 07af211

Browse files
committed
Adjustments to conform to video section 1/2
1 parent 3cbbf56 commit 07af211

File tree

9 files changed

+29
-22
lines changed

9 files changed

+29
-22
lines changed

app-styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ md-toolbar.dark {
120120
}
121121

122122
.md-title-icon > i {
123-
background-image: url("favicon.ico");
123+
background-image: url("pluralsight.ico");
124124
background-size: 50%;
125125
background-repeat: no-repeat;
126126
background-position: center center;

app/section-01/app.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: 'my-app',
4+
selector: 'my-app', // to use me, put <my-app> in index.html
55
template: `<h1>Hello {{name}}</h1>`
66
})
7-
export class AppComponent { name = 'Angular'; }
7+
export class AppComponent {
8+
name = 'Angular';
9+
}

app/section-01/app.module.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { BrowserModule } from '@angular/platform-browser';
33

44
import { AppComponent } from './app.component';
55

6+
// This decorator describes the class that follows it
67
@NgModule({
7-
imports: [ BrowserModule ],
8-
declarations: [ AppComponent ],
9-
bootstrap: [ AppComponent ]
8+
imports: [ BrowserModule ], // What stuff do I need?
9+
declarations: [ AppComponent ], // What's in my app?
10+
bootstrap: [ AppComponent ] // Where do I start?
1011
})
1112
export class AppModule { }

app/section-01/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2+
23
import { AppModule } from './app.module';
34

5+
// Start here --> AppModule
46
platformBrowserDynamic().bootstrapModule(AppModule);

app/section-02/app.component.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
import { Component } from '@angular/core';
22

3-
// [] means property binding - Component to DOM
4-
// () means event binding - DOM to Component
3+
// {{}} interpolation - Component to DOM
4+
// [] property binding - Component to DOM
5+
// () event binding - DOM to Component
56

67
@Component({
7-
selector: 'my-app',
8+
selector: 'my-app', // to use me, put <my-app> in index.html
89
template: `
910
<h1>{{name}}</h1>
1011
1112
<fieldset>
13+
<!-- <img src={{image}}/> -->
1214
<!-- <img src="{{image}}"/> -->
1315
<img [src]="image"/>
1416
</fieldset>
1517
1618
<fieldset>
19+
<label [style.color]="color">Favorite Color</label>
1720
<button (click)="clicked()">Toggle color</button>
18-
<label [style.color]="color">
19-
Favorite color:
2021
21-
<!-- <select #selector (change)="colorChange(selector.value)"> -->
22+
<!-- <select #selector (change)="colorChange(selector.value)"> -->
2223
23-
<select (change)="colorChange($event.target.value)">
24-
<option>red</option>
25-
<option>blue</option>
26-
<option>green</option>
27-
</select>
28-
29-
</label>
24+
<select (change)="colorChange($event.target.value)">
25+
<option>red</option>
26+
<option>blue</option>
27+
<option>green</option>
28+
</select>
3029
</fieldset>
3130
`,
3231
})

app/section-02/app.module.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { BrowserModule } from '@angular/platform-browser';
33

44
import { AppComponent } from './app.component';
55

6+
// This decorator describes the class that follows it
67
@NgModule({
7-
imports: [ BrowserModule ],
8-
declarations: [ AppComponent ],
9-
bootstrap: [ AppComponent ]
8+
imports: [ BrowserModule ], // What stuff do I need?
9+
declarations: [ AppComponent ], // What's in my app?
10+
bootstrap: [ AppComponent ] // Where do I start?
1011
})
1112
export class AppModule { }

app/section-02/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2+
23
import { AppModule } from './app.module';
34

5+
// Start here --> AppModule
46
platformBrowserDynamic().bootstrapModule(AppModule);

favicon.ico

-9.43 KB
Binary file not shown.

pluralsight.ico

14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)