Category : angular

@PostMapping(value = "/upload1", consumes = { "multipart/form-data","application/json" }) public Employee uplaodFile1(@RequestPart("employee") EmployeeModel[] employee, @RequestPart("file") MultipartFile[] files) { return ; } for (let index = 0; index < event.target.files.length; index++) { formData.append("file", event.target.files[index]); formData.append(’employee’,new Blob([JSON.stringify({empName:’sdfds’+index,fileType:’sfsds’+index})], { type: "application/json" })); } i want to sent post request from angular and how to send request from angular Source: ..

Read more

Using a service worker, the screen transition is performed by the click event of the push notification with the following code. Screen transition is possible in Chrome on Mac, but screen transition is not possible in Chrome on Windows 10. Is there any solution? importScripts(‘./ngsw-worker.js’); self.addEventListener(‘notificationclick’, (event) => { event.waitUntil( self.clients.matchAll().then(function(clientList) { focusWindow(event); if (clientList.length ..

Read more

I have problems with ngxs/store. The error that appears every time I declare import { NgxsModule } from ‘@ngxs/store’; in the app.module.ts file. After that the server stops and I can’t code anymore. I even tried on a linux vm, or reinstalled nodejs, npm and angular and nothing helps. enter image description here Source: Windows ..

Read more