CleanCrispCode CleanCrispCode - 3 months ago 165
TypeScript Question

Angular2 "no exported member bootstrap" error

My atom editor shows


Module '"C:/express4/node_modules/@angular/platform-browser-dynamic/index"' has
no exported member 'bootstrap'.at line 2 col 10


for below import in typescript file.

import { bootstrap } from '@angular/platform-browser-dynamic';


Any idea what could be the reason ?

Answer

Assuming you are on Angular RC6/RC5, you can try below code:

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);
Comments