Instanceof operator was not working so changed the way of checking it
This commit is contained in:
@ -42,9 +42,10 @@ export class RoleDetailComponent implements OnInit, AfterViewInit {
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((value) => {
|
||||
const data = value as { item: Role };
|
||||
|
||||
this.item = data.item;
|
||||
|
||||
this.form.controls.name.setValue(this.item.name);
|
||||
this.form.controls.permissions.reset();
|
||||
this.item.permissions.forEach((x) =>
|
||||
this.form.controls.permissions.push(
|
||||
new FormGroup({
|
||||
|
||||
Reference in New Issue
Block a user