Skip to content
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

inlineStyle and inlineTemplate should have precedence when used with minimal #17528

Closed
1 of 15 tasks
EatonZ opened this issue Apr 22, 2020 · 5 comments · Fixed by #19101
Closed
1 of 15 tasks

inlineStyle and inlineTemplate should have precedence when used with minimal #17528

EatonZ opened this issue Apr 22, 2020 · 5 comments · Fixed by #19101
Labels
area: schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix
Milestone

Comments

@EatonZ
Copy link
Contributor

EatonZ commented Apr 22, 2020

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

PR #16988 has changed project generation in a way that prevents external styles and templates from being generated when using the minimal flag with ng new.

Describe the solution you'd like

If you prefer this behavior by default, that is fine, but can you please make it so that when inlineStyle=true and inlineTemplate=true with minimal=true, it will actually generate the external files? Right now, those settings are ignored when used with minimal, and I don't believe they should be.

Describe alternatives you've considered

I just regenerate the app component once the project has spun up (after removing inlineTemplate and inlineStyle from angular.json). That sets everything up the way I want, but it's still an extra step I'd like to avoid.

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Apr 22, 2020

Hi,

The mentioned PR aligned components generated after the initial app scaffolding to always be inlined, as minimal always generated the app component with inline templates and styles.

Possible we can remove the “feature” to auto inline styles and templates when using ‘minimal`.

That said, it’s important to point that minimal projects are considered to be “throw away” and only used for quick testing and prototyping.

//cc @clydin, @filipesilva thoughts?

@EatonZ
Copy link
Contributor Author

EatonZ commented Apr 22, 2020

Hi @alan-agius4, it didn't always do that. I have an older project from the version 7 days where inline styles & templates were not forced with minimal. I could be mistaken, though.

I have reviewed several issues where you have brought up those points about minimal. The issues appear to be around linting and testing. Are there any other notable issues that could surface when using minimal?

@alan-agius4
Copy link
Collaborator

I have reviewed several issues where you have brought up those points about minimal. The issues appear to be around linting and testing. Are there any other notable issues that could surface when using minimal?

Yes, in most cases the effected areas are linting and testing, but there might also be broken journeys such as incorrect/extra files being generated when using other schematics such as generating a library.

@EatonZ
Copy link
Contributor Author

EatonZ commented Apr 23, 2020

@alan-agius4 Thanks for clarifying. I'll limit my time with these project types.
Still, I think my suggestion makes sense and should be implemented.

@ngbot ngbot bot added this to the needsTriage milestone Apr 23, 2020
@clydin clydin added freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix labels May 29, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog May 29, 2020
clydin added a commit to clydin/angular-cli that referenced this issue Oct 16, 2020
…al application

This change allows `inlineTemplate=false` and/or `inlineStyle=false` to be used with the `minimal` option when creating an application either by `ng new` or `ng generate application`.

Closes angular#17528
alan-agius4 pushed a commit that referenced this issue Oct 17, 2020
…al application

This change allows `inlineTemplate=false` and/or `inlineStyle=false` to be used with the `minimal` option when creating an application either by `ng new` or `ng generate application`.

Closes #17528
alan-agius4 pushed a commit that referenced this issue Oct 17, 2020
…al application

This change allows `inlineTemplate=false` and/or `inlineStyle=false` to be used with the `minimal` option when creating an application either by `ng new` or `ng generate application`.

Closes #17528

(cherry picked from commit af1d49d)
@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 Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix
Projects
None yet
3 participants