0

I am trying to load a bootstrap window. The data that will be displayed in the modal window is located in assets/javascripts/angular/templates/modalView.html.haml.

I installed these gems for angularjs and bootstrap:

gem "twitter-bootstrap-rails"
gem 'angularjs-rails'
gem 'angular-ui-bootstrap-rails'
gem 'angular-rails-templates'

this is application.js:

//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require turbolinks
//= require angular
//= require angular-rails-templates
//= require_tree ./angular/templates
//= require angular-resource
//= require angular-ui-bootstrap-tpls
//= require_tree .

and the JS code handling the modal window:

$scope.openModal = function() {
  console.log('here');
  var modalInstance = $modal.open({
  templateUrl: 'modalView.html', // also '/modalView.html' doesn't work
  controller: 'PostsCtrl'
});

But when I try to open the modal, I get this error:

GET http://localhost:3000/posts/modalView.html 404 (Not Found)

Any tips how to properly configure paths without putting the files into the /public folder?

Thanks.

user984621
  • 46,344
  • 73
  • 224
  • 412

0 Answers0