components icon indicating copy to clipboard operation
components copied to clipboard

Problems with toogle Angular Material --> sidenav

Open taaaniel opened this issue 9 years ago • 4 comments

I've a problem with sidenav, with the property "toogle" of md-sidenav

I've this code:

<md-sidenav-container class="example-container">
  <md-sidenav #sidenav class="example-sidenav">
    Jolly good!
  </md-sidenav>

  <div class="example-sidenav-content">
    <button type="button" md-button (click)="sidenav.toggle()">
      Open sidenav
    </button>
  </div>
</md-sidenav-container>

When I click to button with "toogle" function, sidenav doesn;t work, and my console is write:

AppComponent.html:7 ERROR TypeError: jit_nodeValue_8(...).toggle is not a function at Object.eval [as handleEvent] (AppComponent.html:7) at handleEvent (core.es5.js:12004) at callWithDebugContext (core.es5.js:13465) at Object.debugHandleEvent [as handleEvent] (core.es5.js:13053) at dispatchEvent (core.es5.js:8602) at core.es5.js:9213 at HTMLButtonElement. (platform-browser.es5.js:2651) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424) at Object.onInvokeTask (core.es5.js:3881) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)

this is my package.json

{
  "name": "food-calc",
  "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.3.5",
    "@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/material": "^2.0.0-beta.8",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.2.1",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/language-service": "^4.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@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",
    "protractor": "~5.1.2",
    "ts-node": "~3.0.4",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }
}

taaaniel avatar Aug 21 '17 17:08 taaaniel

Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.

jelbourn avatar Aug 21 '17 18:08 jelbourn

I do have the same issue when I click on the snack bar in my Angular 4 app. How to clear those console errors?

narayanansznod avatar Aug 30 '17 13:08 narayanansznod

I have the same issue, is there a bug created for this? if so any time line or status?

ilnreddy avatar Nov 16 '17 02:11 ilnreddy

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.