sherweb / ngx-materialize

Angular wrap around Materialize library
https://sherweb.github.io/ngx-materialize/
Apache License 2.0
315 stars 75 forks source link

The console is throwing a error when i add Tab class #142

Closed CarlosAyala closed 7 years ago

CarlosAyala commented 7 years ago

Hi. I have a project with angular4, and when I add the class Tab the browser console throw the error:

zone.js:195 Uncaught TypeError: Cannot read property 'left' of undefined
    at calcRightPos (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:1437:53)
    at eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:1502:36)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424)
    at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:191)
    at ZoneTask.invoke (zone.js:486)
    at timer (zone.js:1540)

The code

<div class="row">
    <div class="col s12">
        <ul class="tabs">
            <li *ngFor="let category of categories" class="tab"><a routerLink="/collection/{{category.se_name}}">{{category.name}}</a></li>
        </ul>
    </div>
</div>

My package.json

{
  "name": "calendar-club",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.0.0",
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "core-js": "^2.4.1",
    "mdi": "^1.9.33",
    "ng2-materialize": "^1.4.2",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.1.2",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/language-service": "^4.0.0",
    "@types/jasmine": "2.5.45",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "node-sass": "^4.5.3",
    "protractor": "~5.1.2",
    "ts-node": "~3.0.4",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }
}
jfcere commented 7 years ago

Hi @CarlosAyala,

We haven't wrapped the tab component yet, this might be related to Materialize CSS library.

Am I missing something?

jfcere commented 7 years ago

Closing the issue as this is not related to our library.

Feel free to reopen if there is anything!