npm WARN … requires a peer of … but none is installed. You must install peer dependencies yourself

I tried to run a project downloaded from github. Unfortunately, during npm install the following warnings were shown. I tried to change the version based on this question. However, I had a problem, because some packages require multiple versions other packages. Consider these two lines: So, installing some packages causes the list of dependencies to … Read more

What is the equivalent of ngShow and ngHide in Angular 2+?

The hidden property can be used for that See also https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden issues hidden has some issues though because it can conflict with CSS for the display property. See how some in Plunker example doesn’t get hidden because it has a style set. (This might behave differently in other browsers – I tested with Chrome 50) workaround You can fix it by adding To a … Read more

ng serve does not work

The key is to have both global and local Angular-cli versions the same. Let’s say we want to fixate it to eg. 1.0.0-beta.15. So you can try to fixate the version in npm install -g [email protected] and in your package.json fixate it to the same version: “angular-cli”: “1.0.0-beta.15”. Then run npm install –save-dev. Currently Angular CLI can be found on NPM under @angular/cli instead of angular-cli. Here are links … Read more

Where to place/find the systemjs.config.js file in an angularJS2 project?

You need to create a “systemjs.config.js” file and load it from index.html, like a regular script: Make sure you also include System.JS before the config script: The following script loads the first module: By default (according to your systemjs.config.js), SystemJS will look for app.js or app/main.js. In your systemjs.config.js file, you want to map the … Read more

I get “Http failure response for (unknown url): 0 Unknown Error” instead of actual error message in Angular

The problem was related to CORS. I noticed that there was another error in Chrome console: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:4200‘ is therefore not allowed access. The response had HTTP status code 422.` This means the response from backend server was missing Access-Control-Allow-Origin header even though backend nginx was configured to add … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)