Skip to content

Conversation

chrisguttandin
Copy link
Contributor

I noticed that when creating a project with the minimal flag like this npx @angular/cli new my-demo --minimal true it will create an app.component.ts with inline styles and inline templates. However when creating another component with ng generate component another-component it will have an external template and external styles.

This pull request tries to fix this inconsistency by setting the inlineTemplate and inlineStyle options when creating a minimal project to make sure all generated components will have inlined styles and templates.

Please let me know if there is anything that needs to be changed.

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Kindly see above comments.

Also, commit message scope should be @schematics/angular instead of @angular/cli.

@chrisguttandin
Copy link
Contributor Author

Hi @alan-agius4, thanks for reviewing this. I addressed your feedback. Should I also add a test?

@chrisguttandin
Copy link
Contributor Author

Sorry, I @alan-agius4, I overlooked your first comment in which you asked me to add a test. Can you please point me at an example test which tests a similar thing?

@alan-agius4
Copy link
Collaborator

@chrisguttandin, Yes please add a test. You can use this

it('minimal=true should not create e2e, lint and test targets', async () => {
as an example

@chrisguttandin
Copy link
Contributor Author

Thanks for the pointer. I added a test. Please let me know if there is anything else that needs to be changed.

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

LGTM.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Feb 18, 2020
@kyliau kyliau merged commit cd48223 into angular:master Feb 18, 2020
@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 Mar 20, 2020
clydin added a commit to clydin/angular-cli that referenced this pull request 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#16988
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants