title: preselected values in jquery multiselect with angularjs using ng-options
body: <p>Jquery multiselect runs perfectly with ng-option. See below for my HTML, Directive and controller.   </p>
  
  <pre><code> &lt;select multiselect multiple ng-model="sched.select"  style="width:130px;" 
   ng-options="option.name for option in availableOptions track by option.value" &gt;
  
  
  .directive('multiselect', function ($timeout) {
  return {
      restrict: 'A',
      scope: {
          model: '='
      },
      transclude: true,
      require: 'ngModel',
      link: function (scope, element, attrs, controller, transclude) {
          $timeout(function() {
              transclude(function (clone) {
                  element.append(clone);
                  $(element).multiselect();
              });
          });
      }
  }
  });
  
   .controller('CreateSubject', function ($scope, factory, $cookieStore,     
   $location, $rootScope){
   $scope.availableOptions = [
   {value: "M", name: 'Monday'},
   {value: "T", name: 'Tuesday'},
   {value: "W", name: 'Wednesday'},
   {value: "Th", name: 'Thursday'},
   {value: "F", name: 'Friday'},
   {value: "S", name: 'Saturday'}    
  ];
  });
  </code></pre>
  
  <p>Now my problem is how to preselect values in this scenario? I already tried this solution <a href="https://stackoverflow.com/questions/6966260/jquery-multiselect-set-a-value-as-selected-in-the-multiselect-dropdown">JQuery multiselect - Set a value as selected in the multiselect dropdown</a> but it give me an error.</p>
  
  <pre><code>angular.js:13236 TypeError: o[e] is not a function
  at HTMLSelectElement.&lt;anonymous&gt; (bootstrap-multiselect.min.js:1)
  at Function.x.extend.each (jquery.min.js:4)
  at x.fn.x.each (jquery.min.js:4)
  at t.fn.multiselect (bootstrap-multiselect.min.js:1)
  at getschedule (controller.js:152)
  at Scope.$scope.getsubjectschedule (controller.js:181)
  at fn (eval at &lt;anonymous&gt; (angular.js:14086), &lt;anonymous&gt;:4:347)
  at expensiveCheckFn (angular.js:15076)
  at callback (angular.js:24546)
  at Scope.$eval (angular.js:16820)
  </code></pre>