batmanjs

generator

rails g batman:app rider_assistant

rails g batman:scaffold user

rails g batman:model

rails g batman:controller

gem 'batman-rails'

rails g batman:app

class MyApp.Product extends Batman.Model @encode 'title', 'description', 'price'

class MyApp.Subscription extends MyApp.production @encode 'period'

Batman.StorageAdapter Batman.LocalStorage Batman.SessionStorage Batman.RestStorage

API batman data-foreach

Batman.helpers Batman.helpers.ordinalize(1) # '1st' Batman.helpers.ordinalize('2') #'2nd'

Batman.helpers.singularize('posts') #'post'

Batman.helpers.pluralize('post') #'posts'

Batman.helpers.camelize('batman_object') #'BatmanObject' Batman.helpers.camelize('batman_object', true) #'batmanObject'

Batman.helpers.camelize('BatmanObject') #'batman_object'

@capitalize(string)

@trim(string)

name.toUpperCase()

name.replace('_', ' ')

<p data-bind="body" data-showif="isPublished"></p> <p data-bind-id="currentID"></p>

<input type="text" data-bind="title"><input>

<p data-bind="order.customer.name"></p>

<p data-bind="post.body | truncate 100"></p>

<span data-bind="knight.title | prepend 'Sir' | append ', the honourable.' "></span>

<span data-bind="person.name | prepend ' ' | preappend person.title"></span>

<p data-showif="shouldShow | default true"></p>

<input type="text" data-bind-placeholder="'Specify a subtitle for product' || append product.name">

<input type="text" data-source="product.title">

data-target data-target data-shwoif data-hideif

data-addclass- data-removeclass-

data-foreach-

data-formfor

<button data-event-click="controller.nextAction"></button> click doubleclick change submit