Topic: An instance of PageScrollService already exists, usually including one provider should be enough, so double check.
Aroquiassamy LA ROZE pro premium priority asked 4 years ago
Expected behavior
When I click the button it must go to the top of the page.I'm using SMOOTHSCROLL for smother tranisition effect.
Actual behavior
For the First time it works as expected.But when I refresh the page and check it ends in error as:
An instance of PageScrollService already exists, usually including one provider should be enough, so double check.
Resources (code snippets)
<div class="content" role="main" id="top">...`</div>`
<button aria-label="Button" class="btn btn-floating btn-large color-background waves-light back-to-home"
id="scrollBtn" mdbPageScroll href="#top" mdbWavesEffect pageScrollOffset="75" [pageScrollDuration]="950">
<i class="fas fa-arrow-up"></i>
<button>
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Pro
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: 9.3.1
- Device: Lenova
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 4 years ago
Please provide more details that will help us to reproduce this problem on our end. We tried to do that with the code that you included, but without success.
Aroquiassamy LA ROZE pro premium priority commented 4 years ago
Hi Arkadiusz Idzikowski, 1. I created a new Angular 9 universal project 2. Installed Md bootstrap pro version 3. I used "Smoothscroll" control in a home page 4. I serve project from dev version (npm run dev:ssr) 5. First time after page is loaded, i checked in serve terminal. There is no error 6. Press F5 in home page ( after refresh), i checked again in the serve terminal. Present new error: "An instance of PageScrollService already exists, usually including one provider should be enough, so double check."
Arkadiusz Idzikowski staff commented 4 years ago
Thank you for the details, we will try to reproduce that in app with SSR and let you know what we found.
Arkadiusz Idzikowski staff commented 4 years ago
We tried to reproduce this problem on our end, but without success. Do you use lazy loaded modules in your application?
Aroquiassamy LA ROZE pro premium priority commented 4 years ago
@Arkadiusz Idzikowski No lazy loaded modules in my application.In fact I checked with a newly created application which has MDB Package alone installed not so much code in it , In that too I was getting the same issue.
Arkadiusz Idzikowski staff commented 4 years ago
Could you send a simple demo on which we will be able to reproduce that to a.idzikowski@mdbootstrap.com?
Aroquiassamy LA ROZE pro premium priority commented 4 years ago
I didn't get any response from you for 4 months I was waiting @Arkadiusz Idzikowski I even send a mail to you. I need a solution!!!
Arkadiusz Idzikowski staff commented 4 years ago
@Aroquiassamy LA ROZE
We tried to reproduce that on our end but without success. The displayed information is only a warning, not an error and it should not be displayed in the production build of the application.
Did you encounter any problems with the component functionality?
Aroquiassamy LA ROZE pro premium priority commented 4 years ago
Hi @Arkadiusz Idzikowski ,
Successfully running in production build, but in the dev environment it occurs