angular-filter icon indicating copy to clipboard operation
angular-filter copied to clipboard

ES6/2015 importing angular-filter ?

Open iangregsondev opened this issue 9 years ago • 1 comments

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

iangregsondev avatar Aug 17 '16 07:08 iangregsondev

import angularFilter from 'angular-filter';

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

works just fine

Den-dp avatar Nov 11 '16 17:11 Den-dp