我在localhost(import { Component, Input, OnInit } from '@angular/core';
import { IAlert } from './alert';
import { AlertsService } from './alerts.service';
import { AlertComponent } from 'ng2-bootstrap';
@Component({
selector: 'app-alerts',
templateUrl: './alerts.component.html',
providers: [AlertComponent],
styleUrls: ['./alerts.component.css']
})
export class AlertsComponent implements OnInit {
@Input() public type: string = 'warning';
@Input() public dismissible: boolean;
@Input() public dismissOnTimeout: number;
public alerts: Array<IAlert>;
constructor(private alertsService: AlertsService) {
}
ngOnInit() {
this.alerts = this.alertsService.alerts;
}
addAlert(alert: IAlert) {
this.alertsService.add(alert); // Add to padding here?
}
closeAlert(i: number) {
this.alertsService.close(i); // Remove padding here?
}
}
)中有这条路径。当我输入localhost / ams时,我想重定向到干净的URL(localhost/ams/forms/login.php
)。