Novice
Novice

Reputation: 401

can i use angular js with kendoUi wrappers? if yes how?

I have 3 questions

  1. can i use angular js with kendoUi wrappers? if yes how?
  2. if i am using angular js and kendo-all.min.js on the same html tag let say that we are converting an input tag to auto-complete and at the same time we are binding it with ng-model then what possible affect they can produce in each other?
  3. what actually angular-kendo is?

code for Point No-2

<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/Kendo/kendo.all.min.js"></script>

<script src="~/Scripts/angular/angular.js"></script>
<script src="~/Scripts/angular/app.js"></script>*@

<script type="text/javascript">

    $(document).ready(function () {
    var data = ["akshay", "tiwari", "ranjit", "swain"];
    $("#name").kendoAutoComplete({ dataSource: data });
})

</script>

<h2>KendoAngular</h2>

<div ng-app>
    <input id="name" type ="text" ng-model="yourName"/>
    <h2>{{yourName}}</h2>

</div>

Upvotes: 0

Views: 2342

Answers (1)

lucuma
lucuma

Reputation: 18339

  1. There is a kendo project that you'll need to include: https://github.com/kendo-labs/angular-kendo

  2. What will happen is that as the user types in say an autocomplete, the selection will be bound to an angular scope item. The "wrapper" is what makes all the bindings and allow angular to be updated.

  3. From the github: angular-kendo is a directive for AngularJS that runs an element through Kendo UI declarative initialization, allowing you to take full advantage of Kendo UI within the context of an AngularJS Application.

You plunker is not including the angular adapter located at the link above.

Here are the instructions for its use: http://kendo-labs.github.io/angular-kendo/#/simple

var app = angular.module('your-angular-app', ["kendo.directives"]);  // include directives

Add data-kendo and appropriate data- attributes.

Upvotes: 4

Related Questions