Browse Source

菜单管理

beijing
陈鹏飞 2 years ago
parent
commit
2c2d644e4a
  1. 16
      src/app/system-management/menu/addmenu/addmenu.component.ts

16
src/app/system-management/menu/addmenu/addmenu.component.ts

@ -1,4 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-addmenu',
@ -7,9 +10,18 @@ import { Component, OnInit } from '@angular/core';
})
export class AddmenuComponent implements OnInit {
constructor() { }
validateForm!: FormGroup;
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { }
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
// code: [null, [Validators.required]],
isGasStation: [false]
});
}
destroyModal(): void {
this.modal.destroy({ data: 'this the result data' });
}
}
}
Loading…
Cancel
Save