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

Having problems setting component up #55

Closed
nirarazi opened this issue Dec 25, 2015 · 5 comments
Closed

Having problems setting component up #55

nirarazi opened this issue Dec 25, 2015 · 5 comments

Comments

@nirarazi
Copy link

I am quite a noob with ng2, but after npm installing the package, adding the import was not enough - directive wasn't rendered at all.
So, I tried importing the directives ANGULAR2_GOOGLE_MAPS_DIRECTIVES and adding them in my components directives array. Got Uncaught SyntaxError: Unexpected token : error in the browser's console.
So, I tried importing the providers ANGULAR2_GOOGLE_MAPS_PROVIDERS and adding them in my component's providers array. Still same error in console.
What am I missing?
Thanks!

@sebholstein
Copy link
Owner

Hi,

to be able to help you, I need to see your code. The best way is to create a plunker: http://plnkr.co/
You can also check out this example where everything is set up: http://plnkr.co/edit/YX7W20?p=preview

Thanks!

@nirarazi
Copy link
Author

Hi @SebastianM,
Sorry, but Plunkr doesn't seem to support npm-based projects, so I cannot simulate the same exact situation in it. This is also the reason why your demo Plunkr did not help in my case.

What I've tried to do is to create a blank angular2 project (based on the instructions on their site), and adding your component to my own component, by using npm install, import and adding the tag to my component's template HTML file.

Anything else I can do to help you help me?

Thanks a lot and Merry Christmas (if you're celebrating it...)

@sebholstein
Copy link
Owner

@nirarazi Ok great, than I know what your setup looks like. I've created a QuickStart project that is based on the Angular2 - 5 Min QuickStart guide. It uses NPM, SystemJS and TypeScript. So you can start with this project or compare what's missing in your project:

https://github.com/SebastianM/angular2-google-maps-quickstart

Let me know if that helps.

@sebholstein
Copy link
Owner

Oh, I forgot to mention: The QuickStart project is based on todays release 0.5.0, which has some breaking changes. It's documented here: CHANGELOG.md

@nirarazi
Copy link
Author

Thanks a lot, @SebastianM!!

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

2 participants