ngUpgraders / ng-forward

The default solution for those that want to write Angular 2.x style code in Angular 1.x
410 stars 36 forks source link

Pipe & Uglify #152

Open Mattchewone opened 8 years ago

Mattchewone commented 8 years ago

I am currently using browserify and babel to build my app which is working fine in conjunction with browsersync.

I tried to add in uglify which ran fine but when I loaded the app, I had issues with an @Pipe saying it could not find the provider. I have the following:

...
import { filter } from '../../../filters/filter';
@Component({
  selector: 'app-thing',
  pipes: [filter],
  inputs: ['input'],
  template: template,
  providers: [
   ...
  ]
})
...

Any ideas? Thanks

timkindberg commented 8 years ago

Could you post the exact error message?

Mattchewone commented 8 years ago

Sure, it builds fine in gulp but when I load in the browser Angular throws this:

Error: [$injector:unpr] Unknown provider: filterProvider <- filter
david-gang commented 8 years ago

Hi,

I have the same problem. The issue is that the string name of the filter is directly taken from the metastore and therefore it cannot be uglified.

$translate <- e32 <- e8848 We don't have selectors here which compensate.

Thanks, David

Mattchewone commented 8 years ago

I assume there is no way to annotate it.