These days I tried a lot of select/Dropdown/Combobox controls in angular but on the end I realized that classic select2 (angular version) works best.
Here is link to ui-select2: https://github.com/angular-ui/ui-select2
After you implenet it you will see that it doesn't look in bootstrap style so you should download aditional css for select2: http://fk.github.io/select2-bootstrap-css/index.html
in your code you need to add this files:
<link href="content/css/select2/select2.css" rel="stylesheet" />
<link href="content/css/select2/select2-bootstrap.css" rel="stylesheet" />
<script src="scripts/select2.min.js"></script>
<script src="scripts/select2.js"></script>
Here is example:
<select class="select2-container form-control select2" ui-select2 ng-model="New.opcinaID" data-placeholder="Pick a number" ng-required="true">
<option value=""></option>
<option ng-repeat="kontakt in kontakti" value="{{kontakt.id}}">{{kontakt.naziv}}</option>
</select>
My road to build usable AngularJS app with WebAPI. Here are some tips and tutorials which I used to solve my problems and to keep solutions on one place so I can easily find it when needed.
Popularni postovi
-
These days I tried a lot of select/Dropdown/Combobox controls in angular but on the end I realized that classic select2 (angular version) wo...
-
In Web API insert this: public IHttpActionResult GetKontakti(int page = 1,int itemsPerPage = 30, string sortBy = "Nazi...
-
Source: http://stackoverflow.com/questions/21255203/angularjs-clientside-routing-and-token-authentication-with-webapi Interceptors: http...
-
In order to show ng-grid you must do this: add 'ngGrid' to app definition like this: var app = angular.module('AngularAuthApp...
-
'use strict'; app.controller('ordersController', ['$http','$scope', 'ordersService', function ($htt...
-
After reading this answers article and this blog I changed: entity . Metadata = @"res://*/Data.System.csdl|res://*/Data.Syst...
-
I found that jQuery UI datepicker when putted in directive is better than Angular UI date picker because it requires less JavaScript code be...
-
Visit: http://ngmodules.org/ There are modules for everything...
-
Here is tutorial: http://pointblankdevelopment.com.au/blog/angularjs-aspnet-web-api-2-server-side-sorting-searching-and-paging Suppose we...
-
The || operator can be used to fill in default values: var middle = stooge["middle-name"] || "(none)"; var status ...
Subscribe to:
Post Comments (Atom)
works very well, appreciate your tutorial as well as effort !
ReplyDelete