0.0
No commit activity in last 3 years
No release in over 3 years
HTML assets compiled in javascript
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 4.0.0
 Project Readme

HtmlAssets

HtmlAssets includes static html templates in the asset pipeline so you can use them in Javascript. Think Angular.

Install

gem install html_assets

In application.js

//= require html_assets
//= require_tree ./html

In the browser

console.log(HTML_Assets)

Optionally create a directive that renders partials in your angular templates.

  App.directive 'htmlAsset', ->
    definition = 
      replace: true
      restrict: 'A'
      compile: (tElement, tAttrs, transclude) ->
        tElement.html(HTML_Assets[tAttrs.htmlAsset])
  <div html-asset="tasks/form"></div>