Tagged Questions
0
votes
0answers
2 views
Angular URL without # in Rails
I'm working on a single page web application using AngularJS and Rails.
And there's something wrong with the URL # symbol.
the $routeProvider would add a hash symbol so the URL looks /#/post, and ...
0
votes
1answer
15 views
How to force Karma to reload http served javascript?
I came across this interesting article (http://danott.co/posts/rails-javascript-testing-using-karma.html) from @danott about Rails Javascript Testing Using Karma.
I tested it myself with the latest ...
-2
votes
0answers
20 views
Rails+Angular+Yeoman Project?
how to setup the rails project with angularjs for frontend along with yeoman scaffolding tool. I found a link for this, but its not descriptive enough to understand. Please help.
...
0
votes
0answers
28 views
Heroku Rails CORS issue
I have built a rails restful service that I host on Heroku and a Angular client which I am trying to run from my local machine. Eventually this client will be run added to a phonegap project. However, ...
0
votes
1answer
19 views
AngularJS Filter in rails
I'm trying to make a searchable list of posts on a ruby on rails application that I made. I have AngularJS working on the application. All of the posts are saved on rails in @posts. How would I make ...
0
votes
1answer
30 views
AngularJS not loading on first page view
I'm using AngularJS in an app that I built on rails 4. The problem I'm running into is that when I first redirect to a page, it doesn't load any of the js. If I type in the specfic URL or refresh the ...
0
votes
1answer
54 views
'Access-Control-Allow-Origin' issue
I have an angular frontend with a rails backend.
I have angular code like this:
$http({method: 'GET', url: 'http://localhost:3000/products.json'}).
success(function(data, status, headers, config) ...
2
votes
1answer
62 views
On deciding how heavily to use client side code
I'm developing a site which will have a fairly extensive admin section. The front end is fairly simple, and doesn't need a complex UI at all, so I don't intend to have too much client side code there.
...
-1
votes
1answer
38 views
Angular send POST request with resource service to Rails API
I´m trying to send a POST request using a resource service in Angular to a Rails API. Both, angular client and API are not in same server (so there is Cross Domain).
I´m not able to send the request, ...
1
vote
2answers
71 views
Rails 3 and Angularjs Origin http://localhost is not allowed by Access-Control-Allow-Origin.
First, let me say that I have tried a ton of solutions that have been posted here. None of them seem to work for me. I realize that my problem is stemming from CORS and my rails app's inability to ...
0
votes
1answer
40 views
Angular reuse session after refresh/browser closed
How do you work with Angular.js to reuse a session at a webserver (rails) after browser refresh/restart? I'm using RestAngular but I don't know how to store the session? The angular.js app is in my ...
2
votes
1answer
67 views
can grunt automatically include all my js in index.html?
I'm new to grunt. I'm coming from rails and getting into angular. From what I can see grunt usemin can replace <script src=...> between build directives and replace that with a single minified ...
0
votes
1answer
62 views
AngularJS + Bootstrap tooltip in template
I have a template created by Rails. Putting a Bootstrap tooltip in the application.html.erb works fine but putting one in the template partial loaded by AngularJS does not work.
application.js.coffee
...
0
votes
1answer
46 views
Why does an angular factory interfere with MongoId?
I do have a Rails application (Rails 4 / Mongoid) which uses Capybara / Rspec. Furthermore I do use Angular.js for some client stuff. Unfortunately I experience a strange behavior in a spec test.
...
0
votes
1answer
54 views
“This webpage has a redirect loop” with angularjs + rails + devise
I know theres a lot about redirect problem with angularjs in here, but so far didnt see something like this problem, I am using Rails as API server with Devise, I get to loggin to Devise with ...
1
vote
1answer
38 views
Restangular PUT not appending the id in the request
I've got an AngularJS App using Restangular for persistence on top of a Rails 4 API. I've run into a problem with my updates not working.
My code in the routeProvider:
...
0
votes
3answers
23 views
disabling ng-show on mouseenter not working?
I have a registration field with angular in a div that pops over with an error message if it doesn't validate.
<div id="email_error_msg" ng-show="email_error_message">
...
1
vote
1answer
68 views
Like discourse is to Ember.js, what are some big open source project written rails + angularjs?
Discourse is a open source project written in rails and Ember.js so its a really good resource in case someone is looking to learn rails or Ember.js.
I am wondering are there are any fairly large ...
0
votes
1answer
23 views
ng-view repeats what is written in my application.html.erb
I'm using Angular with a Rails application & my application.html.erb in app/views/layout folder looks like this:
<!DOCTYPE html>
<html>
<head>
...
0
votes
1answer
52 views
AngularJS + Rails: get a resource but stay on current page
I have a page with a button that will change the state of the resource on the server. Everything is wired up and working fine. But I had to resort to a server response that sent the browser "back" ...
1
vote
1answer
106 views
Uncaught Error: No module: app angularjs and rails
I am new to angularjs I am trying simple app by referring some startup tutorials
When i run my app getting error as
Uncaught Error: No module: app
Here is my controller
club-controller.js
'use ...
0
votes
0answers
38 views
Angularjs complex layout application
Sorry for the not explicit title. Didn't know what to put to explain my problem.
I'm trying to set up angularjs into my Rails 4 app using the Angular Seed as default structure but I'm having a hard ...
0
votes
1answer
40 views
Angularjs, Rails 4 and Paperclip how to get thumbnail image
I'm recently trying to switch my Rails server app to Angularjs. When everything works fine and I can get my json data from the server, I actually don't know how to get image from Paperclip. Using only ...
0
votes
0answers
28 views
Using angularjs to save/query rails associated model?
At first, I really want to use ngResource service of angular to save/query rails model. However, it does not support querying/saving rails model associations (has_many, has_one, etc). If I am to do ...
1
vote
0answers
31 views
How to integrate Rails views with angularjs ng-view?
I have created rails view (ERB). However, I want to integrate it into angularjs $routeProvider, but I don't know what url should I fill into templateUrl to give me the appropriate rails view. For ...
0
votes
1answer
21 views
What builds nested parameters in Rails?
I am spiking an AngularJS 1.0.8 application, which is doing POST requests to a Rails 3.2.13 server. I did something very similar earlier today with slightly different results.
For the sake of ...
0
votes
1answer
38 views
Display value and actual HTML code value of a float number are not consistent under Rails and Angular.JS environment?
Hi I have a very annoying problem about a Float number display problem.
Basically, the precision on a float number is not consistent in the generated HTML code and what it is displayed on the browser ...
0
votes
1answer
49 views
Angularjs in rails: Change page without reloading?
What is the best practice of changing pages in rails by using angularjs such that there will be no refresh? (I will use fadein animation on the switched page).
In addition to that, If I want to ...
0
votes
2answers
48 views
AngularJS, creating a resource hash
Trying to take a url and in an AngularJS controller redirect that request to the best place to get the json data. The VideoSearchCtrl is bound to the search form. The url generated is correct for the ...
0
votes
1answer
47 views
Scope error: Uncaught TypeError: Object # has no method 'scope'
I am trying to add Angular JS jQuery-File-Upload in my rails application.
To implement this, I am using
https://github.com/tors/jquery-fileupload-rails gem
Angular JS code from ...
0
votes
0answers
23 views
angularjs loading a controller if none exist
I've got a large Rails + AngularJS app in which I'm using AngularJS for in some parts but not all. This is driven through the angualrjs routes plugin which loads my controller.
When I go to a page ...
0
votes
1answer
79 views
JSON from Rails to Angularjs
I’m trying to use Angularjs to get JSON from a Rails test app that I put on Heroku. Below you will find my Angular and Rails code.
This is the error that I get in my Firebug console.
"NetworkError: ...
0
votes
1answer
48 views
$resource calls to url failing in simple angularjs app built in rails
I mostly followed Ryan Bates' setup for a angular app in rails. In my gemfile:
gem 'angularjs-rails'
and in the application.js:
//= require angular
//= require angular-resource
//= require ...
0
votes
0answers
34 views
AngularJS: HAML escape ampersand (&)
For instance I have this:
<div class='form-group' data-ng-show='giftType && giftVariant')
And if I use this HAML code:
.form-group(data-ng-show='giftType && giftVariant')
I ...
0
votes
2answers
80 views
Escape 2 Curly Braces / Angular JS braces
I'm trying to print a string in my view that has curly braces like these:{{ }}, and it doesn't come through. Is there a way I can escape/skip the curly braces parsing in Rails? The string I'm trying ...
0
votes
1answer
49 views
restrict access to staging instance on heroku for angular + rails
Is there a way we can prevent random people from looking at our staging site? We are using an angular js single page js application which is precompiled/uglified into the rails public folder (rails ...
0
votes
3answers
152 views
AngularJS: directive's template is not rendering correctly
I have a really strange behavior in a directive I wrote for a dropdown replacement. the model used can be nested infinitely using child nodes. the directive is included like this (HAML-Code):
...
0
votes
1answer
104 views
Best way to display images from Rails Asset Pipeline using AngularJS?
I'm working on a Rails app with an Angular-driven frontend. I want to include images from my Rails asset folders into a view that is shown only shown in certain contexts using an ng-switch directive. ...
0
votes
1answer
32 views
Load model resources angular.js
I have 2 tables posts and photos and there relationship is
post has_many :photos
photos belongs_to :posts
I load the posts through angular and display them to the user and all the content works ...
0
votes
0answers
52 views
AngularJs input[type=file] bug
I want to handle file uploads using angularjs. I have settled up a model, view, controller and service that is included in the controller:
#Model
window.App.factory 'RepositoryItem', ...
0
votes
1answer
24 views
AngularJS simple page counter in controller
I have this in my html template. I want the button to fire the showMore function when clicked.
<button ng-click="showMore(secondPage)">Show More</button>
This is the controller. I'm ...
0
votes
1answer
43 views
Parameters vs JSON strings while designing an API with Rails for use with AngularJS
I am building an API to receive POST data and return JSON in Ruby on Rails 3. I am submitting the data using the angularjs $http object.
var post_data = {
content: $scope.post_content,
...
0
votes
0answers
61 views
Rails will_paginate gem with angular.js to do pagination
Context: I have a Rails backend serving as an API to an Angular.JS front-end application.
Task: I want to retrieve all of the records of different species of "dinosaurs" from the Rails backend. ...
2
votes
1answer
460 views
Can't specify headers in request in AngularJS
I have 2 parts in my app - Angular frontend and rails server. And because it's different domains, requests doesn't work by default. There are a lot of staff about that, including stack, but it doesn't ...
0
votes
0answers
195 views
How do I use Bootstrap Lightbox with AngularJS?
I have the following setup:
Rails 4.0 running on Heroku
jquery-rails and jquery-ui-rails gems
ui-bootstrap-tpls.js from Angular UI Bootstrap (0.6)
bootstrap-lightbox.js from Bootstrap Lightbox
...
0
votes
1answer
68 views
Rails catch all route, excluding resources and HTML
I am using Angular html5mode so have Rails routing set to redirect all failed requests to root
# Angular catch all to allow page refresh
get '*page' => "home#index"
This works just fine, except ...
0
votes
1answer
170 views
Using AngularJS in Ruby on Rails app
I have a existing project in Ruby on Rails.
What is the best way to use AngularJS in Ruby on Rails app?
I want to use AngularJs for only specified modules, not for create SPA. This is good way?
1
vote
1answer
44 views
“Angularjs Way” of finding by id
Here's the gist of what I'm doing
<!-- if user liked post -->
Show "Unlike" button
<!-- else -->
Show "Like" button
<!-- end -->
In Rails, I would do something like this:
...
0
votes
1answer
35 views
Ruby statements in angularjs ng-repeat
I need to do something like this:
<li ng-repeat="avail in available_connections">
<span><i rel="tooltip" title="Connection Requested" class="glyphicon glyphicon-check" ...
1
vote
2answers
66 views
Angularjs: Condition statement based on current_user
There's something I've been stuck on for a couple days now. I would like to display an item based on the current user (id).
For an example:
<!-- if current user has already 'liked' this post ...