From fcf16c676622251af05c0aea1d818a4429a54290 Mon Sep 17 00:00:00 2001
From: Carlo Dapor #2.0.0 #1.1.0 - 03/03/2018
diff --git a/docs/classes/Message.html b/docs/classes/Message.html
index 217fab9..53b9398 100644
--- a/docs/classes/Message.html
+++ b/docs/classes/Message.html
@@ -164,7 +164,7 @@
Notification
- src/models/preferencies.ts
+ src/models/preference.ts
export class Preferencies {
+ export class Preference {
public avatarUrl: string;
public preferredLang: string;
diff --git a/docs/classes/User.html b/docs/classes/User.html
index 9768a4a..1a2d68f 100644
--- a/docs/classes/User.html
+++ b/docs/classes/User.html
@@ -164,7 +164,7 @@
Notification
- Preferencies
+ Preference
User
@@ -430,7 +430,7 @@
Notification
- Preferencies
+ Preference
User
diff --git a/docs/components/AppFooterComponent.html b/docs/components/AppFooterComponent.html
index c6bf381..ac0645c 100644
--- a/docs/components/AppFooterComponent.html
+++ b/docs/components/AppFooterComponent.html
@@ -164,7 +164,7 @@
Notification
- Preferencies
+ Preference
User
@@ -430,7 +430,7 @@
Notification
- Preferencies
+ Preference
User
diff --git a/docs/components/AppHeaderComponent.html b/docs/components/AppHeaderComponent.html
index 3f62ddd..44066c9 100644
--- a/docs/components/AppHeaderComponent.html
+++ b/docs/components/AppHeaderComponent.html
@@ -164,7 +164,7 @@
Notification
- Preferencies
+ Preference
User
@@ -430,7 +430,7 @@
Notification
- Preferencies
+ Preference
User
diff --git a/docs/components/BreadcrumbComponent.html b/docs/components/BreadcrumbComponent.html
index 2b3bee3..c1bc437 100644
--- a/docs/components/BreadcrumbComponent.html
+++ b/docs/components/BreadcrumbComponent.html
@@ -164,7 +164,7 @@
Notification
- Preferencies
+ Preference
User
@@ -430,7 +430,7 @@
Notification
- Preferencies
+ Preference
User
diff --git a/docs/components/ComponentLoaderComponent.html b/docs/components/ComponentLoaderComponent.html
index b944e91..4b1cc26 100644
--- a/docs/components/ComponentLoaderComponent.html
+++ b/docs/components/ComponentLoaderComponent.html
@@ -164,7 +164,7 @@
Notification
- Preferencies
+ Preference
User
@@ -430,7 +430,7 @@
Notification
- Preferencies
+ Preference
User
diff --git a/docs/components/ControlSidebarComponent.html b/docs/components/ControlSidebarComponent.html
index bf541d9..2739b89 100644
--- a/docs/components/ControlSidebarComponent.html
+++ b/docs/components/ControlSidebarComponent.html
@@ -164,7 +164,7 @@
Notification
- Preferencies
+ Preference
User
@@ -430,7 +430,7 @@
Notification
- Preferencies
+ Preference
User
@@ -588,6 +588,7 @@ File
Implements
@@ -762,7 +763,7 @@
-
+
@@ -874,20 +875,15 @@
- items: any
+ items: any[]
- Type : any
+ Type : any[]
-
-
-
- Default value : null
-
@@ -914,20 +910,15 @@
- subs: any
+ subs: any[]
- Type : any
+ Type : any[]
-
-
-
- Default value : []
-
@@ -944,31 +935,32 @@
- import { Component, Input, OnInit } from '@angular/core';
+ import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { ControlSidebarService } from '../../services/control-sidebar.service';
-@Component( {
- selector: 'app-control-sidebar',
- styleUrls: ['./control-sidebar.component.css'],
- templateUrl: './control-sidebar.component.html'
+@Component({
+ selector: 'app-control-sidebar',
+ styleUrls: ['./control-sidebar.component.css'],
+ templateUrl: './control-sidebar.component.html'
})
-export class ControlSidebarComponent implements OnInit {
- public items: any = null;
- private subs: any = [];
+export class ControlSidebarComponent implements OnDestroy, OnInit {
+ public items: any[];
+ private subs: any[];
- constructor( public _sidebar: ControlSidebarService) { }
+ constructor (public _sidebar: ControlSidebarService) { }
- public ngOnInit(){
- let sub = this._sidebar.getItems().subscribe( ( items ) => {
+ public ngOnInit () {
+ const sub = this._sidebar.getItems().subscribe(items => {
this.items = items;
});
+ this.subs = [];
this.subs.push(sub);
}
- public ngOnDestroy(){
- this.subs.forEach( (sub) => {
- sub.unsubscribe();
- });
+ public ngOnDestroy () {
+ this.subs.forEach((sub) => sub.unsubscribe());
+ this.subs = null;
+ this.items = null;
}
}
@@ -980,45 +972,39 @@
'control-sidebar': true,
'control-sidebar-dark': true,
'control-sidebar-open': _sidebar.getState() | async
-}" >
- <!-- Create the tabs -->
- <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
- <ng-container *ngFor="#item of items, #i = index">
- <li [ngClass]="{'active': item.active}">
- <a href="#{{item.id}}" data-toggle="tab">
- <i class="fa fa-{{item.icon}}"></i>
- </a>
- </li>
- </ng-container>
- </ul>
- <!-- Tab panes -->
- <div class="tab-content">
- <ng-container *ngFor="#item of items, #i = index">
- <!-- Home tab content -->
- <div [ngClass]="{'active': item.active, 'tab-pane': true}" id="{{item.id}}">
- <ng-container *ngFor="#subitem of item.items, #i = index">
- <!-- COMPONENT -->
- <ng-container *ngIf="subitem.class">
- <li>
- <app-component-loader [class_component]="subitem.class" [data]="subitem.data"></app-component-loader>
- </li>
- </ng-container>
-
- <ng-container *ngIf="subitem.html">
- {{ subitem.html | safeHtml }}
- </ng-container>
-
- </ng-container>
-
- </div>
- </ng-container>
- </div>
+}">
+ <!-- Create the tabs -->
+ <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
+ <ng-container *ngFor="let item of items">
+ <li [ngClass]="{'active': item.active}">
+ <a href="{{ item.id }}" data-toggle="tab"><i class="fa fa-{{ item.icon }}"></i></a>
+ </li>
+ </ng-container>
+ </ul>
+ <!-- Tab panes -->
+ <div class="tab-content">
+ <ng-container *ngFor="let item of items">
+ <!-- Home tab content -->
+ <div [ngClass]="{'active': item.active, 'tab-pane': true}" id="{{ item.id }}">
+ <ng-container *ngFor="let subitem of item.items">
+ <!-- COMPONENT -->
+ <ng-container *ngIf="subitem.class">
+ <li>
+ <app-component-loader [class_component]="subitem.class" [data]="subitem.data"></app-component-loader>
+ </li>
+ </ng-container>
+ <ng-container *ngIf="subitem.html">
+ {{ subitem.html | safeHtml }}
+ </ng-container>
+ </ng-container>
+ </div>
+ </ng-container>
+ </div>
</aside>
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
-<div class="control-sidebar-bg"></div>
-
+<div class="control-sidebar-bg"></div>
@@ -1044,7 +1030,7 @@