lordfriend / nya-bootstrap-select

An AngularJS select replacement which build select like dropdown component with collection and ng-model support
http://nya.io/nya-bootstrap-select/
MIT License
179 stars 81 forks source link

Production setting on the angular app break the selector #110

Closed vladlep closed 8 years ago

vladlep commented 8 years ago

Hi,

When disabling the debuging in angularjs in production, as it is suggested in the guide: $compileProvider.debugInfoEnabled(false) the library breaks:

https://docs.angularjs.org/guide/production

The error is of the form:

TypeError: Cannot read property 'year' of undefined
at getOptionValue (nya-bs-select.js:1105)
at nya-bs-select.js:1177
at angular.js:17711
at completeOutstandingRequest (angular.js:5396)
at angular.js:5668

My code is as follows:

<ol class="col-md-3 nya-bs-select" ng-model="customerCtrl.customer.year">
    <li nya-bs-option="year in customerCtrl.yearOptions.years" ng-value="year">
        <a>{{ year }}</a>
    </li>
</ol>                                        

I tried many things and if I enable debugging it works, if it is disabled I could not make it work.

Thanks for any suggestions, Vlad

lordfriend commented 8 years ago

This bug should be fixed sine v2.1.0 the same bug is fixed #43

vladlep commented 8 years ago

ohh sorry i missed that one. Thanks for the reply and for the fix!