-
Notifications
You must be signed in to change notification settings - Fork 1
/
simple-array.html
107 lines (91 loc) · 3.57 KB
/
simple-array.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8">
<title>ng-ui-multi-select</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="dist/gumga-chips.css">
<link rel="stylesheet" href="https://gumga.github.io/layout/gumga-layout/gumga-layout.css">
</head>
<body ng-controller="ctrl"> <br><br>
<style media="screen">
body{
background: #f5f5f5;
}
</style>
<main>
<div class="container">
<div class="row">
<div class="col-md-5">
<div class="form-group">
<label>Funcionarios: </label>
<gumga-chips placeholder="Buscar opções para selecionar..."
debounce="1"
full-mode
input-position="bottom"
ng-model="funcionarios">
<gumga-chips-item ng-repeat="item in funcionarios" ng-value="item">
{{item.nome}}
</gumga-chips-item>
<gumga-chips-option ng-repeat="option in items" ng-value="option">
{{option.nome}}
</gumga-chips-option>
</gumga-chips>
</div>
</div>
<div class="col-md-8">
<label>Model: </label>
<pre>{{funcionarios|json}}</pre>
</div>
</div>
<div class="row" ng-non-bindable>
<div class="col-md-6">
<h3>HTML</h3>
<pre><code style="font-size: 10px;" class="prettyprint"><div class="form-group">
<label>Funcionarios: </label>
<ui-multi-select placeholder="Buscar..."
close-on-select-item="false"
ng-model="funcionarios">
<ui-multi-select-item ng-repeat="item in funcionarios"
ng-value="item">
{{item.nome}}
</ui-multi-select-item>
<ui-multi-select-option ng-repeat="option in items"
ng-value="option">
{{option.nome}}
</ui-multi-select-option>
</ui-multi-select>
</div></code></pre>
</div>
<div class="col-md-6">
<h3>JavaScript</h3>
<pre><code style="font-size: 10px;" class="prettyprint">angular.module('app', ['ngUiMultiSelect'])
.controller('ctrl', function($scope, $timeout){
$scope.items = [
{ nome: 'Mateus', idade: 20},
{ nome: 'Willian', idade: 25},
{ nome: 'Felipe', idade: 25},
{ nome: 'Munif', idade: 50}
];
})</code></pre>
</div>
</div>
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script type="text/javascript" src="dist/gumga-chips.js"></script>
<script type="text/javascript">
angular.module('app', ['gumga.chips']).controller('ctrl', function($scope, $timeout, $http){
$scope.funcionarios = [];
$scope.items = [
{ nome: 'Mateus', idade: 20},
{ nome: 'Willian', idade: 25},
{ nome: 'Felipe', idade: 25},
{ nome: 'Munif', idade: 50}
];
})
</script>
</body>
</html>