Skip to content

md-card NgModule is not a function #982

@vapits

Description

@vapits

Bug, feature request, or proposal:

Bug (?)
Version: @angular2-material/card": "^2.0.0-alpha.7
Angular version: RC4 (but tested with RC5 also)

Case is is simple from angular2-material options card is the one that simply cannot work in my case. It is install and accessible through systemJs and the usage is this:

Component:

import { Component, OnInit, Input } from '@angular/core';
import { MenuItems } from '../../../models';
import { MD_CARD_DIRECTIVES } from '@angular2-material/card';

@Component({
  moduleId: module.id,
  selector: 'big-icons-vertical-menu',
  templateUrl: 'big-icons-vertical-menu.component.html',
  styleUrls: ['big-icons-vertical-menu.component.css'],
  directives: [MD_CARD_DIRECTIVES]
})
export class BigIconsVerticalMenuComponent implements OnInit {

  @Input() items: MenuItems;

  constructor() { }

  ngOnInit() {
  }

}

Template (well even if there is no template the issue is the same).

<md-card class="text-center detail-menu">
  <md-card-content>
    Text here
  </md-card-content>
</md-card>

When the app runs and i use the component I get:

zone.js:461 Unhandled Promise rejection: TypeError: core_1.NgModule is not a function
at eval (http://localhost:4200/vendor/@angular2-material/core/ripple/ripple.js:168:16)
at Object.eval (http://localhost:4200/vendor/@angular2-material/core/ripple/ripple.js:175:2)
at eval (http://localhost:4200/vendor/@angular2-material/core/ripple/ripple.js:178:4)
at eval (http://localhost:4200/vendor/@angular2-material/core/ripple/ripple.js:179:3)
Evaluating http://localhost:4200/vendor/@angular2-material/core/ripple/ripple.js
Evaluating http://localhost:4200/vendor/@angular2-material/button/button.js
Evaluating http://localhost:4200/app/top-bar/top-bar.component.js
Evaluating http://localhost:4200/app/top-bar/index.js
Evaluating http://localhost:4200/app/shared/index.js
Evaluating http://localhost:4200/app/routes.js
Evaluating http://localhost:4200/main.js
Error loading http://localhost:4200/main.js ; Zone: ; Task: Promise.then ; Value: Error: TypeError: core_1.NgModule is not a function(…)consoleError @ zone.js:461_loop_1 @ zone.js:490drainMicroTaskQueue @ zone.js:494ZoneTask.invoke @ zone.js:426
zone.js:463 Error: Uncaught (in promise): Error: TypeError: core_1.NgModule is not a function(…)consoleError @ zone.js:463_loop_1 @ zone.js:490drainMicroTaskQueue @ zone.js:494ZoneTask.invoke @ zone.js:426

Maybe there is a relation here with #954 but I cannot add my issue there as it is locked for collaborators only.

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