Answers for "media$' is deprecated"

0

media$' is deprecated

ngOnInit() {
    this.mediaSub = this.mediaObserver.asObservable() // New Way asObservable()
    .pipe(
      filter((changes: MediaChange[]) => changes.length > 0),
      map((changes: MediaChange[]) => changes[0])
    ).subscribe((change: MediaChange) => {
      console.log(change.mqAlias)
    }
    )
  }
Posted by: Guest on August-25-2021

Code answers related to "media$' is deprecated"

Browse Popular Code Answers by Language