add .htaccess + url parameter
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
|
||||
RewriteCond %{REQUEST_URI} !^/api/.*$
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
RewriteRule ^ /index.html [L]
|
||||
@@ -40,6 +40,7 @@ export class UrlShortenerComponent implements OnInit {
|
||||
private formBuilder: FormBuilder,
|
||||
private urlShortenerService: UrlShortenerService,
|
||||
private i18n: I18nService,
|
||||
private route: ActivatedRoute,
|
||||
public dialog: MatDialog) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
@@ -65,6 +66,12 @@ export class UrlShortenerComponent implements OnInit {
|
||||
})
|
||||
})
|
||||
|
||||
this.route.queryParams.subscribe(params => {
|
||||
if (params.url) {
|
||||
this.shortenedUrl.url = params.url;
|
||||
}
|
||||
})
|
||||
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user