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
@Effect({dispatch: false}) | |
changeExercise$ = this.actions$.pipe( | |
ofType(ExerciseActionTypes.Change), | |
flatMap(({ payload: exerciseId }) => [ | |
new ExerciseActions.Unload(), | |
new ExerciseActions.SaveScore(), | |
new ExerciseActions.Load(exerciseId) | |
]) | |
); |
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
const cars = [ | |
'Aston Martin', | |
'Ferrari', | |
'Porsche' | |
]; | |
const carsCopy = [...cars]; | |
const carsReversed = []; | |
while (carsCopy.length) { |
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
const cars = [ | |
'Aston Martin', | |
'Ferrari', | |
'Porsche' | |
]; | |
const carsReversed = [...cars].sort(() => 1); | |
console.log(`My cars: ${cars}`); | |
console.log(`My cars reversed: ${carsReversed}`); |
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
const { fromEvent, of } = rxjs; | |
const { | |
delay, | |
tap, | |
map, | |
filter, | |
debounceTime, | |
distinctUntilChanged, | |
switchMap | |
} = rxjs.operators; |
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
const { fromEvent, of } = rxjs; | |
const { | |
delay, | |
tap, | |
map, | |
filter, | |
debounceTime, | |
distinctUntilChanged, | |
switchMap | |
} = rxjs.operators; |
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
const { fromEvent, of } = rxjs; | |
const { | |
delay, | |
tap, | |
map, | |
filter, | |
debounceTime, | |
distinctUntilChanged, | |
switchMap | |
} = rxjs.operators; |
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
const userName = 'Chris'; | |
const adminName = 'Greg'; | |
if (userName === adminName) { | |
console.log('Logged in as the admin'); | |
} else { | |
console.log('Logged in as a regular user'); | |
} |
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
var userName = 'Chris'; | |
var adminName = 'Greg'; | |
if (userName = adminName) { | |
console.log('Logged in as the admin'); | |
} else { | |
console.log('Logged in as a regular user'); | |
} |
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
const userName = 'Chris'; | |
const adminName = 'Greg'; | |
if (userName = adminName) { | |
console.log('Logged in as the admin'); | |
} else { | |
console.log('Logged in as a regular user'); | |
} |
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
import { NgModule } from '@angular/core'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { CarsPageComponent } from './containers/cars-page/cars-page.component'; | |
import { SelectedCarPageComponent } from './containers/selected-car-page/selected-car-page.component'; | |
const routes: Routes = [ | |
{ | |
path: 'cars', | |
children: [ |
OlderNewer