While using meteor and trying to set up a (click) attribute, I encountered the following error message.
https://i.sstatic.net/Qzk9T.png
This is my code:
import { Component, NgZone, AfterContentInit } from 'angular2/core';
import { NgIf, NgFor } from 'angular2/common';
import { Accounts } from 'meteor/accounts-base';
import { RouterLink, RouteConfig, Router, ROUTER_DIRECTIVES } from 'angular2/router';
import { CapitalizePipe } from '../../../../lib/pipes/capitalize.ts';
import { Groups } from '../../../../collections/groups.ts';
import { MeteorComponent } from 'angular2-meteor/meteor_component';
import { Meteor } from 'meteor/meteor';
@Component({
selector: 'manage-players',
templateUrl: '/client/components/loggedIn/players/manage-players.html',
directives: [ RouterLink, NgIf, NgFor ],
pipes: [CapitalizePipe]
})
export class ManagePlayers extends MeteorComponent {
importPlayers: Object;
groups: Mongo.Cursor;
pendingImport_placementGroups: Array;
pendingImport_players: Array;
constructor( zone:NgZone ){
super();
var that = this;
this.subscribe('groups', () => {
this.groups = Groups.find();
},true);
}
createImportGroups() {
console.log('Do something!');
}
This is the HTML triggering the event:
<a href="#!" class="create-import-groups btn-flat" (click)="createImportGroups()" >Create Groups</a>
Every time I click the link above, those errors show up. Apologies if there are any issues with how I presented my question or if I missed any important details – I'm still learning how to use Stack Overflow effectively.