add .htaccess + url parameter
This commit is contained in:
parent
885c95e63b
commit
dd3eda2fd3
@ -24,6 +24,7 @@
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"aot": true,
|
||||
"assets": [
|
||||
"src/.htaccess",
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
|
8
src/.htaccess
Normal file
8
src/.htaccess
Normal file
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user