Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated to Angular 8 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
12,487 changes: 12,487 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

65 changes: 32 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,44 @@
},
"private": true,
"dependencies": {
"@angular/animations": "7.2.4",
"@angular/common": "7.2.4",
"@angular/compiler": "7.2.4",
"@angular/core": "7.2.4",
"@angular/forms": "7.2.4",
"@angular/http": "7.2.4",
"@angular/platform-browser": "7.2.4",
"@angular/platform-browser-dynamic": "7.2.4",
"@angular/router": "7.2.4",
"@ng-bootstrap/ng-bootstrap": "4.0.1",
"bootstrap": "4.1.3",
"chart.js": "2.7.3",
"@angular/animations": "8.2.3",
"@angular/common": "8.2.3",
"@angular/compiler": "8.2.3",
"@angular/core": "8.2.3",
"@angular/forms": "8.2.3",
"@angular/platform-browser": "8.2.3",
"@angular/platform-browser-dynamic": "8.2.3",
"@angular/router": "8.2.3",
"@ng-bootstrap/ng-bootstrap": "^5.1.0",
"bootstrap": "^4.3.1",
"chart.js": "^2.8.0",
"clipboard": "2.0.4",
"core-js": "2.6.4",
"ngx-clipboard": "11.1.9",
"ngx-toastr": "9.1.2",
"nouislider": "13.1.1",
"rxjs": "6.4.0",
"zone.js": "0.8.29"
"core-js": "^3.2.1",
"ngx-clipboard": "^12.2.1",
"ngx-toastr": "^10.1.0",
"nouislider": "^14.0.2",
"rxjs": "6.5.2",
"zone.js": "^0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.13.1",
"@angular/cli": "7.3.1",
"@angular/compiler-cli": "7.2.4",
"@angular/language-service": "7.2.4",
"@types/jasmine": "3.3.8",
"@angular-devkit/build-angular": "~0.803.0",
"@angular/cli": "8.3.0",
"@angular/compiler-cli": "8.2.3",
"@angular/language-service": "8.2.3",
"@types/jasmine": "^3.4.0",
"@types/jasminewd2": "2.0.6",
"@types/node": "11.9.0",
"codelyzer": "4.5.0",
"jasmine-core": "3.3.0",
"@types/node": "^12.7.2",
"codelyzer": "^5.0.1",
"jasmine-core": "^3.4.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.0.0",
"karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "2.0.4",
"karma": "^4.3.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.4.0",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "5.4.2",
"ts-node": "8.0.2",
"tslint": "5.12.1",
"typescript": "3.2.4"
"ts-node": "^8.3.0",
"tslint": "^5.19.0",
"typescript": "3.5.3"
}
}
10 changes: 5 additions & 5 deletions src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Routes, RouterModule } from '@angular/router';
import { AdminLayoutComponent } from './layouts/admin-layout/admin-layout.component';
import { AuthLayoutComponent } from './layouts/auth-layout/auth-layout.component';

