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"
}
}
For your situation, I would do things a little differently.
I would create a seperate project for your Data Access Layer. I would also move business logic into a Business Logic Layer.
You could then share both your DAL and BLL between the ASP.NET MVC site (your Models would be a Facade to the BLL objects) and your WCF Services thus centralizing all of your logic into a central location.
Best Answer
As suggested by @Yuri, I was able to solve this by using
npm
scripting.git.version.ts
in the root of the angular-cli project:package.json
:Use the generated
src/environments/versions.ts
in the application.UPDATE 10/2018: Here is the more-readable version of the script, rxjs-version-agnostic:
Note, when using angular-cli v7.0.6, I also had to change script invocation in the
package.json
: