I have a service:
@Injectable()
export class MyService implements IMyService {
   myServiceArray: Array<string> = ["hi", "hello", "yoyo"];
}
This Service is injected in a Component that updates the array of string with ngModel. When I try to print the array from the Component or from the Service everything is working fine (aka the array is updated with the ngModel).
I also @Inject such Service in another 1.
@Injectable()
export class AnotherService implements IAnotherService {
  constructor(public myService: MyService) {
  }
  printValues() {
     console.log(this.myService.myServiceArray);
  }
}
When I call printValues(), ["hi", "hello", "yoyo"] is printed even if I updated the values of the array with a model!
What am I doing wrong?
EDIT:
The code of the component is the following.
@Component({
  selector: 'app-root',
  providers: [MyService],
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppCustomerData implements IAppCustomerData {
  constructor(public myService: MyService) {
  }
}
 
     
    