Skip to content

Does this still work with Angular 4? #10

@austinthedeveloper

Description

@austinthedeveloper

I've been messing around with this project and no matter what I do, I'm getting this error when importing to my Angular 4+ project:

Unexpected value 'CountToModule' imported by the module 'AppModule'. Please add a @NgModule annotation.

I've tried getting this to work 2 different ways:

  • Build the original project with no modifications, link, and import the module into the project
  • Update the Angular packages to >=4.0.0, typescript to ~2.3.3, and reflect-metadata to ^0.1.10. The build succeeds. Run npm link on the dist folder.

Both are imported in the project the same way:
import { CountToModule } from 'angular-count-to';

@NgModule({
  ...
  imports [CountToModule]
  ...
});

Tslint-wise, there's no error because it's imported correctly. But as soon as I run ng-serve, I get the error above.

Are there additional instructions on how to import a module?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions