angular5

Error: Schema validation failed with the following errors: Data path “” should NOT have additional properties(project)

情到浓时终转凉″ 提交于 2019-12-21 06:50:06
问题 After migrating application from angular 5 to 6, on running ng serve the following errors pop up. Schema validation failed with the following errors: Data path "" should NOT have additional properties(project). Error: Schema validation failed with the following errors: Data path "" should NOT have additional properties(project). at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (.../TemplateApp/me-cmf-web-template-angular/node_modules/@angular

How to allow nested components to be tracked by their parent and get values from their parent in Angular?

依然范特西╮ 提交于 2019-12-21 05:32:10
问题 I have a series of forms (each managed by 1 component). There is a pattern of inputs in these forms (e.g. many of them require to allow input of an address) that I have to refactor into re-usable components as they are used in multiple forms and I don't want to duplicate neither their logic nor their templates. Each re-usable component would have to have its logic have its template containing input tags and no <form> tag have its client validation constraints possibly receive initial values

Detecting end of Flux data v.s. error

徘徊边缘 提交于 2019-12-21 05:14:39
问题 Currently looking at SSE using Angular 5 and Spring 5 webflux. The basic application is working correctly, but whilst investigating error handling we've noticed that the EventSource in the angular application doesn't see any difference between spring closing the connection due to reaching the end of the Flux stream of data, and an error occuring (e.g. terminating the application mid transfer). The examples we've based our investigations on are the following. https://thepracticaldeveloper.com

Deploy Angular 5 + Nodejs Express app to Heroku

六月ゝ 毕业季﹏ 提交于 2019-12-20 11:34:18
问题 I have an Angular 5 App. This is what I have in my package.json { "name": "web", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "node server.js", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "postinstall": "ng build --aot --prod" }, "private": true, "dependencies": { "@angular/animations": "5.1.0", "@angular/cli": "^1.6.4", "@angular/common": "5.0.3", "@angular/compiler": "5.0.3", "@angular/compiler-cli": "5.0.3", "@angular/core": "5.0.3

cannot determine the module for component angular 5

↘锁芯ラ 提交于 2019-12-20 11:27:29
问题 I'm getting following error when I build the Angular app using "ng build --prod". This is working when I build with Angular 4 and getting error with Angular 5. With Angular 5 "ng serve" is working perfectly. ERROR in Error: Cannot determine the module for class TimeAgoPipe in mypath/node_modules/time-ago-pipe/time-ago-pipe.ts! Add TimeAgoPipe to the NgModule to fix it. Getting error for https://www.npmjs.com/package/time-ago-pipe Any solutions ? 回答1: Check Case Sensitivity import {

After upgrading to angular 5 webpack command is failing

假装没事ソ 提交于 2019-12-20 10:45:06
问题 My project was running on dot net core 2.0 with angular 4.2. I update it to latest angular (5.0.0). Since then, exception is thrown at this line in a startup.cs Configure method. app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true }); Fails here with error Error: Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "5.0.0". at Object.<anonymous> (D:\Personal\Code\PettlyUi\PettlyUi\node_modules\@ngtools\webpack\src\index.js:27

Angular Service Worker - Failed to load resource: the server responded with a status of 504 (Gateway Timeout)

时间秒杀一切 提交于 2019-12-20 09:46:40
问题 I am using the Angular-CLI 1.6.6 and @angular/service-worker 5.2.5 in our Angular 5.2.5 app. Everything works fine on the local lite-server, as well as on the production server, except for one error message popping in our production environment: Failed to load resource: the server responded with a status of 504 (Gateway Timeout) Looking into the ngsw-worker.js script I found the lines (2466 following) where the error message above is generated: async safeFetch(req) { try { return await this

Angular 5 Mat-grid list responsive

会有一股神秘感。 提交于 2019-12-20 08:49:21
问题 i created grid list with column 6 and i want to be grid title take 100% width on small screen devices. Now it creates 6 column on small screens as well Expected: One grid-title occupies 100% of space on mobile device only 回答1: You have to set the cols attribute of the mat-grid-list dynamically depending on the screen width. You'd have to decide on which width breakpoint will the mat-grid-list render the 1-column version. HTML: <mat-grid-list [cols]="breakpoint" rowHeight="2:0.5" (window

Angular 6 - Why use @ngrx/store rather than service injection

▼魔方 西西 提交于 2019-12-20 08:23:37
问题 I am recently learning Angular 6 with @ngrx/store while one of the tutorial is to use @ngrx/store for state management, however I don't understand the benefit of using @ngrx/store behind the scene. For example, for a simple login and signup action, previously by using the service(Let's call it AuthService) we might use it to call the backend api, store "userInfo" or "token" in the AuthService, redirect user to "HOME" page and we can inject AuthService in any component where we need to get the

How to wait till i get a response from backend spring boot api in angular 7

北战南征 提交于 2019-12-20 07:45:39
问题 I wanted to navigate from one route to another route with the result of http post method. But the navigation is happening without the response from http post. The response is getting later when i debugged the code How can i fix this ? is there any way to wait the execution till the response comes from backend ? when i click on a button, a function will execute and a http post call will happen then i need to pass the response from the post request to a new route Quiz.service.ts getResult