Unable to override mat-ink-bar color with in mat-tab-nav-bar in angular material

Overriding mat-ink-bar color doesn’t show effect on the mat-tab. am using primary color of built in theme palette. Can we customize the mat-ink-bar in css or Do we need to create our own theme palette and use it ? Below is my code: <pc-study-title [uNumber]="umbrellaNumber"></pc-study-title> <div class="details-tab-panel"> <nav mat-tab-nav-bar mat-stretch-tabs backgroundColor="primary" mat-align-tabs="start" > <a mat-tab-link […]

By Pradeep
Published
Categorized as angular, angular-material, css Tagged , ,

How to assign and use runtime config values in App.module in angular

I have a situation where i need to replace some of the hardcoded values with config.json values in the app.module. can we do that ? am able to add APP_INITIALIZER and useFactory and able to inject service in other components and that is working fine but not able to achieve with in app.module. I want […]

To open only One Tree Root Node at a time in angular

Is it possible to open only one Tree Root Node in angular, i.e if one node is expanded then the other opened Root Node should collapse. Please suggest if there is any possible way to achieve this. Below is my Tree .html Code: <mat-tree [dataSource]="dataSource" [treeControl]="treeControl" class="example-tree"> <mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle (click)="selectedItem = node.name;" > […]

By Pradeep
Published
Categorized as angular, angular-tree-component Tagged ,

node.name is not working in Component.ts in Angular

I need to get the root node name of a tree in angular, but node.name is getting "Node" as the value. Below is my .html code part: <mat-tree [dataSource]="dataSource" [treeControl]="treeControl" class="example-tree"> <mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle (click)="selectedItem = node.name;" > {{node.name}} </mat-tree-node> <mat-nested-tree-node *matTreeNodeDef="let node; when: hasChild" > <div class="mat-tree-node"> <button mat-icon-button matTreeNodeToggle [attr.aria-label]="’Toggle ‘ + […]

By Pradeep
Published
Categorized as angular, angular-tree-component Tagged ,

Angular Material Tree format issue

In Angular Tree I am retrieving data from Database, but the Tree Format is not as expected. Below is the Browser Tree View. Browser Tree View As per the above image, in Country Node I am getting each element in the Children Item, but I want distinct Items only i.e single India item and single […]

By Pradeep
Published
Categorized as angular, angular-material, treeview Tagged , ,

In angular Reader.onload is getting executed after calling the API [duplicate]

I am working on an Angular code to Upload file, where file is selected using Angular UI and then an API is called from where File is saved. The problem is in Angular code, while converting File into Base64, the API is called first and then the File is converted into Base64, which should be […]

By Pradeep
Published
Categorized as angular, api, filereader Tagged , ,

Quill editor html class not able to style in email body

am using angular 10 and included ngx quill editor to show the rich text editor. when we save the html content into database, it saves with html class type like below: <li class="ql-indent-2">lbmlkfdnblblfdsb</li> and when we send an email through our app, we send the above content in the email body but the css class […]

By Pradeep
Published
Categorized as angular, css, ngx-quill, quill Tagged , , ,

Error from chokidar after angular 10 upgrade

we recently upgraded from Angular 8 to Angular 10 and everything seems working fine but there is, one error that keep appearing on the command line console when any action happens on the app. chunk {main} main.js, main.js.map (main) 3.97 MB [initial] [rendered] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 427 kB [initial] [rendered] chunk {quill} quill.js, […]

By Pradeep
Published
Categorized as angular, angular10 Tagged ,

Can we use @viewChild in @Injectable service in Angular10

I have below code working before Angular 10 upgrade ie., Angular 8. @viewChild in @injectable was working in Angular8 but not in Angular10 any reason ? Code below is the sample (below is how my existing code looks): @Injectable() export abstract class DetailBaseComponent extends BaseComponent { /** * Reference to the child modal component */ […]

By Pradeep
Published
Categorized as angular, angular10, angular9, viewchild Tagged , , ,

Angular 10 Unit test – Component instance is returning undefined

Am getting undefined value on the component instance. It was working before i upgraded from angular 8 to angular 10. The only thing i change in my test is , async() to waitForAsync() as async was deprecated. describe(‘ProtocolInfoComponent’, () => { let component: ProtocolInfoComponent; let fixture: ComponentFixture<ProtocolInfoComponent>; const mockActivatedRoute = new MockActivatedRoute({ parent: new MockActivatedRoute({ […]

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