+
Skip to content

Add error message when xx.page.ts does not have a default export #1129

@alexciesielski

Description

@alexciesielski

Which scope/s are relevant/related to the feature request?

router

Information

I pulled my hair out trying to figure out why my routing does not work. Turns out the component needs to be a default export.

There are two improvements that could be made here:

  1. Make that requirement more visible in the documentation, right now it's not immediately visible when skimming the docs. I would make it a bigger "alert" with maybe a yellow background.
  2. Add a check and error message before resolving the routes, instead of propagating the default Angular error that a component needs to be provided in the Route definition.

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • Yes, if pointed in the right direction
  • No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载