Skip to content

snackbar not displayed anymore with angular version 4.0.0-rc1 #3357

Closed

Description

@marius-oprea

Bug, feature request, or proposal:

BUG

What is the expected behavior?

to display a snackbar at the bottom of the browser

What is the current behavior?

it display a transparent div container with a slim shadow without displaying the snackbar

What are the steps to reproduce?

Add this code in your component created with Angular version 4.0.0-rc1 and @angular/cli version 1.0.0-rc.0 and @angular/material version 2.0.0-beta.2 :

import {MdSnackBar} from '@angular/material';
....
constructor(...public snackBar: MdSnackBar) {}
....
this.snackBar.open('Test','Ok', {duration:3000});

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

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

Angular version 4.0.0-rc1 and @angular/cli version 1.0.0-rc.0 and @angular/material version 2.0.0-beta.2 . Tested on Chrome and Firefox and Edge latest versions.

Is there anything else we should know?

Activity

  1. willshowell commented on Mar 1, 2017

    @willshowell
    Contributor

    Here is a plunk showing the issue

    http://plnkr.co/edit/ZJxPOjKC6Lr6RnYQBgTy?p=preview

    Switch between angular@4.0.0-rc.1 and angular@latest (2.4.8 atm) by swapping the commented out import in systemjs.config.ts

  2. DenisLaboureyras commented on Mar 1, 2017

    @DenisLaboureyras

    Animations in angular 4.0 are in a separate module, you should import it. If not, the snackbar stays invisible.

    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

    The side effect in my case is that I can't use anymore aot and uglification with webpack, see issue:
    angular/angular#14737

  3. crisbeto commented on Mar 1, 2017

    @crisbeto
    Member

    That makes sense @DenisLaboureyras, although we should probably handle the lack of animations a little better.

  4. self-assigned this
    on Mar 1, 2017
  5. marcorinck commented on Mar 2, 2017

    @marcorinck

    Shouldn't the component just display itself without animations then? There are usecases where I deliberately disable animations and to not be able to use certain components would be quite a surprise.

  6. added 4 commits that reference this issue on Mar 14, 2017
    7098e4d
    40e5fe7
    8ee3e03
    f662a7d
  7. added 2 commits that reference this issue on Mar 22, 2017
    255fa3f
    7b3367a
  8. added a commit that references this issue on Mar 23, 2017
    cd55082
  9. added a commit that references this issue on Apr 16, 2017
    ac476e4
  10. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  11. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions