Open slavafomin opened 9 years ago
Hi @slavafomin ,
Thanks for the idea. Actually my goal is to allow user to inject their own HTML template (a la $templateCache thing), but we'll see. For now seems that most of the users are happy with what's available. .
You should consider that most of the people will never tell or even understand what they really need. Some people will just skip the library if they will not like it's implementation.
The template approach looks promising however.
I totally respect their decision to use, modify, or skip my library :)
+1 on injecting HTML or some other mechanism to control the formatting (I was making similar modifications in my fork).
+1 for label formatters. Current pre generated labels simply don't look good on some designs.
I totally respect their decision to use, modify, or skip my library :)
telling users to go to "somewhere else", is not "nice", also not the right approach for a product development.
I agree, I've been integrating your directive, but after reading some of your comments regarding proposed updates (which would definitely make it more robust), I am reconsidering my choice. It seems I can't even add brackets for my labels? Which is a common way to represent abbreviations.
Hi @aljamala ,
I did put brackets in my string data (in some of earlier examples). No problem with them.
It's not the data that contains brackets. For example I want to be able to do the following: item-label="name (abbreviation)", and I don't see that output unless I remove the brackets.
@aljamala ,
Oh, that.. You are correct, at the moment they are not supported.
I've forked this and made the button and itemLabels be a template type string. Feel free to use that solution if you like.
+1 for label formatting, I am having to consider using another directive purely because I cannot display the items on two lines in the select list e.g Name Description
I could use a fork like the one above but it is not the policy here to do that
+1 for label formatting
+1
+1
+1
+1
Allow function to be passed to the
button-label-formatter
anditem-label-formatter
attributes.When component will need to generate the label for button or item, it will call this function (we can call such a function «label formatter») and pass actual item element[s] to it.
Example
It will allow developers to dynamically format labels as they see fit.
Of course we can pre-generate this labels for each item manually, but such API will make it more ellegant and friendly in my opinion and will leave original list untouched (visualization data should not be mixed with original data).