Skip to content

Commit

Permalink
fix(routes): add default routes
Browse files Browse the repository at this point in the history
  • Loading branch information
xidedix committed Dec 5, 2018
1 parent e1107a8 commit e0df9b5
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## [angular](./README.md) version `changelog`

###### `v2.2.1`
- fix(routes): add default routes
- fix(colors): class order for `bg-blue`
- refactor(dafault-layout): observer add `attributeFilter` prop & `disconnect()`
- update: `@coreui/angular` to `2.2.1`
- update: `core-js` to `2.6.0`
- update: `@types/node` to `10.12.12`
Expand Down
11 changes: 8 additions & 3 deletions src/app/containers/default-layout/default-layout.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, Input } from '@angular/core';
import {Component, OnDestroy} from '@angular/core';
import { navItems } from './../../_nav';

@Component({
selector: 'app-dashboard',
templateUrl: './default-layout.component.html'
})
export class DefaultLayoutComponent {
export class DefaultLayoutComponent implements OnDestroy {
public navItems = navItems;
public sidebarMinimized = true;
private changes: MutationObserver;
Expand All @@ -17,7 +17,12 @@ export class DefaultLayoutComponent {
});

this.changes.observe(<Element>this.element, {
attributes: true
attributes: true,
attributeFilter: [ 'class' ]
});
}

ngOnDestroy(): void {
this.changes.disconnect();
}
}
4 changes: 4 additions & 0 deletions src/app/views/base/base-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const routes: Routes = [
title: 'Base'
},
children: [
{
path: '',
redirectTo: 'cards'
},
{
path: 'cards',
component: CardsComponent,
Expand Down
4 changes: 4 additions & 0 deletions src/app/views/buttons/buttons-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const routes: Routes = [
title: 'Buttons'
},
children: [
{
path: '',
redirectTo: 'buttons'
},
{
path: 'buttons',
component: ButtonsComponent,
Expand Down
4 changes: 4 additions & 0 deletions src/app/views/icons/icons-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const routes: Routes = [
title: 'Icons'
},
children: [
{
path: '',
redirectTo: 'coreui-icons'
},
{
path: 'coreui-icons',
component: CoreUIIconsComponent,
Expand Down
4 changes: 4 additions & 0 deletions src/app/views/notifications/notifications-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const routes: Routes = [
title: 'Notifications'
},
children: [
{
path: '',
redirectTo: 'alerts'
},
{
path: 'alerts',
component: AlertsComponent,
Expand Down
4 changes: 4 additions & 0 deletions src/app/views/theme/theme-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const routes: Routes = [
title: 'Theme'
},
children: [
{
path: '',
redirectTo: 'colors'
},
{
path: 'colors',
component: ColorsComponent,
Expand Down

0 comments on commit e0df9b5

Please sign in to comment.