angular - Error when bootstrapping multiple angular2 modules -


we beginning convert our current application angular2 update parts of application. attempting replace parts of app angular2 modules/components. first part creating 2 different search components , placing them in different views in asp.net mvc. not start scratch , build entire angular2 app problem. have been able create 2 separate modules , place components on different pages , render , work properly, however, generate error below:

core.umd.js:3370 exception: error in http://localhost:25219/angular2/app/member-search/member-search.component.js class membersearchcomponent_host - inline template:0:0 caused by: selector "member-search-component" did not match elements

main.ts

import { platformbrowserdynamic } '@angular/platform-browser-dynamic'; import { membersearchmodule } './member-search/member-search.module'; import { providersearchmodule } './provider-search/provider-search.module';  const platform = platformbrowserdynamic();  platform.bootstrapmodule(membersearchmodule); platform.bootstrapmodule(providersearchmodule); 

when going page other component exact same error opposite component. looking both components on each page , since can find 1 throws error other. components work , errors not make front end, console gets spammed 8 separate error each time move 1 of these pages. ideas on how can corrected? i've searched on , haven't found relevant.

thanks

edit: think have found way making each module own app. there better option this? converting more sections in coming months , creating separate app each 1 isn't want do.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -