Skip to content

kikonen/ng_template

Repository files navigation

#NgTemplate

Manage angularjs templates as view partials in rails assets pipeline.

This a bit similar gem to (angular-rails-templates)[https://github.com/pitr/angular-rails-templates] but utilizes normal rails view partials instead.

Install

Gemfile

gem 'ng_template'

Usage

app/controllers/aplication_controller.rb:

class ApplicationController < ActionController::Base
  ...
  helper NgTemplate::TemplateHelper
end

app/views/some/ui/show.html.erb:

<%= ng_template_include 'some/path' %>

OR

<%= ng_template_include 'some/path', prefix: '_some_prefix_' %>

About

Render AngularJS templates as partials in rails assets pipeline

Resources

License

Stars

Watchers

Forks

Packages

No packages published