Skip to content

maheee/angular-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

angular-snippets

Observable Input

Description

Source

Usage Example

<app-component [testInput]="'Hello World'"></app-component>
import { Component, OnInit, Input } from '@angular/core';
import { ObservableInput } from '../observableinput';
import { Observable } from 'rxjs';

@Component({
  selector: 'app-component',
  templateUrl: './component.html',
  styleUrls: ['./component.css']
})
export class Component implements OnInit {

  @ObservableInput() testInput$: Observable<string>;

  constructor() { }

  ngOnInit() {
    this.testInput$.subscribe(value => {
      console.log('V', value);
    });
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published