Questions tagged angular

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

matTable: UI not updating after altering a datasource row

I’m trying to update my dataTable when an user has been edited. At the moment, the dataSource is updated, but changes are not visible on front part. I mean, my console.log(this.dataSource) show good datas. But on the web page it’s not the case. Here’s how I get my dataSource (ngOnInit) : this.users.users().subscribe(data => { this.dataSource.data […]

By Emilien
Published
Categorized as angular, angular-material, angular-material-table Tagged

Image inside of a div resizing depending on title length on Edge

I have a problem with a div. It looks like this: <div fxLayout=”column” fxLayoutGap=”20px”> <h1 class=”mat-display-1″>Welcome to $TITLE$</h1> <img *ngIf=”logoData” [src]=”logoData” class=”logo” alt=”logo”/> </div> Everything works ok on chrome and firefox, but on edge the image resizes depending on the length of the h1 tag. Here’s the CSS: .logo { max-width: 300px; max-height: 90px; display: […]

By Esteban Chornet
Published
Categorized as angular, css, html

Ionic4 get data inside an object which is inside an object with ngFor

Im trying to show some data from Api, but the data I need is inside an object which is inside an object. how do I get it? Im trying to get “full_url” inside data object, which is inside avatar object. I already tried: <ion-list> <ion-item *ngFor=”let user of users.data”> <ion-label> <h2>{{ user.uname }}</h2> <p *ngFor=”let […]

By Raihan
Published
Categorized as angular, ionic4, ngfor, object

Change text color while typing in angular

I am working on a Note Taking application, Requirement is when user types the text, It should in Red color, If he wants the rest of the text to be in black color while typing that also has to be achieved Source: New feed Source Url Change text color while typing in angular

By Shazam
Published
Categorized as angular

Router link works fine with html but not in TS file

Here is my html rouerLink: <a [routerLink]=”[‘create’]”>Create</a> – works fine. on button click I am calling the same as: But not works.. navigateTo(page) { this.router.navigate([‘create’]); //not works } Any one help me, what is really I am missing here? UPDATE I am navigating from parent to child here is the routes: { path: ‘contentPlaceholder’, data: […]

By 3gwebtrain
Published
Categorized as angular, angular-router, angular8

Hi I am finding difficulty in running my code in local with angular akita

I have installed angular-akita. I have updated npm to the latest. And I have the latest typescript as well. Please help. on ng-serve –o ERROR in node_modules/@datorama/akita/src/api/entity-store.d.ts(84,5): error TS2416: Property ‘update’ in type ‘EntityStore<S, E>’ is not assignable to the same property in base type ‘Store<S>’. Type ‘{ (newState: Partial<S>): any; (id: string | number […]

By TheDoozyLulu
Published
Categorized as akita, angular, angular-akita, javascript, typescript

Why my second rest request in angular can’t update the datagrid?

I’m working on an Angular application, but I’m in trouble with the update of the datas. 1- I’m creating a datagrid 2- I’m requesting to get the data from a specific user 3- I’m requesting to get the name of a department by it’s uuid (contained in the previous request) : informatique 4- Datagrid is […]

By Christophe Cambefort
Published
Categorized as angular, ecmascript-6, javascript

Take a picture and save it in a specific folder created for my application

I develop a mobile app with ionic 4 and angular, I want to take a picture and save it to a folder I created at the same time, and recover the path. With the ionic framework, when I’m trying to read de var imageData I’ve got this : ‘content://com.android.providers.media.documents/document/image%3A39670’ and not a basical path, so […]

By Charles Emieux
Published
Categorized as angular, ionic-native, ionic4

Why does subscribe() not working but aync in template does?

There is a socket service that sends and receives messages between apps. I can send messages and can also receive those messages in the template with getMessages | async. But when I try to replace the getMessages | async with a getMessages().subscribe(…) in my component it doesn’t work anymore. So what I am doing wrong? […]

By Lars Hagen
Published
Categorized as angular, rxjs, websocket

Resolving ERROR TypeError: Cannot read property ‘invalid’ of undefined for Select

I am getting this error: ERROR TypeError: Cannot read property ‘invalid’ of undefined And it is pointing here: https://imgur.com/TlvObGk I did some tweaking such as commenting out the options and it pointed to the select element itemBrand: <select id=”itemBrand” name=”itemBrand” formControlName=”itemBrand” class=”form-control btn-sm brand” (change)=”changeBrand($event)” required> So I am thinking that the formControl validator is […]

By noob coder
Published
Categorized as angular, html, javascript, typescript
1 5,296 5,297 5,298 5,299 5,300 5,332

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