File tree Expand file tree Collapse file tree 9 files changed +29
-22
lines changed Expand file tree Collapse file tree 9 files changed +29
-22
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ md-toolbar.dark {
120
120
}
121
121
122
122
.md-title-icon > i {
123
- background-image : url ("favicon .ico" );
123
+ background-image : url ("pluralsight .ico" );
124
124
background-size : 50% ;
125
125
background-repeat : no-repeat;
126
126
background-position : center center;
Original file line number Diff line number Diff line change 1
1
import { Component } from '@angular/core' ;
2
2
3
3
@Component ( {
4
- selector : 'my-app' ,
4
+ selector : 'my-app' , // to use me, put <my-app> in index.html
5
5
template : `<h1>Hello {{name}}</h1>`
6
6
} )
7
- export class AppComponent { name = 'Angular' ; }
7
+ export class AppComponent {
8
+ name = 'Angular' ;
9
+ }
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ import { BrowserModule } from '@angular/platform-browser';
3
3
4
4
import { AppComponent } from './app.component' ;
5
5
6
+ // This decorator describes the class that follows it
6
7
@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?
10
11
} )
11
12
export class AppModule { }
Original file line number Diff line number Diff line change 1
1
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' ;
2
+
2
3
import { AppModule } from './app.module' ;
3
4
5
+ // Start here --> AppModule
4
6
platformBrowserDynamic ( ) . bootstrapModule ( AppModule ) ;
Original file line number Diff line number Diff line change 1
1
import { Component } from '@angular/core' ;
2
2
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
5
6
6
7
@Component ( {
7
- selector : 'my-app' ,
8
+ selector : 'my-app' , // to use me, put <my-app> in index.html
8
9
template : `
9
10
<h1>{{name}}</h1>
10
11
11
12
<fieldset>
13
+ <!-- <img src={{image}}/> -->
12
14
<!-- <img src="{{image}}"/> -->
13
15
<img [src]="image"/>
14
16
</fieldset>
15
17
16
18
<fieldset>
19
+ <label [style.color]="color">Favorite Color</label>
17
20
<button (click)="clicked()">Toggle color</button>
18
- <label [style.color]="color">
19
- Favorite color:
20
21
21
- <!-- <select #selector (change)="colorChange(selector.value)"> -->
22
+ <!-- <select #selector (change)="colorChange(selector.value)"> -->
22
23
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>
30
29
</fieldset>
31
30
` ,
32
31
} )
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ import { BrowserModule } from '@angular/platform-browser';
3
3
4
4
import { AppComponent } from './app.component' ;
5
5
6
+ // This decorator describes the class that follows it
6
7
@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?
10
11
} )
11
12
export class AppModule { }
Original file line number Diff line number Diff line change 1
1
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' ;
2
+
2
3
import { AppModule } from './app.module' ;
3
4
5
+ // Start here --> AppModule
4
6
platformBrowserDynamic ( ) . bootstrapModule ( AppModule ) ;
You can’t perform that action at this time.
0 commit comments