gadicc / meteor-famous-views

Famous, the Meteor Way (with Reactive Blaze Templates/Views)
http://famous-views.meteor.com/
GNU Lesser General Public License v3.0
334 stars 27 forks source link

Events not firing in Cordova #169

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi there,

I just cannot catch an event in Cordova. html-File:

<template name="mainLayoutCordova">

    {{>Surface template='menuButton' size="[70,70]" origin="[1.0,0]" align="[1.0,0]" translate="[-15, 15,50]" }}
    {{>yield}}

</template>

<template name="menuButton">
    <div class="ball brd" id="tst"></div>
</template>

js-File:

if (Meteor.isCordova) {

//within the demo app, but famous-components will use this global too
  if (Package['famous-compiled']) {
    // @famono ignore
    famous = {
      core: Famous.Core,
      events: Famous.Events,
      inputs: Famous.Inputs,
      math: Famous.Math,
      modifiers: Famous.Modifiers,
      physics: Famous.Physics,
      surfaces: Famous.Surfaces,
      transitions: Famous.Transitions,
      utilities: Famous.Utilities,
      views: Famous.Views,
      widgets: Famous.Widgets
    }
  }

// famous globals for APP code
  Transform = null;
  FView.ready(function (require) {
    Transform = famous.core.Transform;

    // Famono: load famo.us shims and CSS
    famous.polyfills;
    famous.core.famous;  // CSS

    FView.registerView('GridLayout', famous.views.GridLayout);
  });

  Template.menuButton.events({
    'click': function(event, tpl) {
      // event.type == "click"
      alert("hallo");
    }
  });
}

Tried everything (the 3 different ways described in the examples), looked at the other issues, found nothing.

Is there an error in my code or is Cordova not fully supported yet?

ghost commented 9 years ago

Whep, now it goes. Just added and removed a Meteor-plugin, probably a packaging error.