PWA Implementation

This commit is contained in:
venbatechnologies@gmail.com 2020-10-23 12:16:35 +05:30
parent 465f234635
commit 5ec65f4594
16 changed files with 1892 additions and 835 deletions

View File

@ -20,6 +20,7 @@
"src/assets",
"src/favicon.ico",
"src/firebase-messaging-sw.js",
"src/manifest.json",
"src/manifest.json"
],
"styles": [
@ -63,7 +64,8 @@
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
],
"serviceWorker": true
},
"staging": {
"optimization": true,
@ -79,15 +81,16 @@
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stage.ts"
}]
}
]
},
"test":
{
"test": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stage.ts"
}]
}
]
}
}
},
@ -144,7 +147,8 @@
],
"assets": [
"src/assets",
"src/favicon.ico"
"src/favicon.ico",
"src/manifest.json"
]
}
},

26
ng6-seed/ngsw-config.json Normal file
View File

@ -0,0 +1,26 @@
{
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**"
]
}
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,9 @@
"@angular/material-moment-adapter": "^6.0.0-rc.5",
"@angular/platform-browser": "^6.1.10",
"@angular/platform-browser-dynamic": "^6.1.10",
"@angular/pwa": "^0.1001.7",
"@angular/router": "^6.1.10",
"@angular/service-worker": "^6.1.10",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1",
"@swimlane/ngx-charts": "^7.0.1",
@ -47,7 +49,7 @@
"font-awesome": "4.7.0",
"hammerjs": "2.0.8",
"intl": "^1.2.4",
"jquery": "^3.4.1",
"jquery": "^3.5.1",
"karma-jasmine": "^1.1.1",
"leaflet": "^1.4.0",
"moment": "^2.24.0",
@ -64,9 +66,9 @@
"ngx-mat-select-search": "^1.8.0",
"ngx-perfect-scrollbar": "5.0.0-7",
"ngx-viewer": "^1.0.1",
"node-sass": "^4.12.0",
"node-sass": "^4.14.1",
"perfect-scrollbar": "^1.3.0",
"quill": "^1.2.0",
"quill": "^1.3.7",
"rxjs": "^6.5.1",
"rxjs-compat": "^6.5.1",
"screenfull": "^3.2.2",

View File

@ -1,6 +1,6 @@
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';
import { PreloadAllModules, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule, Http } from '@angular/http';
@ -49,6 +49,8 @@ import { PdTrigerService } from './personal-discussion/pd-service/pd-triger.serv
import { LoaderService } from './shared/loaderService/loader.service';
import { HttpLoaderComponent } from './layouts/http-loader/http-loader.component';
import { AdvanceFilterComponent } from './sales-pd/advance-filter/advance-filter.component';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
}
@ -57,9 +59,9 @@ export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true
};
// const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
// suppressScrollX: true
// };
@NgModule({
declarations: [
@ -75,7 +77,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
BrowserModule,
BrowserAnimationsModule,
SharedModule,
RouterModule.forRoot(AppRoutes),
RouterModule.forRoot(AppRoutes,{preloadingStrategy:PreloadAllModules}),
FormsModule,
HttpModule,
MatSidenavModule,
@ -104,6 +106,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
}
}),
FlexLayoutModule,
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
],
providers: [
{

View File

@ -13,22 +13,23 @@ export const AppRoutes: Routes = [{
path: '',
component: AdminLayoutComponent,
canActivateChild:[AuthGuard],
children: [{
path: 'home',
loadChildren: './dashboard/dashboard.module#DashboardModule'
},{
path:'setting',
loadChildren:'./settings/settings.module#SettingsModule'
}
,
children: [
// {
// path: 'home',
// loadChildren: './dashboard/dashboard.module#DashboardModule'
// },{
// path:'setting',
// loadChildren:'./settings/settings.module#SettingsModule'
// }
// ,
{
path:'personal_discussion',
loadChildren:'./personal-discussion/personal-discussion.module#PersonalDiscussionModule'
},
{
path:'quality_check_discussion',
loadChildren:'./quality-check/quality-check.module#QualityCheckModule'
},
// {
// path:'quality_check_discussion',
// loadChildren:'./quality-check/quality-check.module#QualityCheckModule'
// },
{
path:'sales-pd-list',
component:SalesPdComponent
@ -37,10 +38,10 @@ export const AppRoutes: Routes = [{
path:'credit_pd',
loadChildren:'./lender-credit-pd/lender-credit-pd.module#LenderCreditPdModule'
},
{
path:'reports',
loadChildren:'./reports/reports.module#ReportsModule'
},
// {
// path:'reports',
// loadChildren:'./reports/reports.module#ReportsModule'
// },
]
}, {
path: '',

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

View File

@ -150,6 +150,8 @@
<link rel="stylesheet" href="assets/wheather-icon/css/weather-icons.min.css" />
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/css/materialize.min.css">-->
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700|Material+Icons" rel="stylesheet">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#1976d2">
</head>
<body>
@ -168,6 +170,7 @@
</div>
</div>
</app-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> -->

View File

@ -0,0 +1,51 @@
{
"name": "optima",
"short_name": "optima",
"theme_color": "#1976d2",
"background_color": "#fafafa",
"display": "standalone",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "assets/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "assets/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "assets/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "assets/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}