Questions tagged angular

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

How to hide Login and Register link to other pages in Angular

In App.component.ts I have redirected the router link to home, where I want to hide Login and Register link. I know lot of people will answer authGuard, I am new to angular. Just want to know how to hide some link or feature on diferent diferent pages on router base I think I can do […]

By Sourav
Published
Categorized as angular, html

Reduce array of json to json object

I have details as data = {name:”charles”,id:”1″,education:[{“class”:”X”,”marks”:223,”percentage”:59%},{“class”:”IX”,”marks”:223,”percentage”:59%}, {“class”:”IIX”,”marks”:223,”percentage”:59%} {“class”:”IIIX”,”marks”:223,”percentage”:59%}] My desired result need is to break into 4 json objects {name:”charles”,id:”1″, education:{“class”:”X”,”marks”:223,”percentage”:59%}} {name:”charles”,id:”1″, education:{“class”:”IX”,”marks”:223,”percentage”:59%}} Can anyone let me know how to achieve it? I am sucessfully by looping and creating each object induvidually as follows: this.data.education.forEach( class => { const newData: any = {}; newData.name= […]

By Amrutha
Published
Categorized as angular, arrays, json

Angular Animation – Trying to add pause() on mouseover and play() on mouseout to animated observable array

Cannot get an individual headline from the list of headlines returned by *ngFor to be animated with Angular Animation Player. I’m making a headline news scroller that takes 20 news headlines from a live rss feed using rxjs and observable operators. I need to use the Angular AnimationPlayer because I need to include a mouseover […]

By cinerama
Published
Categorized as angular, angular-animations, rxjs

Ionic 4 TypeError: Cannot read property ‘set’ of undefined – OneSignal local storage error [duplicate]

This question already has an answer here: How to access the correct `this` inside a callback? 10 answers I’m registering the devices on OneSignal platform without any issue. But when I try to store locally the userId inside the addSubscriptionObserver, or call an external function, I got errors. My code is : constructor( private platform: […]

By Lano
Published
Categorized as angular, ionic-framework, ionic4, onesignal, typescript

How to deal with http code errors filling select options with observables

I filling some select options with observables by calling web services. The point is I am trying to get the http code errors in order to hide the form (if any of these the http code is different to 200) and show a message to the user. Can someone suggest me a good practice to […]

By Jonathan Re tegui
Published
Categorized as angular, formbuilder, httpclient, observable, rxjs

ANGULAR | Use two components with same route

I need to use this route ‘/’, but this route must use a component wich is selected after auth validation. I want to do what Facebook does. When you are about to log in, the url is “facebook.com” and also is “facebook.com” when you are at the main page. So, what I’ve been trying what […]

By PaulLeonH
Published
Categorized as angular

Difficulty installing Angular CLI on Mac

I am trying to install angular onto my Mac’s global directory, but have had no luck so far after several attempts. I’ve tried out the following list below: npm install -g @angular/cli npm install -g @angular/[email protected] How to upgrade Angular CLI to the latest version https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally Can't install Angular CLI Here is the error… > […]

By user11137870
Published
Categorized as angular, angular-cli, macos, npm, npm-install

Error: "Can’t create a Google Chart without data!" when data loaded inside an aync Angular Service

I am really struggling to get this working. When I get data from an Angular Service inside a component, I get console error that Google Chart can’t be loaded without data. When I declare data outside of Service.subscribe the chart works fine. I think google charts is being called even before the service returns, so […]

By ranaalisaeed
Published
Categorized as angular, javascript

Angular 8 add material chiplist with formGroup

I am trying to add a list of chip list of Angular material with an Ng form. I am not able to add the new chip list on the click of the button and don’t know how to display the value of array added in the new chip list chip list. Here is an example […]

By Subham
Published
Categorized as angular, angular-material, typescript Tagged

Angular-Material set a Datepicker to only date in Angular7

I am using Angular-7 for web portal application. I have a Material Datepicker from which I would like to only get date with no timestamp. Also it should be in this format: dd/mm/yyyy This is how it appears on the frontend: <div class=”col-xs-6″> <label for=”loading_date”>Loading Date</label> <div class=”input-group date”> <mat-form-field> <input matInput [matDatepicker] = “picker” […]

By ayobamilaye
Published
Categorized as angular, angular-material Tagged
1 6,177 6,178 6,179 6,180 6,181 6,286

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