fix edit view, title link
This commit is contained in:
@@ -38,7 +38,9 @@ export class PageViewEdit implements OnInit, OnDestroy {
|
||||
private i18n: I18nService,
|
||||
private route: ActivatedRoute,
|
||||
private snackBar: MatSnackBar,
|
||||
public dialog: MatDialog) { }
|
||||
public dialog: MatDialog) {
|
||||
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.form = this.formBuilder.group({
|
||||
@@ -52,24 +54,26 @@ export class PageViewEdit implements OnInit, OnDestroy {
|
||||
this.settings = settings;
|
||||
});
|
||||
|
||||
if (this.route.snapshot.queryParamMap.get('name')) {
|
||||
this.form.get('name').setValue(this.route.snapshot.queryParamMap.get('name'));
|
||||
}
|
||||
this.route.params.subscribe((params) => {
|
||||
if (params.name) {
|
||||
this.form.get('name').setValue(params.name);
|
||||
|
||||
this.form.get('entryType').setValue(this.entryType);
|
||||
this.form.get('entryType').valueChanges.subscribe((value) => {
|
||||
this.entryType = value;
|
||||
});
|
||||
this.form.get('sorting').setValue(this.sorting);
|
||||
this.form.get('sorting').valueChanges.subscribe((value) => {
|
||||
this.sorting = value;
|
||||
});
|
||||
this.form.get('index').valueChanges.subscribe((value) => {
|
||||
this.view.index = value;
|
||||
});
|
||||
this.form.get('entryType').setValue(this.entryType);
|
||||
this.form.get('entryType').valueChanges.subscribe((value) => {
|
||||
this.entryType = value;
|
||||
});
|
||||
this.form.get('sorting').setValue(this.sorting);
|
||||
this.form.get('sorting').valueChanges.subscribe((value) => {
|
||||
this.sorting = value;
|
||||
});
|
||||
this.form.get('index').valueChanges.subscribe((value) => {
|
||||
this.view.index = value;
|
||||
});
|
||||
|
||||
this.name = this.route.snapshot.paramMap.get('name');
|
||||
this.refresh();
|
||||
this.name = params.name;
|
||||
this.refresh();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
||||
Reference in New Issue
Block a user