remove oauth extra resource
This commit is contained in:
@@ -94,25 +94,6 @@ app.controller('mainCtrl', function($scope,$resource,$http,$rootScope) {
|
||||
});
|
||||
}
|
||||
|
||||
// baz
|
||||
$scope.baz = {id:0 , name:"sample baz"};
|
||||
$scope.bazes = $resource("http://localhost:8081/spring-security-oauth-resource/bazes/:bazId",{bazId:'@id'});
|
||||
|
||||
$scope.getBaz = function(){
|
||||
$scope.baz = $scope.bazes.get({bazId:$scope.baz.id});
|
||||
}
|
||||
|
||||
$scope.createBaz = function(){
|
||||
if($scope.baz.name.length==0)
|
||||
{
|
||||
$rootScope.message = "Baz name can not be empty";
|
||||
return;
|
||||
}
|
||||
$scope.baz.id = null;
|
||||
$scope.baz = $scope.bazes.save($scope.baz, function(){
|
||||
$rootScope.message = "Baz Created Successfully";
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
/*]]>*/
|
||||
|
||||
@@ -51,28 +51,6 @@
|
||||
<a class="btn btn-default" href="#" ng-click="createBar()">Create Bar</a>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<hr/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h1>Baz Details</h1>
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-12">
|
||||
<label class="col-sm-2">ID</label>
|
||||
<span class="col-sm-10"><input class="form-control" ng-model="baz.id"/></span>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<label class="col-sm-2">Name</label>
|
||||
<span class="col-sm-10"><input class="form-control" ng-model="baz.name"/></span>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<a class="btn btn-default" href="#" ng-click="getBaz()">Get Baz</a>
|
||||
<a class="btn btn-default" href="#" ng-click="createBaz()">Create Baz</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user