Skip to content

Commit 8c2a18c

Browse files
committed
refactor(*): minor fixes and changes
1 parent 74b3521 commit 8c2a18c

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/app/app.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
1+
import { provideHttpClient, withFetch, withInterceptorsFromDi } from "@angular/common/http";
22
import { ApplicationConfig, importProvidersFrom } from "@angular/core";
33
import { FormsModule } from "@angular/forms";
44
import { BrowserModule, HammerModule, provideClientHydration, withEventReplay } from "@angular/platform-browser";
@@ -16,7 +16,7 @@ export const AppConfig: ApplicationConfig = {
1616
HammerModule,
1717
NgbModule
1818
),
19-
provideHttpClient(withInterceptorsFromDi()),
19+
provideHttpClient(withInterceptorsFromDi(), withFetch()),
2020
provideAnimations(),
2121
provideRouter(AppRoutes),
2222
OverflowService, provideClientHydration(withEventReplay())

src/app/data-display/badge/badge-tailwind-styling-sample/badge-tailwind-styling-sample.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="wrapper">
88
<div>
99
<igx-avatar icon="person" shape="circle" size="small"></igx-avatar>
10-
<igx-badge [icon]="member.icon" shape="square" class="badge-style !light-badge ![background:#FF4E00] ![--border-radius:4px]"></igx-badge>
10+
<igx-badge [icon]="member.icon" shape="square" class="badge-style !light-badge ![--background-color:#FF4E00] ![--border-radius:4px]"></igx-badge>
1111
</div>
1212
<div class="contact-container">
1313
<span class="contact-name">{{ member.name }}</span>

src/app/index/index.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AfterViewInit, ChangeDetectorRef, Component, OnInit, ViewChild, DOCUMENT, inject } from '@angular/core';
1+
import { AfterViewInit, ChangeDetectorRef, Component, OnInit, ViewChild, DOCUMENT, PLATFORM_ID, inject } from '@angular/core';
22
import { NavigationStart, Route, Router, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router';
33
import { IgxNavigationDrawerComponent, IgxTreeComponent, IgxLayoutDirective, IgxNavDrawerTemplateDirective, IgxNavDrawerItemDirective, IgxRippleDirective, IgxIconComponent, IgxInputGroupComponent, IgxPrefixDirective, IgxInputDirective, IgxSuffixDirective, IgxTreeNodeComponent, IgxTreeNodeLinkDirective, IgxFlexDirective, IgxNavbarComponent } from 'igniteui-angular';
44
import { fromEvent, Subscription } from 'rxjs';
@@ -19,6 +19,7 @@ import { servicesRoutesData } from '../services/services-routes-data';
1919
import { themingRoutesData } from '../theming/theming-routes-data';
2020
import { treeGridRoutesData } from '../tree-grid/tree-grid-routes-data';
2121
import { FormsModule } from '@angular/forms';
22+
import { isPlatformBrowser } from '@angular/common';
2223

2324

2425

@@ -32,7 +33,7 @@ export class IndexComponent implements OnInit, AfterViewInit {
3233
private router = inject(Router);
3334
private cdr = inject(ChangeDetectorRef);
3435
private document = inject<Document>(DOCUMENT);
35-
36+
private platformId = inject(PLATFORM_ID);
3637

3738
@ViewChild('navdrawer', { read: IgxNavigationDrawerComponent, static: true })
3839
public navdrawer: IgxNavigationDrawerComponent;
@@ -168,7 +169,7 @@ export class IndexComponent implements OnInit, AfterViewInit {
168169
const loadedRouteItem = this.appRoutes.filter(
169170
(route: any) => route.path === this.router.url)[0];
170171

171-
if (loadedRouteItem) {
172+
if (loadedRouteItem && isPlatformBrowser(this.platformId)) {
172173
// Get parent (INavItem)
173174
const loadedParentItem = this.currentNavItems.filter(
174175
(navItem) => navItem.name === loadedRouteItem.parentName)[0];
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<igx-avatar class="!light-avatar ![background:#FF4E00]" initials="DY" shape="rounded"></igx-avatar>
1+
<igx-avatar class="!light-avatar ![--background:#FF4E00]" initials="DY" shape="rounded"></igx-avatar>

0 commit comments

Comments
 (0)