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

unknown function bootstrap, incorrect order #25

Closed
MartinMuzatko opened this issue Feb 3, 2016 · 3 comments
Closed

unknown function bootstrap, incorrect order #25

MartinMuzatko opened this issue Feb 3, 2016 · 3 comments

Comments

@MartinMuzatko
Copy link

Hello there!

I just started out to develop with Angular2.
Currently I'm extending an existing project to implement ng2-translate and I just can't get it to work.

First of all, the method bootstrap does not exist. It doesn't get imported from any of your calls either. So.. I have no idea about it. More information on that would be appreciated,

Second - How can you use TranslateService before you import it? Thats not going to work AFAIK.

Any help to resolve this issue is very much appreciated.

import {Component, OnInit, Injectable} from 'angular2/core';
import {RouteConfig, Router, ROUTER_DIRECTIVES} from 'angular2/router';
import {FORM_PROVIDERS} from 'angular2/common';
import {HTTP_PROVIDERS} from 'angular2/http';
import {TranslateService, TranslatePipe} from 'ng2-translate/ng2-translate';

@ocombe
Copy link
Collaborator

ocombe commented Feb 3, 2016

Hello,

bootstrap is the native angular2 function that you have to call to start your application. I will update the readme to add the import for that (it's: import {bootstrap} from 'angular2/platform/browser';).

And then, what do you mean by "How can you use TranslateService before you import it" ?

@ocombe
Copy link
Collaborator

ocombe commented Feb 3, 2016

Ah yes I see what you mean, I updated the readme which was outdated anyway (wrong imports since beta 1).
The doc should be more clear for you now, thanks for noticing that :)

@ocombe ocombe closed this as completed Feb 3, 2016
@MartinMuzatko
Copy link
Author

Thank you for the quick reply! Yes, I looked into the introduction and looked for it to find if I missed something in the imports.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants