Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Component,
ElementRef,
EventEmitter,
HostListener,
Input,
isDevMode,
Output,
ViewChild
} from '@angular/core';
import { Router } from '@angular/router';
import { ILanguagesItem, LangService } from '@rucken/core';
import { BindObservable } from 'bind-observable';
import { Observable } from 'rxjs';
import { BindIoInner } from 'ngx-bind-io';
@BindIoInner()
@Component({
// tslint:disable-next-line:component-selector
selector: 'navbar',
templateUrl: './navbar.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class NavbarComponent {
@ViewChild('languagesDropdown')
languagesDropdown: ElementRef;
@Input()
showSignIn: boolean = undefined;
@Input()
showSignOut: boolean = undefined;
@Input()
title: string = undefined;
User,
UserTokenDto
} from '@rucken/core';
import { NavbarComponent } from '@rucken/web';
import { BindIoInner } from 'ngx-bind-io';
import { defineLocale } from 'ngx-bootstrap/chronos';
import { BsLocaleService } from 'ngx-bootstrap/datepicker';
import { enGbLocale, ruLocale } from 'ngx-bootstrap/locale';
import { Observable, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { APP_ROUTES } from './app.routes';
import { config } from './config/config';
defineLocale('ru', ruLocale);
defineLocale('en', enGbLocale);
@BindIoInner()
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class AppComponent implements OnDestroy, OnInit {
@ViewChild('navbar')
navbar: NavbarComponent;
public title: string;
public currentUser$: Observable;
private _destroyed$: Subject = new Subject();
constructor(
private _langService: LangService,
private _authService: AuthService,
private _tokenService: TokenService,
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { BindIoInner } from 'ngx-bind-io';
declare var require: any;
@BindIoInner()
@Component({
selector: 'home-page',
templateUrl: './home-page.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class HomePageComponent {
public readme = require('html-loader!markdown-loader!./../../../../../../README.md').replace(
'<h1 id="rucken">rucken</h1>',
''
);
title$: Observable;
constructor(private _activatedRoute: ActivatedRoute) {
this.title$ = this._activatedRoute.data.pipe(map(data => data && data.meta && data.meta.title));
}
}