how to send formdata with other field in angular4 #924
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
how to send formdata with other form field in angular4 using single variable
If I understand you correctly, try this:
thank stas-kh
How do I print the below JSON using ngFor?
[
{
"projectID":"1",
"projectname":"project testing",
"projectdescription":"
project description proketc description</p>",
"projectimage":"[{"projectimage":"1511182675-0-three13.png"},
{"projectimage":"1511182675-1-two2.png"}]"
},
{
"projectID":"2",
"projectname":"roject settingp",
"projectdescription":"
roject setting
","projectimage":"[{"projectimage":"1511188378-0-three14.png"},
{"projectimage":"1511188378-1-two3.png"}]"
}]
I am using angular4 . i want to show above json using ngFor. I used first ngFor *ngFor="let project of projectdata" I tried second ngFor like *ngFor="let projectim of project.projectimage" *ngFor="let projectim of project['projectimage']"
Above is my code I try to print using ngFor. The first ngFor working properly. But the second ngFor shows below error:
Cannot find a differ supporting object
'[{"projectimage":"1511188378-0-three14.png"},{"projectimage":"1511188378-1-two3.png"}]'
of type 'string'.
NgFor only supports binding to Iterables such as Arrays.
I want to send username with file and include the same in filename.
How to use the passed data there.
@roycemernaff:
If the parameter to be sent is constant for a session, then you can set it when you initialize your FileUploader like below:
If you want to send dynamic data, then you can use the
setOptionsmethod on the FileUploader. Like below: