Angular CLI version 9 (used to create Angular 9 projects) now picks up style
from schematics instead of styleext
. Use the command like this:
ng config schematics.@schematics/angular:component.style scss
and the resulting angular.json shall look like this
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
}
Other possible solutions & explanations:
To create a new project with angular CLI with sass support, try this:
ng new My_New_Project --style=scss
You can also use --style=sass
& if you don't know the difference, read this short & easy article and if you still don't know, just go with scss
& keep learning.
If you have an angular 5 project, use this command to update the config for your project.
ng set defaults.styleExt scss
For Latest Versions
For Angular 6 to set new style on existing project with CLI:
ng config schematics.@schematics/angular:component.styleext scss
Or Directly into angular.json:
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
}
just dealt with the same exact situation
what you need to do is
- go to Advanced DNS Zone Editor in cpanel
- select the domain
- name : *.doaminname.com
- TTL : 14400
- Type: CNAME
- Address : domainname.com/path
- So, it would be like: *.doaminname.com CNAME 14400 domainname.com/path
and then a little tweak in .htaccess
# Extract the subdomain part of domain.com
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domainname\.com$ [NC]
# Check that the subdomain part is not www and ftp and mail
RewriteCond %1 !^(www|ftp|mail)$ [NC]
# Redirect all requests to a php script passing as argument the subdomain
RewriteRule ^.*$ http://www.domainname.com/path/%1 [R,L]
here %1 is the subdomain bit.
hope, this helps some body other lost in this case. thanks.
Best Answer
destroy
or something similar may come to the CLI, but it is not a primary focus at this time. So you will need to do this manually.Delete the component directory (assuming you didn't use
--flat
) and then remove it from theNgModule
in which it is declared.If you are unsure of what to do, I suggest you have a "clean" app meaning no current
git
changes. Then generate a component and see what is changed in the repo so you can backtrack from there what you will need to do to delete a component.Update
If you're just experimenting about what you want to generate, you can use the
--dry-run
flag to not produce any files on disk, just see the updated file list.