Skip to content

Instantly share code, notes, and snippets.

@todoubled
Last active December 11, 2015 03:19
Show Gist options
  • Save todoubled/4536762 to your computer and use it in GitHub Desktop.
Save todoubled/4536762 to your computer and use it in GitHub Desktop.
Module examples
{SearchError} = require '../views/search-error.coffee'
@onEnterError = (event, from, to, model) ->
new SearchError({model}).render()
.sidebar
width 200px
border-left 1px solid #ccc
h2
font-size 18px
<section class="sidebar">
<h2>{{ title }}</h2>
<p>{{ description }}</p>
</section
{BaseView} = require './base.coffee'
{template} = require '../../../templates/search-error.mustache'
class @SearchError extends BaseView
id: 'error'
template: template
render: ->
html = Mustache.to_html @template
@$el.html html
$('#widget').after @$el
@model.set 'modelAttrs': ['with','several','values']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment