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

ES6/2015 importing angular-filter ? #215

Open
iangregsondev opened this issue Aug 17, 2016 · 1 comment
Open

ES6/2015 importing angular-filter ? #215

iangregsondev opened this issue Aug 17, 2016 · 1 comment

Comments

@iangregsondev
Copy link

Hi,

I am trying to use es2015 to import angular-filter. I have it working from other modules but I get an error on this saying

Failed to instantiate module {} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object

I am using the following

import angularTranslate from 'angular-translate';
import angularFilter from 'angular-filter/dist/angular-filter.min';

const root = angular
  .module('info.app', [
    angularTranslate,
    angularFilter
  ])

If I remove the angularFilter from the module then everything starts to work. Maybe I am not importing it correctly ?

Any help appreciated.

Thanks

@Den-dp
Copy link
Contributor

Den-dp commented Nov 11, 2016

import angularFilter from 'angular-filter';

export default angular.module('app', [
    angularFilter
])
    .name;

works just fine

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