mdbootstrap / mdb-angular-ui-kit

Angular 18 & Bootstrap 5 & Material Design UI KIT
https://mdbootstrap.com/docs/angular/
Other
1.12k stars 282 forks source link

ERROR DOMException #89

Closed vivek1996 closed 6 years ago

vivek1996 commented 6 years ago

Expected behavior

Actual behavior

Produces Error : ERROR DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty.

Your working environment and MDB version information

Angular : 6.1.0 Mdbootstrap : 6.2.1

Resources (screenshots, code snippets etc.)

`

  <div class="avatar mx-auto" >
    <img [src]="profile.picture" class="rounded-circle" style="max-height: 9rem">
  </div>
  <mdb-card-body>
    <mdb-card-title>
      <h4 *ngIf="profile"> {{profile.name}} </h4>
      <p class=" text-muted" *ngIf="user">( {{user.login}} )</p>
      <p class="lead text-secondary" *ngIf="user">{{user.bio}}</p>
    </mdb-card-title>
    <hr>
    <div *ngIf="user">
      <p *ngIf="user.company !== null">
        <i class="fa fa-building-o mr-2" aria-hidden="true"></i> Company : {{user.company}} </p>
      <p *ngIf="user.blog !== null">
        <i class="fa fa-internet-explorer mr-2" aria-hidden="true"></i>Blog : {{user.blog}} </p>
      <p *ngIf="user.location !== null">
        <i class="fa fa-globe mr-2" aria-hidden="true"></i> {{user.location}} </p>
    </div>
  </mdb-card-body>
</mdb-card>`

Error Produced in console:

ProfileComponent.html:3 ERROR DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty. at DefaultDomRenderer2.push../node_modules/@angular/platform-browser/fesm5/platform-browser.js.DefaultDomRenderer2.addClass (http://localhost:4200/vendor.js:59085:81) at DebugRenderer2.push../node_modules/@angular/core/fesm5/core.js.DebugRenderer2.addClass (http://localhost:4200/vendor.js:44533:23) at http://localhost:4200/vendor.js:75147:26 at Array.forEach (<anonymous>) at MdbCardComponent.push../node_modules/angular-bootstrap-md/esm5/angular-bootstrap-md.es5.js.MdbCardComponent.ngOnInit (http://localhost:4200/vendor.js:75146:35) at checkAndUpdateDirectiveInline (http://localhost:4200/vendor.js:42299:19) at checkAndUpdateNodeInline (http://localhost:4200/vendor.js:43563:20) at checkAndUpdateNode (http://localhost:4200/vendor.js:43525:16) at debugCheckAndUpdateNode (http://localhost:4200/vendor.js:44158:38) at debugCheckDirectivesFn (http://localhost:4200/vendor.js:44118:13) For every question of technical nature, in order to get the most detailed answer as soon as possible, ask on our dedicated Support Forum

Bloodcast69 commented 6 years ago

@vivek1996 I'm unable to reproduce your problem. Could you please provide me reproduction steps?

vivek1996 commented 6 years ago

I have just used code in my angular project

Bloodcast69 commented 6 years ago

As I said before, I'm unable to reproduce your case. Please provide me with the description of your environment settings (OS, Browser, Node version) and other stuff which will help me to debug your case.