Search code examples
angularionic-frameworkionic2angular2-servicesangular5

Angular 5 how to keep component's activity going on in background (Ionic 3)


I found when Angular component is loaded on parent HTML file, it will lose its activity as a user navigates to other parts of parent HTML file.

For instance, inside angular component, I have a CSS3 animation going on triggered by a start animation button on angular component.

When I navigate to other part of its parent html file, angular component's CSS3 animation will automatically stop and I will have to manually trigger it again.

Is there any way to keep that animation going in Angular component when the component is hidden / in background?

It looks like component automatically goes back to its default state when it's hidden / in background.

Thanks in advance!


Solution

  • I maybe misunderstood your needs, but have you seen this ? https://github.com/katzer/cordova-plugin-background-mode