title: Simple edit functionality is not working in angular js using routes?
body: <p>This is my module part.That I have written the route for listing the ccategory,add the category and edit category.</p>
  
  <pre><code>var my_app= angular.module('myApp', ['ngRoute','myApp.controllers','myApp.factory']);
  my_app.value("category_list",0);
  my_app.value("single_category",0);
  my_app. config(['$routeProvider', function ($routeProvider) {       
  
          $routeProvider.when('/category', {templateUrl: 'category/list.php', controller: 'category',activetab: 'category'});     
          $routeProvider.when('/add-category', {templateUrl: 'category/add.php', controller: 'category',activetab: 'category'});
          $routeProvider.when('/edit-category/:param', {templateUrl: 'category/add.php', activetab: 'category'});
          $routeProvider.otherwise({redirectTo: '/dashboard'});
      }]);
  </code></pre>
  
  <p>This is my controller</p>
  
  <pre><code>angular.module("myApp.controllers",[])
  
          .controller("users",function($scope,$location){           
  
          })
          .controller("category",function($scope,$location,$route,dataFactory,$routeParams,category_list,single_category){    
              $scope.param = $routeParams.param; 
  getCategory();
              function getCategory() {                
                  dataFactory.getCategoryList()
                      .success(function (msg) {
                          $scope.catagories=msg;
                  category_list=msg;
                      })
                      .error(function (error) {
                          $scope.status = 'Unable to load customer data: ' + error.message;
                      });
              }
   $scope.editCategory=function(mid){
                  single_category=category_list[mid];
                  alert(single_category);
                 $scope.category_name=category_list[mid].category_name;
                 console.log(category_list[mid].category_name);
                 //alert($scope.category.category_name);
                 $location.path("/edit-category/"+mid);
              }
  
  })
  </code></pre>
  
  <p>Here in this controller,there is one function getCategory().Using this function I got the category json array.Now after clicking on edit button from view.I got that single object from array in editCategory() function single_category in this variable.
  Now I am trying to print this single object value on edit page but the values are not showing on edit page.</p>