<!doctype html>
<html ng-app="plunker">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<script src="http://code.angularjs.org/1.0.5/angular-resource.js"></script>
<script src="script.js"></script>
</head>
<body>
<div ng-controller="MyController">
</div>
</body>
</html>
var app = angular.module('plunker', ['ngResource'])
.controller('MyController',
function($scope, $resource) {
var User = $resource(
'/users/:action',
{},
{
names:{
method:'GET',
params:{action:'names'}
}
}
);
$scope.users = User.get();
$scope.names = User.names();
}
);