I have installed and imported the translate module as per the instructions. It kept on throwing unexpected token export error. I'm using Angular 2.1.1.
Error : Unexpected token export
At line: export * from './index';
Am I missing something?
How do you import? SystemJS or Webpack?
@SamVerschueren I'm using Webpack.
Make sure you import from 'ng2-translate'; and not from 'ng2-translate/ng2-translate';
same problem here and solved by @SamVerschueren 's solution, thanks.
I am having the same problem when I am trying to run the app on server.
Can someone please post the solution?
Have you read my solution? Doesn't it work?
Make sure you import from 'ng2-translate'; and not from 'ng2-translate/ng2-translate';
@tejashreeKate @SamVerschueren solution works like a charm. Closing this issue as resolved.
Most helpful comment
Make sure you import
from 'ng2-translate';and notfrom 'ng2-translate/ng2-translate';