ngClass changes incorrectly when printing
See original GitHub issueBug Report
On elements with ngClass, the media observers misbehave when printing. For example, if I have…
<p class="text-left" ngClass.lt-sm="text-center">Some text here</p>
…When I press Ctrl + P to print the page, then return, the text is centered (even though the screen size is still 1920px).
What is the expected behavior?
ngClass.lt-sm should be removed when printing is complete
What is the current behavior?
ngClass.lt-sm remains applied
What are the steps to reproduce?
What is the use-case or motivation for changing an existing behavior?
The screen looks incorrect when printing completes
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
I have tested in the latest Angular 8 and 9 releases with FlexLayout 8.0.0-beta.27 and 9.0.0-beta.29 respectively.
Is there anything else we should know?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:22 (3 by maintainers)
Top Results From Across the Web
Angular ngClass is not updating my classes even though my ...
A workaround of mine is to manipulate a model variable just for the ng-class toggling: 1) Whenever my list is empty, I update...
Read more >Angular NgFor: Everything you need to know - malcoded
Angular NgFor: Everything you need to know. In this tutorial, we are going to learn about the ngFor directive.
Read more >Custom Form Validators • Angular - codecraft.tv
A validator in Angular is a function which returns null if a control is valid or an error object if it's invalid. For...
Read more >Using ngClass for selected value for a background color change
I want to change the background color of value selected. I have tried it using ng class and ngmodel but is not working...
Read more >Angular ngClass and ngStyle: The Complete Guide
For these type of state styles natively supported by the browser, it's better to use the CSS pseudo classes whenever possible. So for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My little dirty hack until this gets resolved…
CommonMaterialModule is my only module that imports (and re-exports) FlexLayoutModule.
I’m using
"@angular/flex-layout": "^10.0.0-beta.32"
and the problem is still exists in todays.