Fixed a few errors which showed up when ng build --prod was used

Removed the loading bar component as it was giving build troubles and can be added back later
Added the HttpClientModule import to app.module without which it will not run
This commit is contained in:
Amritanshu 2019-08-19 17:35:57 +05:30
parent 9a03428c92
commit 2474e3ef25
10 changed files with 12 additions and 20 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ env
.idea/ .idea/
*.egg-info/ *.egg-info/
DB/*.sql DB/*.sql
barker/static/

View File

@ -13,7 +13,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "../brewman/static", "outputPath": "../barker/static",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",

View File

@ -23,8 +23,6 @@
"@angular/platform-browser": "^8.0.0", "@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0", "@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0", "@angular/router": "^8.0.0",
"@ngx-loading-bar/http-client": "^3.0.0",
"@ngx-loading-bar/router": "^3.0.0",
"angular2-hotkeys": "^2.1.4", "angular2-hotkeys": "^2.1.4",
"core-js": "^3.1.1", "core-js": "^3.1.1",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
@ -36,7 +34,7 @@
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.800.0", "@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "^8.0.2", "@angular/cli": "^8.2.2",
"@angular/compiler-cli": "^8.0.0", "@angular/compiler-cli": "^8.0.0",
"@angular/language-service": "^8.0.0", "@angular/language-service": "^8.0.0",
"@types/jasmine": "^3.3.0", "@types/jasmine": "^3.3.0",

View File

@ -1,4 +1,3 @@
<!--?<ngx-loading-bar></ngx-loading-bar>-->
<div fxLayout="column" fxLayoutAlign="center none" class="mat-app-background basic-container"> <div fxLayout="column" fxLayoutAlign="center none" class="mat-app-background basic-container">
<router-outlet></router-outlet> <router-outlet></router-outlet>
</div> </div>

View File

@ -1,6 +1,7 @@
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { LOCALE_ID, NgModule } from '@angular/core'; import { LOCALE_ID, NgModule } from '@angular/core';
import { registerLocaleData } from '@angular/common'; import { registerLocaleData } from '@angular/common';
import { HttpClientModule } from "@angular/common/http";
import enIN from '@angular/common/locales/en-IN'; import enIN from '@angular/common/locales/en-IN';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
@ -39,6 +40,7 @@ registerLocaleData(enIN);
AppRoutingModule, AppRoutingModule,
BrowserAnimationsModule, BrowserAnimationsModule,
FlexLayoutModule, FlexLayoutModule,
HttpClientModule,
MatGridListModule, MatGridListModule,
MatCardModule, MatCardModule,
MatMenuModule, MatMenuModule,

View File

@ -7,14 +7,10 @@ import { MatToolbarModule } from '@angular/material/toolbar';
import {RouterModule} from '@angular/router'; import {RouterModule} from '@angular/router';
import {HTTP_INTERCEPTORS} from '@angular/common/http'; import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {HttpAuthInterceptor} from './http-auth-interceptor'; import {HttpAuthInterceptor} from './http-auth-interceptor';
import {LoadingBarHttpClientModule} from '@ngx-loading-bar/http-client';
import {LoadingBarRouterModule} from '@ngx-loading-bar/router';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
LoadingBarHttpClientModule,
LoadingBarRouterModule,
MatButtonModule, MatButtonModule,
MatIconModule, MatIconModule,
MatMenuModule, MatMenuModule,
@ -23,10 +19,6 @@ import {LoadingBarRouterModule} from '@ngx-loading-bar/router';
], ],
declarations: [ declarations: [
], ],
exports: [
LoadingBarHttpClientModule,
LoadingBarRouterModule
],
providers: [[{ providers: [[{
provide: HTTP_INTERCEPTORS, provide: HTTP_INTERCEPTORS,
useClass: HttpAuthInterceptor, useClass: HttpAuthInterceptor,

View File

@ -26,8 +26,8 @@
</form> </form>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<button mat-raised-button [disabled]="item.isFixture" color="primary" (click)="save()">Save</button> <button mat-raised-button color="primary" (click)="save()">Save</button>
<button mat-raised-button [disabled]="item.isFixture" color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button> <button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
</div> </div>

View File

@ -26,8 +26,8 @@
</form> </form>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<button mat-raised-button [disabled]="item.isFixture" color="primary" (click)="save()">Save</button> <button mat-raised-button color="primary" (click)="save()">Save</button>
<button mat-raised-button [disabled]="item.isFixture" color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button> <button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
</div> </div>

View File

@ -59,7 +59,7 @@
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<button mat-raised-button color="primary" (click)="save()">Save</button> <button mat-raised-button color="primary" (click)="save()">Save</button>
<button mat-raised-button color="warn" *ngIf="id" (click)="confirmDelete()">Delete</button> <button mat-raised-button color="warn" *ngIf="item.id" (click)="confirmDelete()">Delete</button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
</div> </div>

View File

@ -15,8 +15,8 @@
</form> </form>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<button mat-raised-button [disabled]="item.isFixture" color="primary" (click)="save()">Save</button> <button mat-raised-button color="primary" (click)="save()">Save</button>
<button mat-raised-button [disabled]="item.isFixture" color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button> <button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">Delete</button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
</div> </div>