Skip to content

Instantly share code, notes, and snippets.

@aarshtalati
Created Dec 30, 2016
Embed
What would you like to do?
AngularJS approach for using Kendo UI
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Index </h2>
<div data-ng-controller="home" data-ng-init="activate()">
<div>Two way binding : </div>
<ul>
<li>
Selected Date >> <b>NgFilter: </b> {{ dateObject | asDate | date:'shortDate'}} | <b>Date-String: </b> {{ dateString }} | <b>DateObject: </b> {{ dateObject | date:"EEEE, MMMM d, yyyy" }}
</li>
<li>Person ID >> {{personId}} </li>
</ul>
<div id="container">
<div>Date </div>
<input data-kendo-date-picker data-ng-model="dateString" data-k-ng-model="dateObject" />
<div>Simple Numeric Spinner (0-10) </div>
<input data-kendo-numeric-text-box="" data-k-min="0" data-k-max="10" k-ng-model="personId" data-k-step="2" data-k-options="spinnerOptions" />
<div>Person </div>
<input kendo-auto-complete="" data-ng-model="person" k-data-source="autoCompleteValues" k-data-text-field="'name'" k-data-value-field="'id'" />
ID : {{personId}} & Name : {{person}}
<div>Look up Table : </div>
<table border="1">
<tr data-ng-repeat="p in ppl">
<td>{{p.id}} </td>
<td>{{p.name}} </td>
</tr>
</table>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment