1

I'm using Angular 2. I want to use different themes color from Angular Material. In particular, I want to use a different theme for each slide I have. But where can I change them?

3
  • You have create seperate css files that Commented Feb 8, 2017 at 15:20
  • And import theme.css file inside the css file Commented Feb 8, 2017 at 15:20
  • Yes I created 5 different file scss with my themes and I imported them in my angular-cli.json. But then I have only the last theme that I imported. Commented Feb 8, 2017 at 15:29

1 Answer 1

1

Just write styleUrl with css/scss file path (Do this for all component you have in your project) like this :-

   import { Component, OnInit } from '@angular/core';
    import { FormGroup, FormControl, Validators, FormBuilder } from '@angular/forms';
    import { AuthenticationService } from '../services/authentication.service';
    import { Router } from "@angular/router";
    import { User } from '../Models/User.interface';

    @Component({
        templateUrl: '/Html/Account/Login.html',
        styleUrls: ['../Content/AppStyles/login.css']
    })

    export class LoginComponent  {

    }
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.