Tag SELECT is duplicating with Materializecss and Angularjs

Asked

Viewed 85 times

0

Then, I have in a view a select, as the code below:

    <select ng-model="Dashboard.FiltroChamadas.grupoSelecionado">
      <option value="" disabled selected>Selecione um grupo</option>
      <option ng-repeat="grupo in Dashboard.grupos" value="{{grupo._id}}">{{grupo.nome}}</option>
    </select>

in my controller I have the following code:

$(document).ready(function(){
  $('ul.tabs').tabs();
  $('select').material_select();
});

The problem is that this select is being duplicated. It appears once with the Materialize style and again below without any style (pure html). I have tried not to do the initialization as it is there and in the documentation of the materialize.. this way the page is loaded right, but when selecting an item from select it is duplicated. I have no idea what is occurring... Help

1 answer

1

Could be the Materialize versions you’re using.

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/js/materialize.min.js"></script>

Following link from Plunker working.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.