From the course: Building a Mobile App with AngularJS 1 and Ionic

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Reordering out list with built-in tools

Reordering out list with built-in tools - Angular Tutorial

From the course: Building a Mobile App with AngularJS 1 and Ionic

Reordering out list with built-in tools

- One of the advantages to using the JavaScript components in Ionic is that they come with some built-in functionality. One of them is to be able to reorder our list elements. So if we take a look at our finished application and we go to the Artist section, you'll notice that at the very top of the list we have this hamburger menu, that's what these three lines mean. If we click on that you'll see these icons appear next to the list items, and I can use them to reorganize our list by clicking and dragging on them. So I wanna add this functionality into my current application. So the first thing I need to do is move the ng-controller directive. Right now this is only available to our list elements. I wanna be able to control things in the header, so this needs to go somewhere up here right in the ion-pane where it's gonna have access to not just the content but also the header. So I'm gonna save this. It's not really gonna do anything. And then I'm gonna add another button right after…

Contents