angular-realworld-example-app
angular-realworld-example-app copied to clipboard
Feat(Global): upgrade Angular8
- Feat(Global): upgrade to angular8
- Feat(CI): upgrade to NodeJs 10.15.0 (LTS)
EDIT: Using signed commits
@owenmecham @juristr can you please check this PR?
Hey, sorry but won't make it this week. Too much scheduled already. @joeeames can u review it?
Can we also upgrade quide old content of the angular-realworld-example-app/src/test.ts
to current test template?
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
If there would be tests, it would work OK. Thanks!
Also, could the main.ts
- as part of upgrade, be aligned with default template?
diff --git a/src/main.ts b/src/main.ts
index dd072d0..ba6abde 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -8,8 +8,6 @@ if (environment.production) {
enableProdMode();
}
-const bootstrapPromise = platformBrowserDynamic().bootstrapModule(AppModule);
-
-// Logging bootstrap information
-bootstrapPromise.then(success => console.log(`Bootstrap success`))
+platformBrowserDynamic().bootstrapModule(AppModule)
+ .then(success => console.log(`Bootstrap success`))
.catch(err => console.error(err));
LGTM :shipit:
Also, could the
main.ts
- as part of upgrade, be aligned with default template?diff --git a/src/main.ts b/src/main.ts index dd072d0..ba6abde 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,8 +8,6 @@ if (environment.production) { enableProdMode(); } -const bootstrapPromise = platformBrowserDynamic().bootstrapModule(AppModule); - -// Logging bootstrap information -bootstrapPromise.then(success => console.log(`Bootstrap success`)) +platformBrowserDynamic().bootstrapModule(AppModule) + .then(success => console.log(`Bootstrap success`)) .catch(err => console.error(err));
That's pretty much the same we actually have. I do prefer the old one because we actually create a promise variable called bootstrapPromise & consequently gives more sense.
PS: this is also implemented in https://github.com/gothinkster/angular-realworld-example-app/pull/145
Triaging pull requests after some years of no maintainers on this project. Closing this one as the project has been updated to Angular v11 meanwhile.