Skip to content

Commit e0df9b5

Browse files
committed
fix(routes): add default routes
1 parent e1107a8 commit e0df9b5

File tree

7 files changed

+30
-3
lines changed

7 files changed

+30
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
## [angular](./README.md) version `changelog`
22

33
###### `v2.2.1`
4+
- fix(routes): add default routes
45
- fix(colors): class order for `bg-blue`
6+
- refactor(dafault-layout): observer add `attributeFilter` prop & `disconnect()`
57
- update: `@coreui/angular` to `2.2.1`
68
- update: `core-js` to `2.6.0`
79
- update: `@types/node` to `10.12.12`

src/app/containers/default-layout/default-layout.component.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Component, Input } from '@angular/core';
1+
import {Component, OnDestroy} from '@angular/core';
22
import { navItems } from './../../_nav';
33

44
@Component({
55
selector: 'app-dashboard',
66
templateUrl: './default-layout.component.html'
77
})
8-
export class DefaultLayoutComponent {
8+
export class DefaultLayoutComponent implements OnDestroy {
99
public navItems = navItems;
1010
public sidebarMinimized = true;
1111
private changes: MutationObserver;
@@ -17,7 +17,12 @@ export class DefaultLayoutComponent {
1717
});
1818

1919
this.changes.observe(<Element>this.element, {
20-
attributes: true
20+
attributes: true,
21+
attributeFilter: [ 'class' ]
2122
});
2223
}
24+
25+
ngOnDestroy(): void {
26+
this.changes.disconnect();
27+
}
2328
}

src/app/views/base/base-routing.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ const routes: Routes = [
2020
title: 'Base'
2121
},
2222
children: [
23+
{
24+
path: '',
25+
redirectTo: 'cards'
26+
},
2327
{
2428
path: 'cards',
2529
component: CardsComponent,

src/app/views/buttons/buttons-routing.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ const routes: Routes = [
1212
title: 'Buttons'
1313
},
1414
children: [
15+
{
16+
path: '',
17+
redirectTo: 'buttons'
18+
},
1519
{
1620
path: 'buttons',
1721
component: ButtonsComponent,

src/app/views/icons/icons-routing.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const routes: Routes = [
1313
title: 'Icons'
1414
},
1515
children: [
16+
{
17+
path: '',
18+
redirectTo: 'coreui-icons'
19+
},
1620
{
1721
path: 'coreui-icons',
1822
component: CoreUIIconsComponent,

src/app/views/notifications/notifications-routing.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ const routes: Routes = [
1212
title: 'Notifications'
1313
},
1414
children: [
15+
{
16+
path: '',
17+
redirectTo: 'alerts'
18+
},
1519
{
1620
path: 'alerts',
1721
component: AlertsComponent,

src/app/views/theme/theme-routing.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const routes: Routes = [
1111
title: 'Theme'
1212
},
1313
children: [
14+
{
15+
path: '',
16+
redirectTo: 'colors'
17+
},
1418
{
1519
path: 'colors',
1620
component: ColorsComponent,

0 commit comments

Comments
 (0)