Is there a way to pass arguments rendered on the backend to angular2 bootstrap method? I want to set http header for all requests using BaseRequestOptions with value provided from the backend. My main.ts
file looks like this:
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from ./app.component.ts;
bootstrap(AppComponent);
I found how to pass this arguments to root component (https://stackoverflow.com/a/35553650/3455681), but i need it when I'm fireing bootstrap
method... Any ideas?
edit:
webpack.config.js content:
module.exports = {
entry: {
app: ./Scripts/app/main.ts
},
output: {
filename: ./Scripts/build/[name].js
},
resolve: {
extensions: [, .ts, .js]
},
module: {
loaders: [
{
test: /.ts$/,
loader: 'ts-loader'
}
]
}
};