2017-02-13 2 views
1
angular.module('myApp') 
    .controller('LoginCtrl', ['$scope', '$http', function($scope, $http) {   

     $scope.getlogin = function(){ 
      $http.get("api/business/getlogin/"+$scope.login.user+"/"+$scope.login.password) 
      .success(function(data){ 
       if(data.length != 0){ 

        /*templateUrl: 'new.html' 
        controller:'NewCtrl'*/ 

        $window.location.href ='new.html' 
        alert("user foubd") 
       } 
       else 
        alert("user not found") 
      }) 
     }; 
}]); 
+1

を削除する方法[ngRoute](httpsを見てください://ドキュメントを。 angularjs.org/api/ngRoute)作品..! –

+0

あなたの問題は何ですか? – hurricane

+0

ngRouteまたはuiRouterを使用していますか? – akinjide

答えて

1

使用だけで$

関連する問題