Skip to content

Commit 472d6b9

Browse files
committed
upgrade to Angular 9
1 parent 8315b43 commit 472d6b9

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

angular.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build": {
1212
"builder": "@angular-devkit/build-angular:browser",
1313
"options": {
14+
"aot": true,
1415
"outputPath": "dist",
1516
"index": "src/index.html",
1617
"main": "src/main.ts",
@@ -27,6 +28,12 @@
2728
},
2829
"configurations": {
2930
"production": {
31+
"budgets": [
32+
{
33+
"type": "anyComponentStyle",
34+
"maximumWarning": "6kb"
35+
}
36+
],
3037
"optimization": true,
3138
"outputHashing": "all",
3239
"sourceMap": false,
@@ -122,10 +129,13 @@
122129
"defaultProject": "angular-testing-course",
123130
"schematics": {
124131
"@schematics/angular:component": {
125-
"styleext": "scss"
132+
"style": "scss"
126133
},
127134
"@schematics/angular:directive": {
128135
"prefix": ""
129136
}
137+
},
138+
"cli": {
139+
"analytics": "6dd2fc52-134c-41a4-bd54-89b160f1c524"
130140
}
131-
}
141+
}

server/server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ app.route('/api/lessons').get(searchLessons);
2222
app.route('/api/courses/:id').put(saveCourse);
2323

2424

25-
const httpServer = app.listen(9000, () => {
25+
const httpServer:any = app.listen(9000, () => {
2626
console.log("HTTP REST API Server running at http://localhost:" + httpServer.address().port);
2727
});
2828

src/app/courses/home/home.component.spec.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ describe('HomeComponent', () => {
113113

114114
flush();
115115

116-
const cardTitles = el.queryAll(By.css('.mat-card-title'));
116+
const cardTitles = el.queryAll(By.css('.mat-tab-body-active .mat-card-title'));
117+
118+
console.log(cardTitles);
117119

118120
expect(cardTitles.length).toBeGreaterThan(0,"Could not find card titles");
119121

@@ -138,7 +140,7 @@ describe('HomeComponent', () => {
138140

139141
console.log("called whenStable() ");
140142

141-
const cardTitles = el.queryAll(By.css('.mat-card-title'));
143+
const cardTitles = el.queryAll(By.css('.mat-tab-body-active .mat-card-title'));
142144

143145
expect(cardTitles.length).toBeGreaterThan(0,"Could not find card titles");
144146

src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
44
import { AppModule } from './app/app.module';
55
import { environment } from './environments/environment';
66

7-
import 'hammerjs';
8-
97
if (environment.production) {
108
enableProdMode();
119
}

src/tsconfig.app.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
"baseUrl": "./",
66
"types": []
77
},
8-
"exclude": [
9-
"test.ts",
10-
"**/*.spec.ts"
8+
"files": [
9+
"main.ts",
10+
"polyfills.ts"
11+
],
12+
"include": [
13+
"src/**/*.d.ts"
1114
]
1215
}

0 commit comments

Comments
 (0)