Skip to content

Number at beginning of component name is invalid #3177

Closed

Description

@mischkl

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Windows 7

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.19-3
node: 6.9.1
os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

The app was created with ng-cli. To reproduce:

ng g component 404

The log given by the failure.

Normally this include a stack trace and some more information.

Fails to compile because class name "404Component" is invalid.

Mention any other details that might be useful.

Perhaps in special cases like this an underscore could be prefixed or something similar. Alternatively it could simply be disallowed to start component (or service, etc) names with numbers.


Thanks! We'll be in touch soon.

Activity

  1. filipesilva commented on Nov 22, 2016

    @filipesilva
    Contributor

    This is by design, as custom components should follow this naming scheme: http://stackoverflow.com/questions/30258630/what-are-valid-html5-custom-tags/30260358#30260358

  2. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  3. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions