Merge pull request #993 from mempool/simon/angular-13

Upgrading frontend to Angular 13
This commit is contained in:
wiz
2021-12-09 10:16:54 +00:00
committed by GitHub
7 changed files with 3683 additions and 8760 deletions

View File

@@ -1,5 +1,5 @@
import { Component, Input, AfterViewInit, OnDestroy, ViewChild, ElementRef } from '@angular/core';
import * as QRCode from 'qrcode/build/qrcode.js';
import { Component, Input, AfterViewInit, ViewChild, ElementRef } from '@angular/core';
import * as QRCode from 'qrcode';
import { StateService } from 'src/app/services/state.service';
@Component({
@@ -23,7 +23,7 @@ export class QrcodeComponent implements AfterViewInit {
if (!this.stateService.isBrowser) {
return;
}
const opts = {
const opts: QRCode.QRCodeRenderersOptions = {
errorCorrectionLevel: 'H',
margin: 0,
color: {
@@ -31,7 +31,6 @@ export class QrcodeComponent implements AfterViewInit {
light: '#fff'
},
width: this.size,
height: this.size,
};
if (!this.data) {

View File

@@ -22,16 +22,6 @@ import '@angular/localize/init';
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags

View File

@@ -12,7 +12,9 @@ declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);