{"size": 963, "ext": "js", "max_stars_repo_path": "home2/pages/wode/favor.js", "max_stars_repo_name": "nate-river/read", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "home2/pages/wode/favor.js", "max_issues_repo_name": "nate-river/read", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "home2/pages/wode/favor.js", "max_forks_repo_name": "nate-river/read", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.9285714286, "max_line_length": 68, "alphanum_fraction": 0.4423676012}
route.controller("FACtrl",["$scope","$http",function($scope,$http) {
    
    $('#favor  .cjx-pianhaoliebiao ').on('click','span',function(){
        if($(this).hasClass('addactive')){
            $(this).removeClass('addactive');
            var a=$(this).text();
        	angular.forEach($scope.arr,function(v,i){
        		if(a==v){
        			$scope.arr.splice(i,1);
        		}
        	})
            
        }else{
            $(this).addClass('addactive');

            if($(this).hasClass('addactive')){
            	
             $scope.arr.push($(this).text())
              
               
            }
        }
    })

    //
   var favor=$http({
        url:hosturl+"app/applike",
        method:"GET"
    }).success(function(data){
         console.log(data);
    }).error(function(data){
        console.log('处理失败');
    })
    favor.then(function (data) {
        /!*$scope.ribang=data;*!/
        $scope.favor=data.data;
  
    })
    

}
])