So i use Materialize css and Angular js..
And select doesn't updated when i change the model value (if I remove materialize from that example, everything works fine)..
Looks like binding is broken completely when i add materialize js.. Maybe somebody already solved somehow that problem..
<div class="container" ng-app="App">
<form ng-controller="Ctrl">
<div class="row">
<div class="col s12 input-field">
<select name="selectInput" ng-model="object.select">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
<label for="selectInput">Test select</label>
</div>
</div>
<div class="row">
<button class="btn" type="button" ng-click="click1()">
Test 1
</button>
</div>
<div class="row">
<button class="btn" type="button" ng-click="click2()">
Test 2
</button>
</div>
<div>
{{object.select}}
</div>
</form>
</div>
CSS:
angular.module('App', [])
.controller("Ctrl", ['$scope', function($scope) {
$scope.object = {};
$scope.object.select = "1";
$scope.click1 = function() {
$scope.object.select = "1";
}
$scope.click2 = function() {
$scope.object.select = "2";
}
$('select').material_select();
}]);