Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SideNav cannot hide after reattach , show error after click content #616

Closed
davidrensh opened this issue Jun 2, 2016 · 2 comments
Closed

Comments

@davidrensh
Copy link

SideNav cannot hide after reattach , show error after click content

It should be hided, click grayed area, it should show screen and hide side nav bar
It's not hided, click grayed content area, it shows content, but it gives error on console

<md-sidenav-layout>
  <md-sidenav #start mode="over" (click)="start.open()">
    <a [routerLink]="['./login']" md-button color="primary" (click)="start.close()">Login</a>
  </md-sidenav>
  <div [ngStyle]="{'height': '1200px' }">
    <router-outlet></router-outlet>
    <div>
      <header>Sidenav</header>
      <button md-button (click)="start.toggle()">Toggle Start Side Drawer</button>
    </div>
  </div>
</md-sidenav-layout>
////////////
  ngAfterViewInit() {
    //ss: MdSidenav = this.start;
    //this.start.open();
    this.cdr.detach();
    this.renderer.invokeElementMethod(this.start, 'open', []);
    setTimeout(() => this.cdr.reattach());
  }

What is the use-case or motivation for changing an existing behavior?

Parent and child route, I want to emulate menu because the menu is not ready

Which versions of Angular, Material, OS, browsers are affected?

alpha5

browser_adapter.ts:78 Error: Uncaught (in promise): undefined
at resolvePromise (zone.js:538)
at MdSidenav._openPromiseReject (zone.js:515)
at MdSidenav.onTransitionEnd (sidenav.js:154)
at DebugAppView._View_HomeComponent0._handle_transitionend_2_1 (HomeComponent.template.js:651)
at eval (view.ts:374)
at eval (dom_renderer.ts:308)
at eval (dom_events.ts:16)
at ZoneDelegate.invoke (zone.js:323)
at Object.NgZoneImpl.inner.inner.fork.onInvoke (ng_zone_impl.ts:67)
at ZoneDelegate.invoke (zone.js:322)BrowserDomAdapter.logError @ browser_adapter.ts:78ExceptionHandler.call @ exception_handler.ts:57(anonymous function) @ application_ref.ts:304schedulerFn @ async.ts:131SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ async.ts:117NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.ts:138NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.ts:90ZoneDelegate.handleError @ zone.js:327Zone.runGuarded @ zone.js:233_loop_1 @ zone.js:487drainMicroTaskQueue @ zone.js:494ZoneTask.invoke @ zone.js:426
zone.js:463 Error: Uncaught (in promise): undefined(…)consoleError @ zone.js:463_loop_1 @ zone.js:490drainMicroTaskQueue @ zone.js:494ZoneTask.invoke @ zone.js:426

@jelbourn
Copy link
Member

Closing this because I think it's now obsolete. Feel free to file a new issue if there is still a problem.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants