title: Handling $q errors within ui-router resolves
body: <p>I'm using UI-Router to resolve 2 promises using <code>$q.all</code>. How can I handle errors if either of the promises return an error? Depending on the type of error, I would like to return an error template.</p>
  
  <pre><code>.state('main', {
      // ...
      resolve: {
         config: function(Service1, Service2, $q) {
            return $q.all({
              example1Data: Service1.get().$promise,
              example2Data: Service2.get().$promise
            });
          }
      }
  }
  </code></pre>