components icon indicating copy to clipboard operation
components copied to clipboard

Error with styles when saving a file

Open briancaldas93 opened this issue 7 years ago • 3 comments

Reproduction

I have an angular 8 project with the installation of angular material as indicated in the documentation, but at the time of running my project I have an error with the styles, since everything works fine until I save a ts or html or scss file when the angular reloads the page the material style is lost

Steps to reproduce:

  1. As you can see when I execute the ng serve command it works fine image

  2. When I make a change to a file and save either ts or html or scss the styles are lost and I have to stop the ng serve command to make it work again, some help

image

My package.json

{ "name": "motor", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "~8.2.12", "@angular/cdk": "~8.2.3", "@angular/common": "~8.2.12", "@angular/compiler": "~8.2.12", "@angular/core": "~8.2.12", "@angular/forms": "~8.2.12", "@angular/material": "^8.2.3", "@angular/platform-browser": "~8.2.12", "@angular/platform-browser-dynamic": "~8.2.12", "@angular/router": "~8.2.12", "bootstrap": "^4.3.1", "hammerjs": "^2.0.8", "rxjs": "~6.4.0", "tslib": "^1.10.0", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/build-angular": "~0.803.15", "@angular/cli": "~8.3.15", "@angular/compiler-cli": "~8.2.12", "@angular/language-service": "~8.2.12", "@types/node": "~8.9.4", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "codelyzer": "^5.0.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.15.0", "typescript": "~3.5.3" } }

briancaldas93 avatar Oct 30 '19 15:10 briancaldas93

You're probably not pulling the theme into any global scss file where are you setting the theme?

sollenne avatar Oct 30 '19 20:10 sollenne

This would be caused by not having a theme loaded into your app.

jelbourn avatar Oct 31 '19 17:10 jelbourn

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.