michaelknoch / ng2-cytoscape

11 stars 19 forks source link

Outdated example and issue when import #3

Closed Gimly closed 7 years ago

Gimly commented 7 years ago

Since the latest version of Angular, you don't have directives anymore in the components. Modules should be imported through the imports directives of the app.module.ts. The example on the readme is therefore outdated.

When I tried to add the element to the imports, I get the following error message: Unexpected value 'NgCytoscape' imported by the module 'AppModule'. Please add a @NgModule annotation.

michaelknoch commented 7 years ago

yes this is correct @Gimly, thanks for the issue. I would be so grateful if you submit a pull request to improve the example code. Assuming you have time and motivation to improve the package.

Gimly commented 7 years ago

I would be happy to help, but I'm actually a bit lost on how to fix the error I got. I can't seem to be able to import ng2-cytoscape correctly with the latest version of Angular

Gimly commented 7 years ago

Nevermind what I said earlier, I figured it out, created a pull request. This should do it hopefully :)

michaelknoch commented 7 years ago

thank you @Gimly your changes are merged