Questions tagged angular

Explore the latest questions and answers asked by our top developers.

Iterating ngrx8 reducers

Interface: export interface IClient extends Array<IClient> { client_name: string } Actions: export const addClientSuccess = createAction( ‘[CLIENT] ADD_CLIENT_COMPLETE’, props<{ client_name: IClient }>() ); Reducers: export interface ClientState { client_name: IClient[] } export const clientInitialState: ClientState = { client_name: [] } export const clientReducer = createReducer( clientInitialState, on(ClientActionTypes.addClientSuccess,(state, {client_name}) => ({ …state, client_name: […client_name] }) )) […]

By PremKumar
Published
Categorized as angular, arrays, ngrx, ngrx-reducers, redux

Merge two json together into one json in ngOnInit function

I have an Angular component that on loading call 2 service methods and those methods in return, return the data back in json format. I want to merge those two jsons together. I did looked at some other threads and found that Object.assign can be used for this purpose but the problem is that i […]

By Ahsan Nissar
Published
Categorized as angular, javascript, json, typescript

Dynamic Page Title for both browser display and Google Analytics in Angular

The question is: How to dynamically and centrally set up Page Titles in Angular App only once for two purposes: to make a title in a browser reflect an actual page visited, to send a particular title to Google Analytics avoiding a boring, single and useless Angular App description applied to all app’s pages. Source: […]

By Wojciech Marciniak
Published
Categorized as angular, angular-routing, google-analytics, page-title

The better way to solve a Google Maps markers filter problem

I need filter items on map (GOOGLE MAP) filter by range distance like Tinder to show only items near from origin point like a 30 KM radius Any item in my database have LATITUDE / LONGITUDE and also full address What the better and faster way to filter and show these items on Google Map […]

By Jos Frederico
Published
Categorized as angular, google-maps-api-3, ionic-framework, javascript, laravel

Angular 5 How to create PDF URL?

I receive a base64 string of a PDF file from a REST server. I want the PDF to display in a window. But I’m having trouble creating the URL. The resulting invoicePdfURL looks like this: blob:https://localhost:4200/dc391fef-25fb-4dcf-921b-779384182920 I am in control of the REST server, and can have it return anything suitable. In this example, it’s […]

By BobC
Published
Categorized as angular

Use an existing angular app to create a new angular app

On my Windows 10 64-bit laptop, I have successfully created an angular 8 app using following command: C:Angular> ng new angular-hello-world This installed all necessary files and packages from the internet under C:Angularangular-helllo-world. Now, I want to create another angular 8 application but without using the above command since I have internet issues on my […]

By Sunil
Published
Categorized as angular

Angular 8: Getting error on console ExpressionChangedAfterItHasBeenCheckedError when *ngIf is used

I have 2 components inside a wrapper, and wrapper has fixed height. ToggleComponent has height css property bound to height field and a button which changes height field. TestComponent takes rest of the height. It has test attribute bound to its clientHeight . Focus is on the DOM binding to something that would change from […]

By Sahil Shikalgar
Published
Categorized as angular, angular8

Unable to read oldmessage list while getting new message in socket in Angular 4

I am using socket.io for real time chat, and I am able to get message through socket when any new message sent but when I am trying to concat with oldmessage list then my oldmessage list showing undefined. Soket in firing just right after message sent successfully back to the database I am using socket […]

By Kuldeep Koranga
Published
Categorized as angular, concat, socket.io

Adding mat-divider to mat-select/mat-option

Is it possible to have a mat divider (a horizontal line seperating two mat-options)? I have tried: <mat-form-field> <mat-label>Cars</mat-label> <select matNativeControl required> <option value=”volvo”>Volvo</option> <mat-divider></mat-divider> <option value=”saab”>Saab</option> <option value=”mercedes”>Mercedes</option> <option value=”audi”>Audi</option> </select> </mat-form-field> A bad workaround I have now is: <mat-option>————————–</mat-option> However this is not ideal. Source: New feed Source Url Adding mat-divider to mat-select/mat-option

By asdf
Published
Categorized as angular, angular-material, material-design

Angular – JSON: How To Display Data From json Format

I need loop which can print data in following hierarchy solutiondetail -> groups – > request details Below function was giving me details of solutiondetail -> request detail.i have given both new and old json format along with working function for old json.now after adding group detail i am facing issue with loop. Previous Json […]

By DharamChauhan
Published
Categorized as angular, angular7, api, json
1 5,672 5,673 5,674 5,675 5,676 5,777

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq