Skip to content
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

Wrong configuration in Readme #341

Closed
MisuleT opened this issue Jan 31, 2019 · 3 comments
Closed

Wrong configuration in Readme #341

MisuleT opened this issue Jan 31, 2019 · 3 comments

Comments

@MisuleT
Copy link

MisuleT commented Jan 31, 2019

Hi Sebastian,

if you can import NgxPageScrollCoreModule to application you need write with NgxPageScrollCoreModule.forRoot() because there is error like this

logger.service.ts:60 Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[PageScrollService -> InjectionToken ngxps_config]:
StaticInjectorError(Platform: core)[PageScrollService -> InjectionToken ngxps_config]:
NullInjectorError: No provider for InjectionToken ngxps_config!

It is just for your information.

Have a nice day :)
Michelle

@Nolanus
Copy link
Owner

Nolanus commented Jan 31, 2019

Hi @MisuleT,
thanks for pointing that out. I committed a fix for that which will be included in the next release.

@frahmantamala
Copy link

Hi, there's the same error when running unit test
Failed: StaticInjectorError(DynamicTestModule)[InjectionToken ngxps_config]:
StaticInjectorError(Platform: core)[InjectionToken ngxps_config]:
NullInjectorError: No provider for InjectionToken ngxps_config!

import { NGXPS_CONFIG, defaultPageScrollConfig } from 'ngx-page-scroll-core';

in file spec.ts property provider TestingModule I inject this
{ provide: NGXPS_CONFIG, useValue: defaultPageScrollConfig }

@turbolego
Copy link

This worked for me:

import {NgxPageScrollCoreModule} from 'ngx-page-scroll-core';

And then:

imports:[ NgxPageScrollCoreModule.forRoot(),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants