Skip to content

Add flag to remove boilerplate HTML in the app.component.html #6653

Closed
@johnpapa

Description

@johnpapa
Contributor

Bug Report or Feature Request (mark with an x)

[ x ] feature request

Versions.

@angular/cli: 1.1.1
node: 8.0.0
os: darwin x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.1.1
@angular/compiler-cli: 4.1.3
@angular/language-service: 4.1.3

Repro steps.

ng new foo

Desired functionality.

I like that the new CLI behavior adds some links for new users in the app.component.html. However, once a user has more experience with the CLI it would be helpful to be able to set a global setting to disable this for all future projects (or one off projects).

I propose a flag --welcome that defaults to true. When set to false this trims down the app.component.html to a minimal amount (possibly the <h3> and <router-outlet> for routing apps).

Then ng set defaults.welcome false and ng set defaults.welcome false --global could be used to disable it for more experienced user of the CLI.

Maybe this is something a community member to contribute, if the CLI team is open to it.

It's not a huge issue, but I still think it is worth it given the importance of not creating code that is not needed (see the new proposed --minimal flag).

Activity

gioragutt

gioragutt commented on Jun 12, 2017

@gioragutt
Contributor

So basically, when the flag is turned on, the logo and the useful links appear, otherwise there will only be the Welcome to {{title}} and the <router-outlet></router-outlet>, as it was before the change.

I've myself seen the code of --minimal, and my entire contribution so far is to new mostly, so I wouldn't mind implementing it if the change is accepted.

deebloo

deebloo commented on Jun 13, 2017

@deebloo
Contributor

The boiler plate makes sense when a new user first starts poking around so makes sense to be the default but having an option to imediatly not having to delete code after project creation is nice

self-assigned this
on Jun 14, 2017
added
P5The team acknowledges the request but does not plan to address it, it remains open for discussion
on Jun 14, 2017
added this to the needsTriage milestone on Jan 2, 2019
modified the milestones: needsTriage, Backlog on Mar 13, 2019
removed
P5The team acknowledges the request but does not plan to address it, it remains open for discussion
on Oct 1, 2019
alan-agius4

alan-agius4 commented on May 26, 2021

@alan-agius4
Collaborator

Closing since there was little to no interest from the community around this feature request in almost 4 years.

angular-automatic-lock-bot

angular-automatic-lock-bot commented on Jun 26, 2021

@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.

locked and limited conversation to collaborators on Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @johnpapa@Brocco@filipesilva@deebloo@gioragutt

        Issue actions

          Add flag to remove boilerplate HTML in the app.component.html · Issue #6653 · angular/angular-cli