Convert ng-click to Blaze in meteoric

103 views Asked by At

I used ng-click as below in ionic:

<div class="list">
  <a class="item item-icon-right nav-clear" href="#/app/list1" ng-click="closeMenu()">
    <i class="icon ion-ios7-paper"></i>
      Item 1
  </a>  ....
</div>

know I want to use Meteor with Meteoric. I don't know how to convert ng-click to Blaze version. Please guide me. I didn't find anything about this in Meteoric guide page.

1

There are 1 answers

0
mokk On BEST ANSWER

Try to set up a template around your html:

<template name="myTemplate">
  <div class="list">
    <a id="myDiv" class="item item-icon-right nav-clear" href="#/app/list1">
      <i class="icon ion-ios7-paper"></i>
        Item 1
    </a>  ....
  </div>
</template>

Then put this code into your js file:

Template.myTemplate.events({
  "click #myDiv": function( event) {
      // yourFunction 
  },
});