From your question (and from your SO tags), I see that you want to create Rails-like controllers in AngularJS. Since both structures (Rails and AngularJS) have a similar MVC principle, this is actually quite easy to accomplish.
Both frameworks allow you to specify different routes for using the same controller.
In Rails, the usual methods / actions / actions / action / action / editing / killing pointers are out of the box (using the padding). These actions are mapped to different, well-established HTTP routes and methods by default .
CRUD / Rails Route List 
Now, in AngularJS applications (or in all SPA systems) you only need a subset of these routes, since client-side routing only understands GET requests:
CRU / Route List in AngularJS 
AngularJS does not initially provide a forest mechanism that will generate all your CRUD routes for you. Nevertheless, it provides you with at least two different ways to connect your CRUD / List routes using one controller.
Option 1 (using $location.path() )
Using the location.path () method, you can structure your PhotosCtrl to perform different actions depending on the location path.
Routes:
app.config( [ '$routeProvider', function ($routeProvider) { $routeProvider .when('/photos', { templateUrl: 'photos/index.html', controller: 'PhotosCtrl' }) .when('/photos/new', { templateUrl: 'photos/new.html', controller: 'PhotosCtrl' }) .when('/photos/:id', { templateUrl: 'photos/show.html', controller: 'PhotosCtrl' }) .when('/photos/:id/edit', { templateUrl: 'photos/edit.html', controller: 'PhotosCtrl' }); } ] );
controller:
app.controller('PhotosCtrl', [ '$scope', 'Photos', // --> Photos $resource with custom '$remove' instance method '$location', '$routeParams', function($scope, Photos, $location, $routeParams){ if($location.path() === '/photos'){ // logic for listing photos $scope.photos = Photos.query(); } if($location.path() === '/photos/new'){ // logic for creating a new photo $scope.photo = new Photos(); } if(/\/photos\/\d*/.test($location.path())){ // eg /photos/44 // logic for displaying a specific photo $scope.photo = Photos.get({id: $routeParams.id}); } if(/\/photos\/\d*\/edit/.test($location.path())){ // eg /photos/44/edit // logic for editing a specific photo $scope.photo = Photos.get({id: $routeParams.id}); } // Method shared between 'show' and 'edit' actions $scope.remove = function(){ $scope.photo.$remove(); } // Method shared between 'new' and 'edit' actions $scope.save = function(){ $scope.photo.$save(); } } ]);
These four ifs make the controller look a little messy, but when replacing 4 different controllers with one, several conventions are inevitable.
Option 2 (use allow property)
This parameter uses the resolve property of the route configuration object to create a different "action identifier" for different routes.
Routes:
app.config( [ '$routeProvider', function ($routeProvider) { $routeProvider .when('/photos', { templateUrl: 'photos/index.html', controller: 'PhotosCtrl', resolve: { action: function(){return 'list';} } }) .when('/photos/new', { templateUrl: 'photos/new.html', controller: 'PhotosCtrl', resolve: { action: function(){return 'new';} } }) .when('/photos/:id', { templateUrl: 'photos/show.html', controller: 'PhotosCtrl', resolve: { action: function(){return 'show';} } }) .when('/photos/:id/edit', { templateUrl: 'photos/edit.html', controller: 'PhotosCtrl', resolve: { action: function(){return 'edit';} } }); } ] );
controller:
app.controller('PhotosCtrl', [ '$scope', 'Photos', '$routeParams', 'action' function($scope, Photos, $routeParams, action){ if(action === 'list'){ // logic for listing photos $scope.photos = Photos.query(); } if(action === 'new'){ // logic for creating a new photo $scope.photo = new Photos(); } if(action === 'show') // logic fordisplaying a specfiic photo $scope.photo = Photos.get({id: $routeParams.id}); } if(action === 'edit') // logic for editing a specfic photo $scope.photo = Photos.get({id: $routeParams.id}); } // Method shared between 'show' and 'edit' actions $scope.remove = function(){ $scope.photo.$remove(); } // Method shared between 'new' and 'edit' actions $scope.save = function(){ $scope.photo.$save(); } } ]);
Both methods require the use of some conditional expressions in your controller, but the second method is at least readable, because the exact action is allowed inside the routing mechanism, which distracts some logic from your busy controller.
Of course, in any real application you will probably have many more methods defined inside the controller, in which case your controller may become completely unreadable. These examples use a simple instance of $ resource ( Phones ), which relies on the simple RESTfull API (Rails?). But, when your presentation logic becomes complex, you probably want to use Angular / factory services to abstract some of the code in your controllers.