angularify / angular-semantic-ui

[WiP] AngularJS native directives for Semantic UI
http://angularify.github.io/angular-semantic-ui
MIT License
383 stars 89 forks source link

Checkbox code refactoring #43

Closed dszczyt closed 9 years ago

dszczyt commented 9 years ago

Your directives can be much lighter. Here is an example. I've added some tests to be sure it does the job. I can help to rewrite your directives like this one. Does anybody have suggestions to improve it ?

jspdown commented 9 years ago

Your code refactoring on this component is definitely better than the previous implementation. I want it merged!

As mentioned in my previous comment, we prefer single quote for Javascript and double quote for Html.

dszczyt commented 9 years ago

OK it's done. Glad you like it !

dszczyt commented 9 years ago

FYI, I wanted to keep your original syntax. But I think the "type" and "size" args are not necessary anymore : you could use <checkbox class="slider large" ng-model="myVar">[label]</checkbox> to generate a large slider... What do you think about it ?

jspdown commented 9 years ago

@dszczyt, type and size are useless if we use semantic-ui classes. In my mind, angular-semantic-ui should only provide a way to easily use semantic-ui dynamic components on an AngularJs web application. So, we should depend on their css classes every time we can. I definitely agree with you.

dszczyt commented 9 years ago

This is how it looks like. This directive becomes lighter and lighter...

jspdown commented 9 years ago

Great! Thanks @dszczyt I will try to release a new version on Bower this week.