My goal is to define this user as an array.
users = new BehaviorSubject<any>([]);
In my component, I am attempting to add the userID to the array.
this.Service.users.push(userID);
To subscribe to it, I use the following code:
this.Service.users.subscribe(x=>{
});
However, I am encountering the error message:
The property 'push' does not exist on type 'BehaviorSubject'