New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modularization #88
Comments
Version 6 splits up the library into two npm modules: The NgxPageScrollCore module only contains the The NgxPageScroll module requires the NgxPageScrollCore module as peer dependency. It provides the directive How to upgrade:Step 1Replace
with
and run Step 2Add the
Optionally move global setting overrides (like the default duration) into |
Just one note from my upgrade experience, I had to stop using PageScrollInstance Before Upgrade import { PageScrollInstance } from "ngx-page-scroll"
const pageScrollInstance = PageScrollInstance.simpleInstance(document, "#targetname");
this.PageScrollService.start(pageScrollInstance); After Upgrade import { PageScrollService } from "ngx-page-scroll-core"
constructor(public PageScrollService:PageScrollService){
this.PageScrollService.scroll({document:document, scrollTarget:"#targetname"})
} |
Try:
The documentation has to be enhanced, until then please refer to the comments at the ngx-page-scroll/projects/ngx-page-scroll-core/src/lib/page-scroll-instance.ts Lines 10 to 49 in 2e94ba0
|
Extract core "PageScrollService" and separate it from the "pageScroll" directive for e.g. buttons. This allows usage of the PageScrollService without requiring the "@angular/router" dependency, which is only present in the directive (would resolve #40,#65 and simplify #69,#87).
The text was updated successfully, but these errors were encountered: