Uncaught Error: Unexpected directive
VitaliyKovtun opened this issue · 3 comments
VitaliyKovtun commented
Hey, guys. What am I doing wrong?
Uncaught Error: Unexpected directive 'Angular2AutoScroll' imported by the module 'AppModule'
I do
import { Angular2AutoScroll } from 'angular2-auto-scroll/lib/angular2-auto-scroll.directive';
to app.module.ts
and
Angular2AutoScroll
to
imports: [
IonicModule.forRoot(MyApp),
Angular2AutoScroll
]
NagRock commented
Can you provide angular version or even better a sample project?
18 sty 2017 4:43 PM "VitaliyKovtun" <notifications@github.com> napisał(a):
… Hey, guys. What am I doing wrong?
Uncaught Error: Unexpected directive 'Angular2AutoScroll' imported by the
module 'AppModule'
I do
import { Angular2AutoScroll } from 'angular2-auto-scroll/lib/
angular2-auto-scroll.directive';
to app.module.ts
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AFiNMvua867JooK50FzbP0L4416cub57ks5rTjMtgaJpZM4LnCVC>
.
netopolit commented
@VitaliyKovtun Since Angular2AutoScroll is not a module but a directive you should add it to declarations list, not the imports list.
NagRock commented
As @netopolit said you should add it to declaration list in your module.
Closing