Skip to content

Commit 22357ed

Browse files
authored
Merge pull request #2182 from adumesny/master
demo Angular v15
2 parents ae491a8 + 15b41ba commit 22357ed

File tree

8 files changed

+1649
-2568
lines changed

8 files changed

+1649
-2568
lines changed

demo/angular/.browserslistrc

Lines changed: 0 additions & 17 deletions
This file was deleted.

demo/angular/package-lock.json

Lines changed: 956 additions & 1328 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/angular/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@angular/animations": "^14.2.12",
14-
"@angular/common": "^14.2.12",
15-
"@angular/compiler": "^14.2.12",
16-
"@angular/core": "^14.2.12",
17-
"@angular/forms": "^14.2.12",
18-
"@angular/platform-browser": "^14.2.12",
19-
"@angular/platform-browser-dynamic": "^14.2.12",
20-
"@angular/router": "^14.2.12",
13+
"@angular/animations": "^15.1.1",
14+
"@angular/common": "^15.1.1",
15+
"@angular/compiler": "^15.1.1",
16+
"@angular/core": "^15.1.1",
17+
"@angular/forms": "^15.1.1",
18+
"@angular/platform-browser": "^15.1.1",
19+
"@angular/platform-browser-dynamic": "^15.1.1",
20+
"@angular/router": "^15.1.1",
2121
"gridstack": "^7.2",
2222
"rxjs": "~6.6.0",
2323
"tslib": "^2.3.0",
2424
"zone.js": "~0.11.4"
2525
},
2626
"devDependencies": {
27-
"@angular-devkit/build-angular": "^14.2.10",
28-
"@angular/cli": "^14.2.10",
29-
"@angular/compiler-cli": "^14.2.12",
27+
"@angular-devkit/build-angular": "^15.1.2",
28+
"@angular/cli": "^15.1.2",
29+
"@angular/compiler-cli": "^15.1.1",
3030
"@types/jasmine": "~3.8.0",
3131
"@types/node": "^12.11.1",
3232
"jasmine-core": "~3.8.0",
@@ -35,6 +35,6 @@
3535
"karma-coverage": "~2.0.3",
3636
"karma-jasmine": "~4.0.0",
3737
"karma-jasmine-html-reporter": "~1.7.0",
38-
"typescript": "~4.6.4"
38+
"typescript": "~4.9.4"
3939
}
4040
}

demo/angular/src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
<div>
3-
<p>Pick a demo to load:</p>
3+
<p class="pick-info">Pick a demo to load:</p>
44
<button (click)="show=0">Simple</button>
55
<button (click)="show=1">ngFor case</button>
66
<button (click)="show=2">ngFor custom command</button>

demo/angular/src/app/app.component.spec.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,10 @@ describe('AppComponent', () => {
1616
expect(app).toBeTruthy();
1717
});
1818

19-
it(`should have as title 'angular-ngFor'`, () => {
20-
const fixture = TestBed.createComponent(AppComponent);
21-
const app = fixture.componentInstance;
22-
expect(app.title).toEqual('angular-ngFor');
23-
});
24-
25-
it('should render title', () => {
19+
it('should have content', () => {
2620
const fixture = TestBed.createComponent(AppComponent);
2721
fixture.detectChanges();
2822
const compiled = fixture.nativeElement as HTMLElement;
29-
expect(compiled.querySelector('.content span')?.textContent).toContain('angular-ngFor app is running!');
23+
expect(compiled.querySelector('.pick-info')?.textContent).toContain('Pick a demo to load');
3024
});
3125
});

demo/angular/src/test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,9 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: {
11-
context(path: string, deep?: boolean, filter?: RegExp): {
12-
keys(): string[];
13-
<T>(id: string): T;
14-
};
15-
};
16-
1710
// First, initialize the Angular testing environment.
1811
getTestBed().initTestEnvironment(
1912
BrowserDynamicTestingModule,
2013
platformBrowserDynamicTesting(),
2114
{ teardown: { destroyAfterEach: true }},
2215
);
23-
24-
// Then we find all the tests.
25-
const context = require.context('./', true, /\.spec\.ts$/);
26-
// And load the modules.
27-
context.keys().map(context);

demo/angular/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
"experimentalDecorators": true,
1515
"moduleResolution": "node",
1616
"importHelpers": true,
17-
"target": "es2020",
17+
"target": "ES2022",
1818
"module": "es2020",
1919
"lib": [
2020
"es2018",
2121
"dom"
22-
]
22+
],
23+
"useDefineForClassFields": false
2324
},
2425
"angularCompilerOptions": {
2526
"enableI18nLegacyMessageIdFormat": false,

0 commit comments

Comments
 (0)