{"repo":"pitr/angular-rails-templates","free":true,"listed":false,"github":"https://github.com/pitr/angular-rails-templates","clone":"git clone https://github.com/pitr/angular-rails-templates.git","description":"Use your angular templates with rails' asset pipeline","language":"Ruby","stars":561,"topics":["angular-template","rails-asset-pipeline","angular-rails-templates","rails","angular"],"license":"MIT","category":"ui-components","readme_excerpt":"Angular Rails Templates Adds your HTML templates into Angular's $templateCache using Rails asset pipeline. IMPORTANT : for Rails 4.2+ use version 1.0+ of this gem. For Rails 3 - 4.1 use version 0.x Branch Build Status ------------ --------- master It removes the need for AJAX calls to retrieve the templates (or for you to manually set them into the DOM). Usage 1. Add the Gem In Gemfile 2. Include Templates in Rails Asset Pipeline Then, in your application.js file, require angular-rails-templates and your templates: Make sure to require angular-rails-templates before you require your templates. Name your templates like you would name any other Rails view. The .html part is required. If it is not present your views will not be added to angular's template cache. Angular Rails Templates will try to load support for the following markups if their gems are present: Extension Required gem ---------- ---------------------------------------------------------- .erb - .str - .haml haml .slim slim .md liquid, rdiscount, redcarpet, bluecloth, kramdown, maruku See Advanced if you would like to use other markup languages. 3. Add a Dependency in your Angular Application Module Your Angular module needs to depend on the templates module. (configurable, see Advanced Configuration) 4. Use your Templates No matter what the source file extension is, your template's url will be #{base name}.html For example: The templates can then be accessed via templateUrl as expected: Or anything else that uses","default_branch":null,"files":null,"tree":[],"storefront":"/r/pitr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pitr/angular-rails-templates/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}