Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng2 RC.6: Error: Only selectors matching element names are supported #13

Closed
christopherthielen opened this issue Sep 9, 2016 · 1 comment
Labels
Milestone

Comments

@christopherthielen
Copy link
Member

christopherthielen commented Sep 9, 2016

RC.6 won't import UIRouterLibraryModule into the ngUpgrade bootstrap.
ui-view isn't being downgraded/upgraded, but this error still occurs.

See the ng2 RC.6 issue angular/angular#11280 and the earlier issue explaining the intent of this error message: angular/angular#7026

@UIRouterModule({
  imports: [BrowserModule, Ng1ToNg2Module],
  providers: [
    { provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader }
  ]
}) class SampleAppModule {}

export const upgradeAdapter = new UpgradeAdapter(SampleAppModule);
uiRouterNgUpgrade.setUpgradeAdapter(upgradeAdapter);
upgradeAdapter.bootstrap(document.body, ['demo']);
Error: Only selectors matching element names are supported, got: ui-view, [ui-view](…) "Error: Only selectors matching element names are supported, got: ui-view, [ui-view]
    at getComponentInfo (http://localhost:8000/node_modules/@angular/upgrade/bundles/upgrade.umd.js:234:19)
    at eval (http://localhost:8000/node_modules/@angular/upgrade/bundles/upgrade.umd.js:962:60)
    at Array.forEach (native)
    at eval (http://localhost:8000/node_modules/@angular/upgrade/bundles/upgrade.umd.js:961:52)
    at eval (http://localhost:8000/node_modules/@angular/core/bundles/core.umd.js:9484:21)
    at ZoneDelegate.invoke (http://localhost:8000/node_modules/zone.js/dist/zone.js:332:29)
    at Object.onInvoke (http://localhost:8000/node_modules/@angular/core/bundles/core.umd.js:8772:45)
    at ZoneDelegate.invoke (http://localhost:8000/node_modules/zone.js/dist/zone.js:331:35)
    at Zone.run (http://localhost:8000/node_modules/zone.js/dist/zone.js:225:44)
    at http://localhost:8000/node_modules/zone.js/dist/zone.js:591:58"
@christopherthielen
Copy link
Member Author

Fixed by 2e6c4f7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant