I have to use the scss defined elsewhere, to be used inside my @Injectable class
import { Injectable } from '@angular/core';
const customThemeRed = require('../../common/styles/custom/themes/custom-theme-red.scss');
@Injectable()
export class MyThemesService {
constructor() {
console.log('customThemeRed is' + customThemeRed);
}
...
For some reason, am not able to use this scss even though I imported via NodeJS 'require' var. May I know how to import an external JS/SCSS file
constants.tsfile. Return the custom styles as objects:custom_theme_red = { background: 'red' }..You can apply them in your components referencing the NativeElement insideElementRef