Skip to content

remove code from app component #516

Closed
@johnpapa

Description

@johnpapa

SUGGESTION i think we should remove this from the main app component too

  defaultMeaning: number = 42;

  meaningOfLife(meaning?: number) {
    return `The meaning of life is ${meaning || this.defaultMeaning}`;
  }

HANS - Agreed, but an empty file is unwelcoming. What would you suggest for a replacement? IMO a bad joke is better than an empty class. Maybe a comment instead? /** HERE BE DRAGON^H^H^H^H^H^H CODE */ :shrug:

PAPA - honestly … none of my apps have any code in the app.component.ts. The point of this component is the providers, routing, and the base template for the layout. I’m looking to see what would make sense in there … yes … I love the --tutorial idea you keep bringing up

MIKE - having that there to ensure that our tests run successfully does add some value for us… but I can see devs not wanting it, but down the road I would LOVE to add an option like --tutorial where they can get some sample code added (with tests)

HANS - --tutorial would be nice. App blueprints could be empty, but it would be nice when ng g component to have some code in it.

PAPA - for now, I’d remove it.

cc @hansl @Brocco

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