How to use ngx-bind-io - 3 common examples

To help you get started, we’ve selected a few ngx-bind-io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rucken / core / libs / rucken / web / src / lib / components / navbar / navbar.component.ts View on Github external
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;
github rucken / core / apps / demo / src / app / app.component.ts View on Github external
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,
github rucken / core / apps / demo / src / app / pages / home-page / home-page.component.ts View on Github external
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 =&gt; data &amp;&amp; data.meta &amp;&amp; data.meta.title));
  }
}

ngx-bind-io

Directives for auto binding Input() and Output() from host component to inner in Angular9+ application

MIT
Latest version published 5 years ago

Package Health Score

42 / 100
Full package analysis

Popular ngx-bind-io functions