Issue
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.
Solution
just use .map
which will return new array of permission_id
let newRole = this.addForm.value.sp_id.map(v => v.permission_id);
Answered By - Artyom Amiryan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.