Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 the below import in a TypeScript file:

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

Any idea what could be the reason for this warning?

like image 345
refactor Avatar asked Sep 04 '16 07:09

refactor


1 Answers

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);
like image 158
Godfather Avatar answered Sep 26 '22 12:09

Godfather