Sha256: b20c4f85c5efa93ac8652460e5a449b86e0d80e4e8bfd22b74e0dcc04dcce8ed

Contents?: true

Size: 632 Bytes

Versions: 5

Compression:

Stored size: 632 Bytes

Contents

import jQuery.*;

class <%= @haxe_class_name %> extends RailsViewComponent {
  public static function main(){
    RailsViewComponent.start("<%= @file_path %>");
  }

  public override function onLoad(){

    <% @args.map{|arg|arg.split(":")}.each do |name,method| %>
    // <%= route = "#{name}@#{method}" %>
    addCallback("<%= route %>", function(data){
      /// TODO
      this.getDOM().html("<%= route%>:" + data.message);
    });
    <% end %>

    
    <% @args.map{|arg|arg.split(":")}.each.with_index do |(name,method), i| %>
    <%= "// " if i > 0 %>sendAsync("<%= "#{name}@#{method}" %>", {} );
    <% end %>  
  }
}



Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_view_component-1.0.4 lib/generators/rails_view_component/erb/haxe/RailsViewComponent.hx.erb
rails_view_component-1.0.3 lib/generators/rails_view_component/erb/haxe/RailsViewComponent.hx.erb
rails_view_component-1.0.2 lib/generators/rails_view_component/erb/haxe/RailsViewComponent.hx.erb
rails_view_component-1.0.1 lib/generators/rails_view_component/erb/haxe/RailsViewComponent.hx.erb
rails_view_component-1.0.0 lib/generators/rails_view_component/erb/haxe/RailsViewComponent.hx.erb