|
1 | 1 | <!DOCTYPE html>
|
2 |
| -<html lang="en" ng-app="DemoApp"> |
| 2 | +<html lang="en" ng-app="demo"> |
3 | 3 | <head>
|
4 | 4 | <meta charset="utf-8">
|
5 | 5 | <title>AngularJS ui-select</title>
|
|
20 | 20 |
|
21 | 21 | <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.js"></script>
|
22 | 22 |
|
| 23 | + <!-- ui-select files --> |
23 | 24 | <script src="../dist/select.js"></script>
|
| 25 | + <link rel="stylesheet" href="../dist/select.css"> |
| 26 | + |
| 27 | + <script src="demo.js"></script> |
24 | 28 |
|
25 | 29 | <!-- Select2 theme -->
|
26 | 30 | <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.css">
|
|
48 | 52 | </head>
|
49 | 53 |
|
50 | 54 | <body ng-controller="MainCtrl">
|
| 55 | + <script src="demo.js"></script> |
| 56 | + |
51 | 57 | <p>Selected: {{person.selected.name}}</p>
|
52 | 58 |
|
53 | 59 | <p>Select2 theme (default):</p>
|
|
67 | 73 | <div>{{item.email}}</div>
|
68 | 74 | </choices>
|
69 | 75 | </ui-select>
|
70 |
| - |
71 |
| - <script> |
72 |
| - angular.module('DemoApp', ['ui.select']) |
73 |
| - .config(function(uiSelectConfig) { |
74 |
| - // uiSelectConfig.defaultTheme = 'select2'; |
75 |
| - // uiSelectConfig.defaultTheme = 'selectize'; |
76 |
| - }) |
77 |
| - .controller('MainCtrl', ['$scope', function ($scope) { |
78 |
| - $scope.person = {}; |
79 |
| - $scope.people = [ |
80 |
| - { name: 'Wladimir Coka', email: '[email protected]' }, |
81 |
| - { name: 'Samantha Smith', email: '[email protected]' }, |
82 |
| - { name: 'Estefanía Smith', email: '[email protected]' }, |
83 |
| - { name: 'Natasha Jones', email: '[email protected]' }, |
84 |
| - { name: 'Nicole Smith', email: '[email protected]' }, |
85 |
| - { name: 'Adrian Jones', email: '[email protected]' }, |
86 |
| - ]; |
87 |
| - } |
88 |
| - ]); |
89 |
| - </script> |
90 | 76 | </body>
|
91 | 77 | </html>
|
0 commit comments