Problem : When I start to run my Application, I get this error: I have these versions: Angular CLI: 8.3.19, Node: 12.14.0. Any Idea what causes this problem ? Solution It is a problem with @angular-devkit/build-angular. Try updating it by running : 2. Or downgrading it by specifying a previous version, such as
net::ERR_CONNECTION_REFUSED : I’d like to access an API server, but the server hasn’t started. Then I got the error : Could I handle this according to the status of the response ? Solution 1 : Solution 2 : If you are using spring for the backend , just add the annotation @crossorigin in your rest controller to […]
If we need to sleep e thread, we can implements a delay method that returns a Promise object (which represents the eventual completion, or failure, of an asynchronous operation, and its resulting value) and through the setTimeout method (that sets a timer which executes a function or specified piece of code once after the timer expires) resolve […]
If we need to clone an object we can use the Object.assign method. We can use this method to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.
If we have an array (even not ordered) and we want to remove duplicated values, we can use the filter method:
The map() method is helpful to creates a new array with the results of calling a provided function on every element in the calling array. Suppose that we have two classes: And we have an Angular service called ‘myService‘ that through a .getObjects() method returns the following data: If we need to fill a DestinationType array […]