angular

compoent interaction with rxjs in angular

陌路散爱 提交于 2021-02-11 12:29:12
问题 i make news application with news api and i fetch data properly and but not sending data from service to component so how can send data from service to component and component to component through rxjs import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; @Injectable() export class NewService { private pushSource = new Subject<object>(); Country_Name; constructor(private http:HttpClient,) { this.messages$ = this.pushSource.asObservable() } // define function for call the

Form control label missing accessibility issue after upgrading to ag grid version 23

♀尐吖头ヾ 提交于 2021-02-11 12:22:29
问题 Accessibility issue after upgrading to ag grid version 23 When I check through site improve acceesibility check, I get below error: I'm getting an error for form control label missing. Add the text withing form element within the label tag or WAI-ARIA 'aria-label' or 'aria-labelledby' that is already present. I didnt get a solution anywhere even in community. Kindly let me know if it is possible to add label text in ag-grid version 23 screenshot of console showing the empty label error

How to loop .subscribe observable

一世执手 提交于 2021-02-11 12:22:14
问题 I'm currently trying to make a function where it loops and by using .subscribe I'm getting an array object each time so that later on I can push the data inside an another array. The loop works but the problem is that the results is not what I want because the .subscribe part is printing the first array and then for the rest it's giving me null arrays whereas it suppose to print 20x the same array. I currently started experimenting with angular and to my knowledge of other languages I don't

How to loop .subscribe observable

倖福魔咒の 提交于 2021-02-11 12:21:04
问题 I'm currently trying to make a function where it loops and by using .subscribe I'm getting an array object each time so that later on I can push the data inside an another array. The loop works but the problem is that the results is not what I want because the .subscribe part is printing the first array and then for the rest it's giving me null arrays whereas it suppose to print 20x the same array. I currently started experimenting with angular and to my knowledge of other languages I don't

Angular 6 - PrimeNG - how to sort column by Date?

亡梦爱人 提交于 2021-02-11 12:11:36
问题 I have a code in Angular - PrimeNG and trying to make sorting by date (one of the columns): <p-table [columns]="cols" [value]="questions" selectionMode="single" [(selection)]="selectedQuestion" (onRowSelect)="onRowSelect($event)" [paginator]="true" [rows]="20"> <ng-template pTemplate="header" let-columns> <tr> <th *ngFor="let col of columns"> </th> </tr> </ng-template> <ng-template pTemplate="body" let-rowData let-columns="columns"> <tr [pSelectableRow]="rowData"> <td *ngFor="let col of

Angular 6 - PrimeNG - how to sort column by Date?

老子叫甜甜 提交于 2021-02-11 12:11:31
问题 I have a code in Angular - PrimeNG and trying to make sorting by date (one of the columns): <p-table [columns]="cols" [value]="questions" selectionMode="single" [(selection)]="selectedQuestion" (onRowSelect)="onRowSelect($event)" [paginator]="true" [rows]="20"> <ng-template pTemplate="header" let-columns> <tr> <th *ngFor="let col of columns"> </th> </tr> </ng-template> <ng-template pTemplate="body" let-rowData let-columns="columns"> <tr [pSelectableRow]="rowData"> <td *ngFor="let col of

FormArray returning as FormControl instead of FormArray

雨燕双飞 提交于 2021-02-11 12:09:07
问题 I'm having trouble with nested FormArrays in Angular reactive forms. One of my form arrays correctly returns as a FormArray and the other returns as FormControl. In the initialMaterials() function I have two console.logs. console.log(control) returns a FormControl item and console.log(this.objectServiceJobsArray) returns a FormArray. I need to be able to add materials to specific jobs in the array and change them in the form when necessary. this.objectServiceForm = this.formBuilder.group({

Where is the dist directory in VS when running Angular template?

偶尔善良 提交于 2021-02-11 12:07:48
问题 We're successfully running a new Angular application created and hosted under VS2017 in the very default template (Core + Angular). We promise that we made no changes to it. Seriously. While it's running, we expected that a dist directory would be present in wwwroot (or at the very least somewhere within the solution structure). It is not. We've googled the issue trusting there was a gazillion programmers before us asking the very same thing. Turns out... not that many. And the blogs we've

Where is the dist directory in VS when running Angular template?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-11 12:07:24
问题 We're successfully running a new Angular application created and hosted under VS2017 in the very default template (Core + Angular). We promise that we made no changes to it. Seriously. While it's running, we expected that a dist directory would be present in wwwroot (or at the very least somewhere within the solution structure). It is not. We've googled the issue trusting there was a gazillion programmers before us asking the very same thing. Turns out... not that many. And the blogs we've

Where is the dist directory in VS when running Angular template?

允我心安 提交于 2021-02-11 12:05:10
问题 We're successfully running a new Angular application created and hosted under VS2017 in the very default template (Core + Angular). We promise that we made no changes to it. Seriously. While it's running, we expected that a dist directory would be present in wwwroot (or at the very least somewhere within the solution structure). It is not. We've googled the issue trusting there was a gazillion programmers before us asking the very same thing. Turns out... not that many. And the blogs we've