I submit this form:
let newRole = this.addForm.value
console.log(this.addForm)
and when I put console.log(this.addForm.value)
show this like in
I want to submit only permission_id, like this :
value: (5) [1, 2, 3, 4, 5]
any suggestions are welcome.
just use .map
which will return new array of permission_id
let newRole = this.addForm.value.sp_id.map(v => v.permission_id);