In my code, I'm trying to map through an array of strings using observables and I want to see that value inside of an input. I printed my code on the console and I can see the array but I could not assign this to an input field. I also get the error Type 'Subscription' is missing the following properties from type 'Observable<any[]>': source, operator, lift, subscribe, and 3 more. I want to see the array element inside it but what I see is {{ slider$ | async }}. What should I do to fix my code?
HTML:
<input type="input" value="{{ slider$ | async }}" />
TS:
const slides = ['Slide 1', 'Slide 2', 'Slide 3', 'Slide 4'];
let slider$: Observable<any[]>;
slider$ = of(slides).pipe(map((response) => {return response;})).subscribe(console.log);