The directive gives you access to many options in the API. The API methods listed in the bottom of the docs pages (like here for example) gives you a sense of what the directive allows you to do, instead of just using the CSS associated with the class.
I’m not a ionic expert like many people in this forum, but I would say it’s cost/benefit. Will what you are trying to do need the functionality of the directive, or do you just want the pretty CSS?
If you don’t need the directive, I would not use it. But most of the lists I’m writing need the cool functionality that the driftyco people have written.
As @mbeizer says, it depends on your needs. I wouldn’t say its best practice to use ion directives, but I wouldn’t say there is a good reason not to use them either. I like the distinction between if you just need the CSS or if you need the features (such as list swipe buttons).
My rule of thumb is not to use the directives unless I need their features.
Was kind of confused because it’s not really explained in the docs and in the JS section obviously the ion variant is used whereas the css docs is using divs.
Like @gnomeontherun said:
If you only need styling (CSS)
use the CSS-version
If you need javascript functionalities like events, settings and so on
us the directive Javascript-version
I like also the seperation in the ionic-documentation between CSS / Javascript-Components.
If you use directives where you do not need them -> there are useless javascript tranformations of your dom and so on.
And everything in javascript takes time .