In Angular 4/5, is there a way that component based will be generated to a file instead of style tag.
@Component({
templateUrl: 'login.component.html',
styleUrls: ['../../assets/css/auth.scss'],
encapsulation: ViewEncapsulation.None,
providers: [AuthenticationService]
})
Only files under angular-cli.json styles were generated to a file.
"prefix": "app",
"styles": [
"../src/assets/css/bootstrap.min.scss",
"../src/assets/fonts/fontface.min.scss",
"../node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"app/chronos/assets/css/main.scss"
]
Here is what I am using:
- "@angular/compiler": "^5.0.1"
- "@angular/compiler-cli": "^5.0.1"
- "@angular/core": "^5.0.1"
- "@angular/forms": "^5.0.1"