I have a trouble with a piece of angular code: I have a "ng-select" which works in some environments but not in others !
The model of this code is:
var imputationApp = angular.module('imputationApp', []).controller('imputationController', function($scope) {
$scope.currentSL = '';
$scope.sousLignes = [
{ "slidx":"c5!1875354624","desc":"option1 " },
{"slidx":"c9!1875379297","desc":"option 2" },
{ "slidx":"c9!1875379392","desc":"option 3" }
];
});
and the HTML:
<div ng-app="imputationApp" ng-controller="imputationController">
<fieldset> <legend>Imputation :</legend>
<select class="liste-candidats-select" ng-model="currentSL" ng-options="item as item.desc for item in sousLignes" ></select>
<br />
<span> aE: {{currentSL.desc}} / {{currentSL.slidx}} </span>
</fieldset>
</div>
It could be tested on fiddle: http://jsfiddle.net/zDvD9/78/
Alone, there is no problem.
But when integrated in more complex pages, sometimes it run, sometime not... So it's impossible for me to give more detail about it.
Could someone give me some idea how to try to debug it ? I never do it with angular, and I don't know if there is a way to catch the events on select's changes...
Thank you for any possible solution. Didier
But it'sn't better... – Didier68 Oct 13 '15 at 13:25