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
Added support for custom widget template #247
Added support for custom widget template #247
Conversation
A custom template for widgets can now be configured via the dashboardProvider.
@@ -209,6 +209,19 @@ angular.module('adf.provider', []) | |||
return this; | |||
}; | |||
|
|||
/** | |||
* @ngdoc property | |||
* @name adf.dashboardProvider#widgetCustomTemplatePath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name does not match the property name
I'm not sure that the readme is the right place for the example. There are many other custom template options which are not described in the readme. Perhaps we should create a wiki page for customising the templates and reference it from the readme. What do you think? |
Yes, sound like I good idea. Since I didnt had access to the wiki I just wrote the info in the readme 2016-05-26 19:18 GMT+02:00 Sebastian Sdorra notifications@github.com:
|
@chaaya you should be able to create wiki pages. Every user with a github account can add wiki pages. |
…ction declaration Changed from property to a set method for customWidgetTemplatePath and updated ngdocs.
Makes the code more readable than having a function at the top of the directive. When looking at the templateUrl property now you can immediatly spot whats going on.
I will create a wiki page for this instead.
Thanks again. |
You can now use your own wrapper template instead of the default bootstrap panel layout. Override the default template by specifying your custom template path via the dashboardProvider in the config phase.
The requirement for this to work is that your custom template is using the ng-click/ng-if attributes as in the default template. This gives users a way to design their unique look of angular-dashboard-framework.
An working example in production code.
...and is using the following template:
Good idea? Comments?
Thx for a good framework!!