-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I recompile the layout-dashboard directive ? #158
Comments
you may find #136 helps your case, although I personally tried out the hack suggested by @andyperlitch and couldn't get it to work! |
yes, I tried that myself and doesn`t work... |
We need a way to pass controller scope variables to the directive variables, something like this: http://stackoverflow.com/questions/13318726/easiest-way-to-pass-an-angularjs-scope-variable-from-directive-to-controller >> http://jsfiddle.net/maxisam/QrCXh/ |
I've struggled with this for a while regarding the use of the In my case, I searched for the Kendo grid class So in my refresh code, I first look for any Kendo grid in the DOM (another hack):
I then use
It's not very elegant, but it does recompile my HTML code when I'm dynamically swapping out the good luck, |
That is interesting, thanks a lot, I also found some sort of solution to my problem. In the first $scope.layoutOptions.widgetDefinitions = define_all_widget_you_want; and then after changes you can redefine $scope.layoutOptions.widgetDefinitions = less_widget_list; I will have same effect (The map has all the widgets but we are displaying less widgets :D ). So in this way I don`t need to swapp the templateUrl or recompile de directive. |
My scenario does not use the layout-dashboard, but I did find the recompile hack useful. |
No, I`m not using any WidgetDataModel yet !! |
@pitong accepted the answer on stackoverflow. |
StackOverflow thread: http://stackoverflow.com/questions/34631966/how-to-reload-recompile-refresh-directive-in-angularjs
The text was updated successfully, but these errors were encountered: