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 { Injectable } from '@angular/core'; | |
import { fromEvent, NextObserver, Observable, Subject, Subscription, timer } from 'rxjs'; | |
import { _throw } from 'rxjs/observable/throw'; | |
import { finalize, mergeMap, retryWhen, take } from 'rxjs/operators'; | |
import { WebSocketSubject } from 'rxjs/webSocket'; | |
import { environment } from '../../../environments/environment'; | |
import { AuthService } from './authentication.service'; | |
@Injectable() | |
export class SocketService { |
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
/* | |
* Custom Translate Loader to reload lang JSON on network failure | |
*/ | |
import { TranslateLoader } from "@ngx-translate/core"; | |
import { Injectable } from "@angular/core"; | |
import { HttpHeaders, HttpClient } from "@angular/common/http"; | |
import { ConnectionService } from "."; | |
import { Observable } from "rxjs"; | |
import { filter, take } from "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
import { ModuleWithProviders } from '@angular/core'; | |
import { Routes, RouterModule } from '@angular/router'; | |
import { AuthGuard, SocketInitialize } from './shared/services/authguard.service'; | |
const APP_ROUTES: Routes = [ | |
{ path: '', loadChildren: './landing/landing.module#LandingModule' }, | |
{ path: 'home', loadChildren: './home/home.module#HomeModule', canActivate: [AuthGuard, SocketInitialize] }, | |
{ path: '**', redirectTo: '' } | |
]; |
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
app.directive('datepickerLocaldate', ['$parse', function ($parse) { | |
var directive = { | |
restrict: 'A', | |
require: ['ngModel'], | |
link: link | |
}; | |
return directive; | |
function link(scope, element, attr, ctrls) { | |
var ngModelController = ctrls[0]; |