This file contains hidden or 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 { Component, OnInit } from '@angular/core'; | |
| import { filter } from 'rxjs/operators'; | |
| import { NavigationEnd, NavigationStart, Router } from '@angular/router'; | |
| @Component({ | |
| selector: 'my-app', | |
| templateUrl: './app.component.html', | |
| }) | |
| export class AppComponent implements OnInit { | |
| isLoadingRoute: boolean = false; |
This file contains hidden or 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 { Component, OnInit } from '@angular/core'; | |
| import { ActivatedRoute } from '@angular/router'; | |
| @Component({ | |
| selector: 'pilots-list', | |
| templateUrl: 'pilots-list.component.html', | |
| }) | |
| export class PilotsListComponent implements OnInit { | |
| pilotsList: []; |
This file contains hidden or 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 { HashLocationStrategy, LocationStrategy } from '@angular/common'; | |
| import { PilotsListComponent } from './components/pilots-list/pilots-list.component'; | |
| import { PilotsListResolver } from './resolvers/pilots-list.resolver'; | |
| const pilotRoutes: Routes = [ | |
| { | |
| component: PilotsListComponent, |
This file contains hidden or 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 { Injectable } from '@angular/core'; | |
| import { Resolve } from '@angular/router'; | |
| import { PilotService } from '../services/pilot.service'; | |
| import { Observable } from 'rxjs'; | |
| @Injectable() | |
| export class PilotsListResolver implements Resolve<Observable<any>> { | |
| constructor(private pilotService: PilotService) {} | |
| resolve(): Observable<any> { |
This file contains hidden or 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
| /*jslint nomen: true */ | |
| window.App = window.App || {}; | |
| window.App.ModuleName = (function (document, $) { | |
| 'use strict'; //OPTIONAL if you don't want your code to be strict | |
| var _vars, _els, _privateMethod, init; | |
This file contains hidden or 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
| window.App = window.App or {} | |
| window.App.Module = do (document = document, window = window, $ = jQuery) -> | |
| # Module's common variables (private) | |
| _vars = | |
| yThreshold: 0 | |
| windowHeight: 0 | |
| videoPlaying: null | |
| videoToPlay: null | |
| # Module's common elements (private) |