Skip to content

Use of minified code fails #4

@DT-gberns

Description

@DT-gberns

When I run the minified code, there's an error thrown:
Error: [$injector:unpr]

I've tested with Angular: 1.3.15

I think you need to add this after the "vinInputDirective" function.
vinInputDirective.$inject = ['vinValidatorService'];

https://github.com/rfink/angular-vin/blob/master/src/directives/vininput.js

So something like this:

`return {
scope: {
'ngModel': '=ngModel',
'vinIsValid': '=vinIsValid'
},
restrict: 'A',
require: 'ngModel',
link: vinInputController
};
}

vinInputDirective.$inject = ['vinValidatorService'];

angular.module('angular-vin')
.directive('vinInput', vinInputDirective);`

See this SO for why:
http://stackoverflow.com/questions/27727017/angular-minification-with-directive-controller

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions