Angular 1.0.8 $resource with multiple optional get parameters
问题 My Student ulr looks like this: var Student = $resource('/app/student/:studentid:courseId', {studentid:'@id',courseId:'@cid'} ); When I call it without parameters I would like the url be /app/student/ (works) var names=Student.query( function(){ deferred.resolve(names); } ); When I call it with studentid I would like the url be /app/student/?id=88 (works) Student.get({"id":id}, function(data){ deferred.resolve(data); } ); When I call with courseid only I would like the url be /app/student/