I need my component to remain stable without reloading every time a new page is accessed. Currently, it reloads on each page change which disrupts the functionality. This issue is particularly evident in the Header section where there is a Marquee that reloads with every new page visit, impacting user experience.
https://i.sstatic.net/7PM9G.png
The Header, highlighted in blue, features a newsfeed-like slider that refreshes whenever a different page is loaded. To address this issue, I require the component to maintain its state and avoid unnecessary reloading when navigating between pages.
-----------------UPDATE---------------
HTML code snippet:
<div class="row page-header">
<div class="col-sm-3 align-left"><img class="customer-logo" [src]="_DomSanitizationService.bypassSecurityTrustUrl('data:image/jpg;base64,'+ kioskservice.getLogo())"/></div>
<div class="col-sm-6 align-center"><marquee direction="left" scrollamount="5" behavior="scroll">{{translationservice.getExpression("Appointment.AddEdit_PostalCodeServiceError")}}</marquee></div>
<div class="col-sm-3 align-right"><i class="far fa-clock"></i>{{ clockservice.time | date:"HH:mm" }}</div>
</div>
Integration of the component into pages:
<page-header></page-header>