md-card NgModule is not a function
See original GitHub issueBug, 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: <root> ; 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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (3 by maintainers)
Top GitHub Comments
I’ve updated my material2-app to use alpha.7 and RC5 with everything working. Looking at that might help debug your issue.
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.