This repository has been archived by the owner on Feb 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from DSchau/development
add in duration for remaining slides; fix errors in slide deck
- Loading branch information
Showing
15 changed files
with
71 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Model Driven Forms | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Lab Duration: | ||
Duration: 15:00 | ||
Lab Duration: 45:00 | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Pipes | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Lab Duration: | ||
<aside class="notes" data-markdown> | ||
Duration: 10:00 | ||
Lab Duration: 20:00 | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Structural Directives | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Duration: 15:00 | ||
Workshop: 20:00 | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
## Example | ||
|
||
Let's build a directive that applies some styles for an "old dog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,45 @@ | ||
## Example | ||
## `appDogAge` | ||
|
||
Let's build a directive that applies some styles for an "old dog" | ||
```typescript | ||
import { Directive, ElementRef, Input } from '@angular/core'; | ||
|
||
@Directive({ selector: '[appDogAge]' }) | ||
export class DogAgeDirective { | ||
private existingStyle: any; | ||
|
||
@Input() | ||
set appDogAge(age: number) { | ||
if ( age >= 14 ) { | ||
this.setStyle(); | ||
} else { | ||
this.removeStyle(); | ||
} | ||
} | ||
|
||
@Input() | ||
oldAge: number = 14; | ||
|
||
constructor(private el: ElementRef) {} | ||
|
||
private setStyle(): void { | ||
if ( !this.existingStyle ) { | ||
this.existingStyle = { | ||
color: this.el.nativeElement.style.color, | ||
textDecoration: this.el.nativeElement.style.textDecoration | ||
}; | ||
|
||
this.el.nativeElement.style.color = '#AAAAAA'; | ||
this.el.nativeElement.style.textDecoration = 'strikthrough'; | ||
} | ||
} | ||
|
||
private removeStyle(): void { | ||
if ( this.existingStyle ) { | ||
Object.keys(this.existingStyle) | ||
.forEach((key: string) => { | ||
this.el.nativeElement.style[key] = this.existingStyle[key]; | ||
}); | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,12 @@ | ||
## `appDogAge` | ||
## Lab 7 | ||
|
||
```typescript | ||
import { Directive, ElementRef, Input } from '@angular/core'; | ||
|
||
@Directive({ selector: ['appDogAge'] }) | ||
export class DogAgeDirective { | ||
private existingStyle: any; | ||
|
||
@Input() | ||
set appDogAge(age: number) { | ||
if ( age >= 14 ) { | ||
this.setStyle(); | ||
} else { | ||
this.removeStyle(); | ||
} | ||
} | ||
|
||
@Input() | ||
oldAge: number = 14; | ||
- Create an `[atEmployee]` directive in `src/app/employee/employee-list/employee.directive.ts` | ||
- This directive should take an `Employee` instance and output to the component's innerHTML the employee's name and whether an admin or not | ||
- Note: `ElementRef` from `@angular/core` is helpful, as is the following snippet | ||
|
||
constructor(private el: ElementRef) {} | ||
|
||
private setStyle(): void { | ||
if ( !this.existingStyle ) { | ||
this.existingStyle = { | ||
color: this.el.nativeElement.style.color, | ||
textDecoration: this.el.nativeElement.style.textDecoration | ||
}; | ||
|
||
this.el.nativeElement.style.color = '#AAAAAA'; | ||
this.el.nativeElement.style.textDecoration = 'strikthrough'; | ||
} | ||
} | ||
|
||
private removeStyle(): void { | ||
if ( this.existingStyle ) { | ||
Object.keys(this.existingStyle) | ||
.forEach((key: string) => { | ||
this.el.nativeElement.style[key] = this.existingStyle[key]; | ||
}); | ||
} | ||
} | ||
```typescript | ||
@Input() | ||
set someValue() { | ||
// this is called each time someValue is updated | ||
} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Module Based Routing | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Lab Duration: | ||
Duration: 25:00 | ||
Lab Duration: 0:00 | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Testing | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Lab Duration: | ||
Duration: 30:00 | ||
Lab Duration: 30:00 | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Application Performance | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Duration: 20:00 | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# Upgrade Component | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Lab Duration: | ||
Duration: 10:00 | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# Upgrade Application | ||
|
||
<aside class="notes"> | ||
Duration: | ||
Lab Duration: | ||
Duration: 10:00 | ||
</aside> |