tristanguigue / angular-dynamic-layout

A lightweight AngularJS dynamic grid layout
http://tristanguigue.github.io/angular-dynamic-layout/
78 stars 35 forks source link

Added optional attribute: globaltemplate #7

Closed borntorun closed 9 years ago

borntorun commented 9 years ago

Hi, I propose include an optional attribute named 'globaltemplate' to allow to define a default template for items that do not specify its own template; (ultimaly this allow also to define a global template if no item has its own template) Using like this:

<div dynamic-layout items="cards" filters="filters" rankers="rankers", globaltemplate="'globaldefault.html'"></div>

I've mouted a demo plunkr based on your demo to show the feature.

tristanguigue commented 9 years ago

Thanks for your input, I would call that defaulttemplate rather then globaltemplate since it is used when the card's template is not defined.

borntorun commented 9 years ago

Hi Yes, defaulttemplate is a better name. Thanks.

tristanguigue commented 9 years ago

Can you change it? I'll merge the PR then

borntorun commented 9 years ago

Change made. Plunkr updated also and running ok.

tristanguigue commented 9 years ago

LGTM

borntorun commented 9 years ago

Nice...