title: Angular Next and Previous button
body: <p>I'm trying to create next and previous buttons for my application.</p>
  
  <p>The pages all use one controller.  I'm new to angular, is there any advice on how can I provide navigation for a user to click either forward or backwards through the pages in the controller?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  $routeProvider.
    
      when("/", {
  
   templateUrl: "partials/home.html", 
   controller: "PageCtrl"}).
   
   when("/c1", {
    templateUrl: "categories/category1.html", 
    controller: "PageCtrl"})
    
    .when("/category2", {
     templateUrl: "categories/category2.html", 
     controller: "PageCtrl"})   
     
     .when("/category3", {
       templateUrl: "categories/category3.html", 
       controller: "PageCtrl"})
  
     .when("/category4", {
      templateUrl: "categories/category4.html", 
      controller: "PageCtrl"})
  
     .when("/category5", {
      templateUrl: "categories/category5.html", 
      controller: "PageCtrl"})
  
     .when("/category6", {
      templateUrl: "categories/category6.html", 
      controller: "PageCtrl"})
  
     .when("/category7", {
      templateUrl: "categories/category7.html", 
      controller: "PageCtrl"})
  
     .when("/category8", {
      templateUrl: "categories/category8.html", 
      controller: "PageCtrl"})
  
     .when("/category9", {
      templateUrl: "categories/category9.html", 
      controller: "PageCtrl"})</code></pre>
  </div>
  </div>
  </p>