I have the following line of code inside main.ts:
platform.bootstrapModule(AppModule);
And in call stack it's shown as 3 calls like this:

Why?
Yes, indeed, here is the JS code
(function (System, SystemJS) {
(function (require, exports, module, __filename, __dirname, global, GLOBAL) {
"use strict";
var platform_browser_dynamic_1 = require("@angular/platform-browser-dynamic");
var app_module_1 = require("./app.module");
var platform = platform_browser_dynamic_1.platformBrowserDynamic();
platform.bootstrapModule(app_module_1.AppModule);
//# sourceMappingURL=main.js.map
}).apply(__cjsWrapper.exports, __cjsWrapper.args);
})(System, System);
that is mapped to
platform.bootstrapModule(AppModule);
and indeed there are 3 function calls before bootstrapModule is called:
outer IIFE, inner IIFE, and platform.bootstrapModule(app_module_1.AppModule);.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With