Skip to content

Include VERSION.full in initial scaffolding of app #7103

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

Closed
fmorriso opened this issue Jul 23, 2017 · 6 comments
Closed

Include VERSION.full in initial scaffolding of app #7103

fmorriso opened this issue Jul 23, 2017 · 6 comments

Comments

@fmorriso
Copy link

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request

Versions.

Output from: `ng --version`.
@angular/cli: 1.2.3
node: 8.1.2
os: win32 x64

Repro steps.

ng new example --style=scss

Note The --style is not germaine to the specifics of this feature request. It is only an example.

The log given by the failure.

Desired functionality.

  1. Include VERSION in the default set of imports when creating a new application.
  2. Include VERSION.full in the title property via string interpolation.

Benefits

Immediately shows which version of Angular the app is using when the first ng serve --open is performed.

Mention any other details that might be useful.

Example of desired default app.component.ts

import { Component, VERSION } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  title = `app using Angular ${VERSION.full}`;
}
@filipesilva
Copy link
Contributor

I don't think it's very helpful to have this added. The Angular version doesn't make a difference overall really, and all that text is getting removed in the first 5 minutes of the app being created.

@fmorriso
Copy link
Author

fmorriso commented Jul 28, 2017

Agree it will be removed once the app "becomes real". I was hoping to have it included in the "initial scaffolding" to let the "newbies" understand two things:

  1. What version of Angular was actually running the newly scaffolded app.
  2. There is a difference between Angular-CLI and Angular.

It's no different than all the current set of links that get scafolded into app.component.html, which I hope you'll agree are also one of the "first things to go" once the app "becomes real".

At least I tried. Thanks for listening.

@filipesilva
Copy link
Contributor

Completely agree, all the stuff in that app template meant to be deleted ASAP. I just don't think there's anything that is actionable/would change in user behaviour by having the version information. Overall I haven't seen a lot of confusion about CLI and Angular versions myself.

There's also another factor that I didn't mention: there is an overall effort to de-emphasize versions, and to encourage users to update frequently. It shouldn't matter much to a user whether it's Angular v2 or Angular v4, which is at the source of the It's just Angular you might have heard in some talks. So in that sense highlighting the current version is detrimental to that effort.

@fmorriso
Copy link
Author

fmorriso commented Jul 31, 2017

On the one hand, I see your point about encouraging frequent updates, but in the real world, it's best to reduce the potential chaos by limiting updates of "the tools" to 3-4 times per year for a production application.

Throw in the recent major overhaul of Http (HttpClient in particular) in version 4.3+ and I can almost make the case for knowing which version of Angular is running in order to understand if replacing the way the application deals with HTTP requests with the post-4.3 HttpClient plus Interceptors technique is worth it or not.

Meanwhile, I'll agree that it's my responsibility to get the desired initial scaffolding to look-and-feel the way I want via a post-ng-new PowerShell script that augments the initial scaffolding of app.component.ts with the display of VERSION.full.

@filipesilva
Copy link
Contributor

Actually, as far as getting personalized scaffolding goes, we should get #7090 in soon which should allow you to get custom blueprints.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants