Skip to content

Include VERSION.full in initial scaffolding of app #7103

Closed
@fmorriso

Description

@fmorriso

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}`;
}

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