I'm using a page with a HTML5 component with this content:
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" [src]="dbURL"></iframe>
</div>
In typescript code of page:
import { Component, Injector } from '@angular/core';
import { MonitorGenerated } from './monitor-generated.component';
// Import HttpClient and HttpParams which are needed to make HTTP calls.
import {HttpClient, HttpParams} from '@angular/common/http';
// Import the environment to get the server URL
import {environment} from '../../environments/environment';
import {DomSanitizer} from '@angular/platform-browser';
@Component({
selector: 'page-monitor',
templateUrl: './monitor.component.html'
})
export class MonitorComponent extends MonitorGenerated {
constructor(injector: Injector, private http: HttpClient, private sanitizer: DomSanitizer) {
super(injector);
}
dbURL;
getDashboard() {
const url = environment.geoMDiario.replace(/odata.*/, '');
return this.http
.get(${url}hangfire
, {
})
.toPromise();
}
getDashboardURL() {
const url = environment.geoMDiario.replace(/odata.*/, '');
console.log("getDashboardURL ruta: " + url + "hangfire");
this.dbURL = this.sanitizer.bypassSecurityTrustResourceUrl(url + "hangfire");
return url + "hangfire";
}
}
This work fine in development box but, when I deploy in server I receive the router error message.
In the server I use an application in a subfolder and port is 8000 in pages and services,however in development box port is 8000 in pages and 5000 in services. In development if I use http://localhost:5000/hangfire I get the dashboard.