Skip to content

Commit 226cb2e

Browse files
committed
refactor: minor fixes, icons cleanup
1 parent ca4cfde commit 226cb2e

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
22
import { Router, NavigationEnd } from '@angular/router';
33

44
import { IconSetService } from '@coreui/icons-angular';
5-
import { freeSet } from '@coreui/icons';
5+
import { cilUser } from '@coreui/icons';
66

77
@Component({
88
// tslint:disable-next-line
@@ -16,7 +16,7 @@ export class AppComponent implements OnInit {
1616
public iconSet: IconSetService
1717
) {
1818
// iconSet singleton
19-
iconSet.icons = { ...freeSet };
19+
iconSet.icons = { cilUser };
2020
}
2121

2222
ngOnInit() {

src/app/views/base/navbars/navbars.component.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3+
import { CollapseDirective } from 'ngx-bootstrap/collapse';
4+
import { BsDropdownDirective, BsDropdownModule } from 'ngx-bootstrap/dropdown';
25

36
import { NavbarsComponent } from './navbars.component';
47

@@ -8,9 +11,10 @@ describe('NavbarsComponent', () => {
811

912
beforeEach(waitForAsync(() => {
1013
TestBed.configureTestingModule({
11-
declarations: [ NavbarsComponent ]
14+
declarations: [NavbarsComponent, CollapseDirective, BsDropdownDirective],
15+
imports: [NoopAnimationsModule, BsDropdownModule.forRoot()]
1216
})
13-
.compileComponents();
17+
.compileComponents();
1418
}));
1519

1620
beforeEach(() => {

src/app/views/icons/coreui-icons.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { ActivatedRoute } from '@angular/router';
33
import { Platform } from '@angular/cdk/platform';
44

55
import { IconSetService } from '@coreui/icons-angular';
6+
import { freeSet } from '@coreui/icons';
67

78
@Component({
89
templateUrl: 'coreui-icons.component.html',
9-
styleUrls: ['coreui-icons.component.scss']
10+
styleUrls: ['coreui-icons.component.scss'],
11+
providers: [IconSetService],
1012
})
1113
export class CoreUIIconsComponent implements OnInit {
1214
public title = 'CoreUI Icons';
@@ -16,7 +18,9 @@ export class CoreUIIconsComponent implements OnInit {
1618
public platform: Platform,
1719
private route: ActivatedRoute,
1820
public iconSet: IconSetService
19-
) {}
21+
) {
22+
iconSet.icons = { ...freeSet };
23+
}
2024

2125
ngOnInit() {
2226
const path = this.route.routeConfig.path;

0 commit comments

Comments
 (0)