Using a Modal Window with KendoUI inside of AngularJS
15,210
Solution 1
Check out this blog post:
They rewrote Angular-Kendo and have an example of a clean way to use a window.
Solution 2
@anise thanks for ur information
finally i also resolve the issue.
Controller
$scope.window;
$scope.OpenWindow= function() // custom function on click
{
$scope.DlgOptions = {
width: 550,
height: 400,
visible: false,
actions: [
"Maximize",
"Close"
]
};
$scope.window.setOptions($scope.DlgOptions);
$scope.window.center(); // open dailog in center of screen
$scope.window.open();
};
View
<div kendo-window="window" k-visible="false" k-modal="true"> </div>
Author by
Jeff Sheldon
Updated on June 05, 2022Comments
-
Jeff Sheldon about 2 years
Does anyone have any experience using KendoUI's window with AngularJS?
I'm currently using Angular-Kendo but I'm not entirely sure hot to cleanly use the window. Or if there is any other solutions for presenting a modal dialog and filling it with a form loaded via a partial I'm open to that as well.
My current code looks something like this:
HTML:
<div kendo-window id="addWindow" ng-hidden></div>
JS:
$scope.addSection = function() { $("#addWindow").data("kendoWindow").open(); return false; };
But I hate this, and it feels wrong for how I'm doing everything else. Any thoughts on a better way?