How to apply custom angular directive logic after kendo grid render completed - angularjs

I am creating a custom angular directive to disable elements like input,anchor,button etc for a page containing kendo grids...
Directive works fine on other elements but not on kendo grids...few columns of the grid is having anchor tags need to disable them...
My question here is
How to apply custom logic present in my directive after kendo grid render completed...by emiting or broadcasting some action on databound event or etc...or by watching a rootscope value and changing it...
What would be the best approach i can take...will update the question soon with some codes...posting this from mobile...

Related

Angularjs hide DOM elements but still draw them so directive events fire?

I'm using ngHandsontable in an angular ui-router app. My table take 1-2 seconds to render (10x20 cells, which isnt create but fine ...).
The issue is that I cant use angular ng-if or ng-show to hide the table and show a loading template until the afterRender events fire because if I hide the hot-table dir like that, then the DOM is never drawn and obviously the afterRender event wont fire.
Any suggestions how to show a loading template while table is rendering? I'm thinking maybe an overlay? Is there an angular directive that will hide the DOM element but still insert/draw it?
<hot-table></hot-table>

bind unbind dynamically $document click event in angular JS custom directive

I want to bind body click event to custom directive. I have created a custom directive for drop down. My functionality is I want closed the option list when the user clicks on the body. The html code for drop down is created by using <ul> and <li> tag. I have used the directive several times on the page. but the page now became slow as the no. of usage of directive increased on the page. So i want to know how to dynamically bind and unbind body click event inside the directive. i used $document.bind('click',function(){//function body}); syntax to bind click event. Please help. Thanks in advance
Instead of using JQuery, you can use the link method to manipulate DOM elements and add listeners
See : the AngularJS doc
I hope it may help

Can I use a AngularJs template in a kendo multiselect itemTemplate and tagTemplate?

I have an AngularJs template that I would like to re-use with my Kendo Multiselect Item Template and Tag Template.
Is there any way to do this? I'm not sure how to pass data. When I just try to use AngularJS templates, it doesn't work.
Kendo UI templates are just a javascript functions which accepts single parameter - objects to render and return rendered html.
AngularJS template is an HTML fragment which is rendered by $compile service and stored by $templateCache.
It is theretically possible but hard way.

Kendo UI button swith angular

I have the following example.
Two kendo UI buttons and two regular buttons. Both should enable/disable the button on bottom. Only the regular buttons do and I don't understand why. Probably has something to do with the scope...
EDIT:
From another example I have, it seems like the scope is updated correctly but the ui is not updated. In my example i have another control that when I click it the ui is suddenly being updated.
Found the answer:
When clicking the kendo button the scope does change but it doesn't go through angular so angular doesn't know that the scope was changed so the digest cycle doesn't run.
So adding $scope.$apply(); at the end of the function triggers the digest.
Took the explanation from here.

ng-click does not work with Kendo grid cell template

I'm trying to use the kendo ui grid and display a link column in an AngularJS application. The column is rendered using a template. I'm using the AngularJS ng-click directive in the template to call a method when the link in a cell is clicked. ng-click does not appear to work in a column template.
Here is an example.
However a similar example that DOES NOT use a column template seems to work fine with ng-click.
Any help is greatly appreciated!

Resources