title: JQueryMobile select element not working within AngularJs ng-switch directive
body: <p>I have this HTML:</p>
  
  <pre><code>&lt;div ng-switch on="MyViewType"&gt;
    &lt;div ng-switch-when="B"&gt;
      &lt;select id="selectCatagoryFood2" data-role="listview" data-native-menu="true" ng-options="foodCatagory as foodCatagory.Description for foodCatagory in foodCatagories" ng-model="foodCatagory" ng-change="changeFoodCatagory(foodCatagory)"&gt;
      &lt;/select&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The select appears empty and do nothing if I select another value.</p>
  
  <p>Example (the first "select" works correctly, but the second doesn’t show selected value): <a href="http://plnkr.co/edit/yrXa70?p=preview" rel="nofollow noreferrer">http://plnkr.co/edit/yrXa70?p=preview</a></p>
  
  <p>The problem is similar to this other post, but this solution doesn’t work (the “Refresh” launches an exception).</p>
  
  <p><a href="https://stackoverflow.com/questions/19609551/select-value-not-init-in-angularjs-and-jquerymobile">Select Value not Init in AngularJs and JQueryMobile</a></p>
  
  <p>I think the problem is that this directive (ng-switch) removes and adds elements from the DOM and JQuery Mobile loses some objects created in the initializations of the elements.</p>