CODE:http://plnkr.co/edit/H2hmEukfjaPL1T4W298O?p=preview角度選擇錯誤不是一個函數
HTML:
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<link data-require="[email protected]*" data-semver="1.0.0" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/chosen/1.0/chosen.min.css" />
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="[email protected]" src="https://code.angularjs.org/1.2.20/angular.js" data-semver="1.2.20"></script>
<script data-require="[email protected]*" data-semver="2.1.1" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="chosen.jquery.js"></script>
<script src="chosen.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<p>Hello {{name}}!</p>
<select chosen ng-model="bar">
<option>Hi</option>
<option>This is fun</option>
<option>I like Chosen so much</option>
<option>I also like bunny rabbits</option>
<option value=""></option>
</select>
</body>
</html>
JS:
var app = angular.module('plunker', ['localytics.directives']);
我不知道爲什麼我收到這個:
TypeError: undefined is not a function at http://run.plnkr.co/lPtcBAAKhcfkB6tE/chosen.js:86:26 at https://code.angularjs.org/1.2.20/angular.js:5873:13 at Scope.$eval (https://code.angularjs.org/1.2.20/angular.js:12608:28) at Scope.$digest (https://code.angularjs.org/1.2.20/angular.js:12420:31) at Scope.$apply (https://code.angularjs.org/1.2.20/angular.js:12712:24) at https://code.angularjs.org/1.2.20/angular.js:1419:15 at Object.invoke (https://code.angularjs.org/1.2.20/angular.js:3918:17) at doBootstrap (https://code.angularjs.org/1.2.20/angular.js:1417:14) at bootstrap (https://code.angularjs.org/1.2.20/angular.js:1431:12) at angularInit (https://code.angularjs.org/1.2.20/angular.js:1344:5)
任何線索?
負荷的jQuery AngularJS之前。 – Blackhole
請在下面回答,以便我可以標記答案。謝謝 –