const routes: Routes =[
const routes: Routes = [
{
path: '',
redirectTo: 'dashboard',
Expand All @@ -17,7 +17,7 @@ const routes: Routes =[
children: [
{
path: '',
loadChildren: './layouts/admin-layout/admin-layout.module#AdminLayoutModule'
loadChildren: () => import('./layouts/admin-layout/admin-layout.module').then(m => m.AdminLayoutModule)
}
]
}, {
Expand All @@ -26,7 +26,7 @@ const routes: Routes =[
children: [
{
path: '',
loadChildren: './layouts/auth-layout/auth-layout.module#AuthLayoutModule'
loadChildren: () => import('./layouts/auth-layout/auth-layout.module').then(m => m.AuthLayoutModule)
}
]
}, {
Expand All @@ -39,8 +39,8 @@ const routes: Routes =[
imports: [
CommonModule,
BrowserModule,
RouterModule.forRoot(routes,{
useHash: true
RouterModule.forRoot(routes, {
useHash: true
})
],
exports: [
Expand Down
10 changes: 5 additions & 5 deletions src/app/components/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export class NavbarComponent implements OnInit {
ngOnInit() {
this.listTitles = ROUTES.filter(listTitle => listTitle);
}
getTitle(){
var titlee = this.location.prepareExternalUrl(this.location.path());
if(titlee.charAt(0) === '#'){
getTitle() {
let titlee = this.location.prepareExternalUrl(this.location.path());
if (titlee.charAt(0) === '#') {
titlee = titlee.slice( 1 );
}

for(var item = 0; item < this.listTitles.length; item++){
if(this.listTitles[item].path === titlee){
for (let item = 0; item < this.listTitles.length; item++) {
if (this.listTitles[item].path === titlee) {
return this.listTitles[item].title;
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/components/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ declare interface RouteInfo {
}
export const ROUTES: RouteInfo[] = [
{ path: '/dashboard', title: 'Dashboard', icon: 'ni-tv-2 text-primary', class: '' },
{ path: '/icons', title: 'Icons', icon:'ni-planet text-blue', class: '' },
{ path: '/maps', title: 'Maps', icon:'ni-pin-3 text-orange', class: '' },
{ path: '/user-profile', title: 'User profile', icon:'ni-single-02 text-yellow', class: '' },
{ path: '/tables', title: 'Tables', icon:'ni-bullet-list-67 text-red', class: '' },
{ path: '/login', title: 'Login', icon:'ni-key-25 text-info', class: '' },
{ path: '/register', title: 'Register', icon:'ni-circle-08 text-pink', class: '' }
{ path: '/icons', title: 'Icons', icon: 'ni-planet text-blue', class: '' },
{ path: '/maps', title: 'Maps', icon: 'ni-pin-3 text-orange', class: '' },
{ path: '/user-profile', title: 'User profile', icon: 'ni-single-02 text-yellow', class: '' },
{ path: '/tables', title: 'Tables', icon: 'ni-bullet-list-67 text-red', class: '' },
{ path: '/login', title: 'Login', icon: 'ni-key-25 text-info', class: '' },
{ path: '/register', title: 'Register', icon: 'ni-circle-08 text-pink', class: '' }
];

@Component({
Expand Down
2 changes: 1 addition & 1 deletion src/app/layouts/admin-layout/admin-layout.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';import { RouterModule } from '@angular/router';
import { HttpClientModule } from '@angular/common/http'; import { RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

Expand Down
16 changes: 8 additions & 8 deletions src/app/layouts/auth-layout/auth-layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ export class AuthLayoutComponent implements OnInit, OnDestroy {
constructor(private router: Router) { }

ngOnInit() {
var html = document.getElementsByTagName("html")[0];
html.classList.add("auth-layout");
var body = document.getElementsByTagName("body")[0];
body.classList.add("bg-default");
const html = document.getElementsByTagName('html')[0];
html.classList.add('auth-layout');
const body = document.getElementsByTagName('body')[0];
body.classList.add('bg-default');
this.router.events.subscribe((event) => {
this.isCollapsed = true;
});

}
ngOnDestroy() {
var html = document.getElementsByTagName("html")[0];
html.classList.remove("auth-layout");
var body = document.getElementsByTagName("body")[0];
body.classList.remove("bg-default");
const html = document.getElementsByTagName('html')[0];
html.classList.remove('auth-layout');
const body = document.getElementsByTagName('body')[0];
body.classList.remove('bg-default');
}
}
12 changes: 6 additions & 6 deletions src/app/pages/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
parseOptions,
chartExample1,
chartExample2
} from "../../variables/charts";
} from '../../variables/charts';

@Component({
selector: 'app-dashboard',
Expand All @@ -19,8 +19,8 @@ export class DashboardComponent implements OnInit {
public datasets: any;
public data: any;
public salesChart;
public clicked: boolean = true;
public clicked1: boolean = false;
public clicked = true;
public clicked1 = false;

constructor() { }

Expand All @@ -33,18 +33,18 @@ export class DashboardComponent implements OnInit {
this.data = this.datasets[0];


var chartOrders = document.getElementById('chart-orders');
const chartOrders = document.getElementById('chart-orders');

parseOptions(Chart, chartOptions());


var ordersChart = new Chart(chartOrders, {
const ordersChart = new Chart(chartOrders, {
type: 'bar',
options: chartExample2.options,
data: chartExample2.data
});

var chartSales = document.getElementById('chart-sales');
const chartSales = document.getElementById('chart-sales');

this.salesChart = new Chart(chartSales, {
type: 'line',
Expand Down
32 changes: 16 additions & 16 deletions src/app/pages/maps/maps.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,39 @@ export class MapsComponent implements OnInit {

ngOnInit() {
let map = document.getElementById('map-canvas');
let lat = map.getAttribute('data-lat');
let lng = map.getAttribute('data-lng');
const lat = map.getAttribute('data-lat');
const lng = map.getAttribute('data-lng');

var myLatlng = new google.maps.LatLng(lat, lng);
var mapOptions = {
const myLatlng = new google.maps.LatLng(lat, lng);
const mapOptions = {
zoom: 12,
scrollwheel: false,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
styles: [
{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},
{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},
{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},
{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},
{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},
{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},
{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},
{"featureType":"water","elementType":"all","stylers":[{"color":'#5e72e4'},{"visibility":"on"}]}]
}
{'featureType': 'administrative', 'elementType': 'labels.text.fill', 'stylers': [{'color': '#444444'}]},
{'featureType': 'landscape', 'elementType': 'all', 'stylers': [{'color': '#f2f2f2'}]},
{'featureType': 'poi', 'elementType': 'all', 'stylers': [{'visibility': 'off'}]},
{'featureType': 'road', 'elementType': 'all', 'stylers': [{'saturation': -100}, {'lightness': 45}]},
{'featureType': 'road.highway', 'elementType': 'all', 'stylers': [{'visibility': 'simplified'}]},
{'featureType': 'road.arterial', 'elementType': 'labels.icon', 'stylers': [{'visibility': 'off'}]},
{'featureType': 'transit', 'elementType': 'all', 'stylers': [{'visibility': 'off'}]},
{'featureType': 'water', 'elementType': 'all', 'stylers': [{'color': '#5e72e4'}, {'visibility': 'on'}]}]
};

map = new google.maps.Map(map, mapOptions);

var marker = new google.maps.Marker({
const marker = new google.maps.Marker({
position: myLatlng,
map: map,
animation: google.maps.Animation.DROP,
title: 'Hello World!'
});

var contentString = '<div class="info-window-content"><h2>Argon Dashboard</h2>' +
const contentString = '<div class="info-window-content"><h2>Argon Dashboard</h2>' +
'<p>A beautiful Dashboard for Bootstrap 4. It is Free and Open Source.</p></div>';

var infowindow = new google.maps.InfoWindow({
const infowindow = new google.maps.InfoWindow({
content: contentString
});

Expand Down
Loading