angular7

failed to run Angular application getting error : Schema validation failed

自闭症网瘾萝莉.ら 提交于 2019-12-04 12:22:48
问题 I am using Angular 7 for my Application and I am getting error while running it on development server . I did ng serve but I got error below D:\suman\ftoss\New TFS\FtossAngularWeb\Pre11WebV1>ng lint -fix Your global Angular CLI version (7.3.9) is greater than your local version (7.1.4). The local Angular CLI version is used. To disable this warning use "ng config -g cli.warnings.versionMismatch false". Schema validation failed with the following errors: Data path ".builders['app-shell']"

Angular 7 select dropdown object is empty when not touched

南笙酒味 提交于 2019-12-04 11:51:26
In my application, ngOnInit() loads currencies, categories, and manufacturers. I am using Angular 7 reactive forms for this. Data loads as expected and dropdowns populated with values and the first option selected and showed to the user. So, here is the problem, after finishing form and clicking on submit (using default dropdown values), I see an empty object for the category , currency , and manufacturer . ProductNewComponent.ts import {Component, OnInit} from '@angular/core'; import {Router} from '@angular/router'; import {ProductService} from '../service/product.service'; import

Angular 7 Drag&Drop nested lists with native CDK

折月煮酒 提交于 2019-12-04 09:46:06
问题 I am using native Angular 7 Drag&Drop provided by @angular/cdk/drag-drop . Basically, I just need to create one sortable list inside another one as in the code below: <div class="external-list" cdkDropList (cdkDropListDropped)="drop1($event)"> <div class="external-item" cdkDrag *ngFor="let item of items"> {{item.header}} <div class="internal-list" cdkDropList (cdkDropListDropped)="drop2($event)"> <div class="internal-item" cdkDrag *ngFor="let row of item.rows"> {{row}} </div> </div> </div> <

Angular 7 Drag and Drop - Dynamically Create Drop Zones

半世苍凉 提交于 2019-12-04 09:13:11
问题 Is there a way to dynamically create drop zones? I'm having some troubles with ngFor and cdkDropList. Here is my first list and draggable elements: <div class="subj-container" cdkDropListOrientation="horizontal" cdkDropList #subjectList="cdkDropList" [cdkDropListData]="subjects" [cdkDropListConnectedTo]="[lessonList]" (cdkDropListDropped)="drop($event)" > <div class="subject" *ngFor="let subject of subjects" cdkDrag> {{subject.name}} </div> </div> And here is my second list: <div class="conta

How to use Angular 7 cdkDropList between components?

岁酱吖の 提交于 2019-12-04 09:04:19
I have a list of items (students) in a mat-list component on the left side of my screen (general list). I also have a list of class-room Components on the right side of my screen. In each class-room Component, there is a mat-list of students. I want to be able to drag students from to the general List to one of the students lists contained inside any of the class-room Component using the new Drag&Drop API of angular material the pseudo code looks like this: <mat-list #studentsList="cdkDropList" cdkDropList [cdkDropListData]="students"> <mat-list-item cdkDrag *ngFor="let student of studentes">

No provider for InjectionToken angularfire2.app.options

只愿长相守 提交于 2019-12-04 07:40:42
Recently I started to learn to use the concept of firebase in combination with angular. As a start, I try to make the login process work. Currently, I get an ennoying error when I try to navigate to the login page and I cannot figure out what is causing the error. The error I get is: ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[AngularFireAuth -> InjectionToken angularfire2.app.options]: StaticInjectorError(Platform: core)[AngularFireAuth -> InjectionToken angularfire2.app.options]: NullInjectorError: No provider for InjectionToken angularfire2.app.options! What do

How to check a Radio Button based on the ngModel it is associated with

一曲冷凌霜 提交于 2019-12-04 05:05:40
问题 I'm writing a simple Angular 7 page which contains 2 radio buttons and one Text Input. When the page loads, the ngOnInit method executes a call to a database and retrieves some data that should be reflected on the radio buttons and Text Input. I'm not being able to make it that the Radio Button are selected when the page opens based on the value that is retrieved from the database. app.component.html <label>Descrição adicional</label> <br /> <input type="text" [(ngModel)]="metadata

Invalid rule result: Instance of class Promise

送分小仙女□ 提交于 2019-12-04 04:00:50
问题 I work with Angular 7.1.4. I want to generate a new module with the following line; ng g m order-process But I encountered an error: Invalid rule result: Instance of class Promise. How to fix this? Node: 8.11.3 package.json ( https://prnt.sc/o3cg54 ) 回答1: I'd solved my problem. My angular/cli version is 7.0.7 but I was find the @schematics/angular@8.0.3 in package-lock.json. So, I run the "npm install @schematics/angular@7.0.7 --save-dev" command and solved my problem. Thank you for

Cascading dropdown fill method running more than one in Angular 7

人走茶凉 提交于 2019-12-04 02:27:24
问题 I have an angular app. And I'm using cascading combobox (country-state) in below example. But, get states() method in state.component.ts running a lot of time. What can be the reason of this? I want run only country selection changed. I put debugger . You can reproduce bug by open console with F12. If my method mistake, I can change completely my way. Stackblitz 回答1: When you use a getter, this happens several times alog life of component. You must change your aproach. One way is subscribe to

Error during dynamic form creation from json Cannot find control with name: 'data'

筅森魡賤 提交于 2019-12-03 16:19:12
I am using angular 7 appplication and i am writing a generic dynamic form creator. I am using reactive forms and ng-template and <ng-container *ngTemplateOutlet> for recursively displaying the form element.The code of the project could be seen Here . But i am facing the following error ERROR Error: Cannot find control with name: 'data' at _throwError (forms.js:1775) at setUpControl (forms.js:1683) at FormGroupDirective.push../node_modules/@angular/forms/fesm5/forms.js.FormGroupDirective.addControl (forms.js:4532) at FormControlName.push../node_modules/@angular/forms/fesm5/forms.js