title: Optional url parameters in AngularJs Resource
body: <p>I have this kind of resource: <code>var Products = $resource('companies/:companyId/products')</code>
  The problem is, that I would like to get the products of all companies by url <code>companies/products</code>, but using resource and not providing companyId I am getting <code>companies//products</code>. Probably I could use another url, like just <code>/products</code>, but does it mean that I have to have another resource for the same thing?</p>
  
  <p>In this simple case I could change the url to <code>companies/products/:companyId</code>, but it seems to be  quite general case.</p>