Subscribing to Observable Input

Discussão em 'Angular' iniciado por bobthedeveloper, Outubro 26, 2024.

  1. Is there a way to subscribe to an Observable which is an @Input?

    For example:

    export class MyComponent implements OnInit {
    @Input() results: Observable<string[]>;
    constructor() {
    this.results.subscribe(value => ...);
    }
    }


    In this example I can't subscribe to the observable because it is null...

    Continue reading...

Compartilhe esta Página