pitr / angular-rails-templates

Use your angular templates with rails' asset pipeline
https://rubygems.org/gems/angular-rails-templates
MIT License
566 stars 169 forks source link

How to show image in angular template with .html extention #154

Closed NSLog0 closed 7 years ago

NSLog0 commented 7 years ago

I created .html file (header.html). I want to show image from assets/images. I already know, system can't use absolutely link to assets because system can't run on production mode after precompile then I need to know how I use image_tag in .html file located in assets/templates like use in .erb file

any suggestion?

NSLog0 commented 7 years ago

@pitr pleases help me

NSLog0 commented 7 years ago

I solved I just use

    config.angular_templates.module_name    = 'templates'
    config.angular_templates.inside_paths   = ['app/assets']
    config.angular_templates.markups        = %w(erb)
    config.angular_templates.extension      = 'html'

and change templates/ all file to html.erb instead use .html then I can use image_tag or other rails helper