CSS VS AngularJS flavors, any big differences?


#1

Are there any advantages of using one over the other? Or is it a matter of preference?

My question is not specific to lists, but here is an example…

You have the CSS version of lists:

<ul class="list">
    <li class="item">
    </li>
</ul>

And you have the Angular directive version

<ion-list>
  <ion-item ng-repeat="item in items">
    Hello, {{item}}!
  </ion-item>
</ion-list>

I’m new to Ionic, so it is not clear whether one way is better over the other way (CSS vs AngularJS directive)

(ps. I had to use parenthesis instead of brackets, as I didn’t know how to post with them so that it would show)


#2

There’s no real performance difference. Though there are some functional differences.

The directive is more AngularJS friendly. So use it if you need to show underlying option buttons, sorting, additional directives over existing list directive, etc.