angular-rails-templates | Use your angular templates with rails ' asset pipeline | Application Framework library
kandi X-RAY | angular-rails-templates Summary
kandi X-RAY | angular-rails-templates Summary
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. It removes the need for AJAX calls to retrieve the templates (or for you to manually set them into the DOM).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Renders the input
- Escapes the given value in a JavaScript script .
- Returns the name of the template name .
- Processes a metadata file .
- Initialize the config file
- Add an extension to the template
- Check if a template exists
angular-rails-templates Key Features
angular-rails-templates Examples and Code Snippets
Community Discussions
Trending Discussions on angular-rails-templates
QUESTION
My app works locally, however when I try to deploy to Heroku, I get a Sprockets::FileNotFound: couldn't find file 'angular' with type 'application/javascript'
error.
I have tried precompiling with RAILS_ENV=production bundle exec rake assets:precompile
and purging my build cache with heroku builds:cache:purge -a findum
, but still no luck. I recently migrated from Bower to Yarn– not sure if my asset path is the problem?
Has anyone run into a similar error that they were able to resolve? So many thanks 🙏.
This is my application.js
:
ANSWER
Answered 2021-Feb-19 at 13:57Update:
It looks like it was a problem with my post-Bower configuration (I migrated from Bower --> Yarn) I was able to solve Sprockets errors by adding this line to my assets.rb
:
Rails.application.config.assets.paths << Rails.root.join('node_modules')
and by running yarn add
for files that Sprockets could not locate.
I also made the following updates to old package names in my `application.rb'
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular-rails-templates
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page