title: Redirect if Resolve fails Angular 2
body: <p>How Can I redirect to another page if the resolve fails in Angular 2?
  I call this resolve for my Edit Page, but I want to handle the errors in the Resolve Page</p>
  
  <p>My Resolve:</p>
  
  <pre class="lang-js prettyprint-override"><code> resolve(route: ActivatedRouteSnapshot): Promise&lt;any&gt;|boolean {
  
          return new Promise((resolve, reject) =&gt; {
  
              if (route.params['id'] !== undefined) {
                  this.dataService.getHttpEmpresaShow(this.endpoint_url_Get + route.params['id'])
                      .subscribe(
                       result =&gt; {                    
                              console.log("ok");
                              return resolve(result);                     
                      },
                      error =&gt; {
                  return resolve(error);
              });
      }});
  </code></pre>