jameskleeh / angular-confirm

Confirmation modal dialog for AngularJS
Apache License 2.0
150 stars 75 forks source link

Unable to inject #60

Closed timendez closed 8 years ago

timendez commented 8 years ago

Using Angular 1, Typescript, Jade, installed via bower

Error: [$injector:strictdi] function($confirm, $timeout) is not using explicit annotation and cannot be invoked in strict mode http://errors.angularjs.org/1.4.7/$injector/strictdi?p0=function(%24confirm%2C%20%24timeout) at processor.js:61 at Function.annotate as $$annotate at Object.invoke (processor.js:61) at processor.js:61 at forEach (processor.js:61) at Object. (processor.js:61) at Object.invoke (processor.js:61) at Object.enforcedReturnValue as $get at Object.invoke (processor.js:61) at processor.js:61

simison commented 8 years ago

@Schlogen actually these issues don't happen only regarding minification, but in Strict DI Mode: https://docs.angularjs.org/guide/production

jameskleeh commented 8 years ago

I recommend what Angular states:

It is recommended to automate the explicit annotation via a tool like ng-annotate when you deploy to production (and enable strict di mode)

Or use the minified version

timendez commented 8 years ago

How do I go about using the minified version?