Why ng-scope is added to javascript inline of my partial view and makes alert not working?

I have improved endorama’s solution at github The same process. Create the angular-loadscript.js (from the link above) in your app use ‘ngLoadScript’ as a resource dependency. var app = angular.module(‘YOUR_APP_NAME’, [‘ngResource’,’ngRoute’, …,’ngLoadScript’]); In your partial use ‘text/javascript-lazy’ as the MIME type. Everything should work as required: /*global angular */ (function (ng) { ‘use strict’; var … Read more

Rails 4 rendering a partial with ajax, jquery, :remote => true, and respond_to

Several things must be present for this to work, including the :remote => true flag on the triggering element, the respond_to :js flag in the controller’s class definition, the route, the partial view, and lastly the jquery to actually render a dynamic partial must be contained in a separate .html.js file. Examples below are for … Read more