Open andrzejpindor opened 6 years ago
Which version do you use?
Version 2.3.3 downloaded from npm.
Confirm, same issue for v2.3.3 + Angular 5.2.3
same issue for v2.3.3,2.3.2,2.3,1 on angular 5.2.4
same here, angular 5.2.5 angular-io-slimscroll 2.3.3
I have the same problem as others but what worked for me was taking the slimscroll.directive.ts file from the repo and putting directly into my project. So it seems like something with the npm package?
I am also facing same issue, tried to add slimscroll.directive.ts file from the repo but still issue is not resolved.
The solution as referred by @c17r the solution is to copy slimscroll.directive.ts
from https://github.com/rd-dev-ukraine/angular-io-slimscroll/blob/master/slimscroll.directive.ts link and add it to the module where you are declaring and exporting the directive. so now you will import it like this
import {SlimScroll} from './slimscroll.directive';
it is working now as suggested by @ishan123456789
additional steps.
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {SlimScroll} from './slimscroll.directive';
@NgModule({
imports: [
CommonModule
],
declarations: [SlimScroll],
exports: [SlimScroll]
})
export class ScrollModule { }
Hi, I installed your slimscroll but got errors when trying to run it:
AppComponent.html:1 ERROR Error: StaticInjectorError(AppModule)[SlimScroll -> RendererFactory2]: StaticInjectorError(Platform: core)[SlimScroll -> RendererFactory2]: NullInjectorError: No provider for RendererFactory2! at _NullInjector.get (core.js:994) at resolveToken (core.js:1292) at tryResolveToken (core.js:1234) at StaticInjector.get (core.js:1102) at resolveToken (core.js:1292) at tryResolveToken (core.js:1234) at StaticInjector.get (core.js:1102) at resolveNgModuleDep (core.js:10847) at NgModuleRef_.get (core.js:12080) at resolveDep (core.js:12570)
My Angular version is 5.2.0. Can you help me, please?