Skip to content

md-calendar crash with event emitter #3

@alexfung888

Description

@alexfung888

Bug, feature request, or proposal:

bug: crash immediately when using md-calendar 0.0.19 with (change)=

What is the expected behavior?

not crash, calls function with selected time period

What is the current behavior?

crashes as soon as component loads
console says:
core.es5.js:1085 ERROR Error: Uncaught (in promise): TypeError: instance[output.propName].subscribe is not a function

What are the steps to reproduce?

<md-calendar (change)="onPeriodChange($event)">

crashes if and only if (change)= is present

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

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

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

Angular 4.0.0, Angular CLI 1.0.0, Windows 10 64 bit, Chrome 57.

Is there anything else we should know?

I don't know why the code is @output() an observerable. If I expose the private property and it will run fine:

@output('calChange')
private _change: EventEmitter = new EventEmitter();

Metadata

Metadata

Assignees

No one assigned

    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