Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 8, Angular Flex Layout: this._delegate.setClass is not a function

Updating to Angular 8, all my code that uses angular flex and has ngClass is broken:

<div class="pages-container"
       [ngClass.lt-md]="{'mobile-no-padding': true}">
    <router-outlet></router-outlet>
  </div>

returns an error upon rendering: ERROR TypeError: this._delegate.setClass is not a function

Was only able to resolve this by removing the dynamic responsive suffix ([ngClass]="{'mobile-no-padding': true}) but that's a big stepback...

like image 966
ForestG Avatar asked May 29 '19 07:05

ForestG


2 Answers

I had the same issue with ngClass after the update to angular version 8. After updating @angular/flex-layout to version ^8.0.0-beta.26 the issue was gone.

like image 177
ElementSTI Avatar answered Nov 08 '22 17:11

ElementSTI


Maybe if you reinstall your flex layout this'll get fixed

npm i @angular/flex-layout --save

like image 2
Ehsan Kiani Avatar answered Nov 08 '22 19:11

Ehsan Kiani