Tagged Questions
0
votes
0answers
17 views
Angularjs in rails: angularjs javascripts don't load
I want use angularjs in rails. for this, I want deactive rails view and just use angularjs html file. I use angular-resource.min.js for routing the url and then I create index action in my ...
0
votes
0answers
7 views
testing angularjs within a rails app
So far the only resource I've come across with this specific requirement is using a the ruby gem jasmine. I also noticed there are a ton of other resources out there such as protractor, karma and ...
0
votes
0answers
17 views
AngularJS with Devise - Unprocessable Entity
I'm trying to create a sign up process via AngularJs + Devise in Rails 4
I'm following this book-> Riding Rails With AngularJS
/users/registrations_controller.rb
class ...
0
votes
1answer
30 views
angularjs in rails:add data to database and show without reloading
In a rails project, I add data to database by http.post from angularjs controller. I have below code to do this:
RestaurantIndexCtrl.js.coffee:
restauranteur.controller 'RestaurantIndexCtrl', ...
0
votes
0answers
19 views
route rails view in angularjs in rails
In a rails project, I use angularjs. I set my angularjs view in public folder and use ngoute for set url to template. I have a problem with this, when I use ngRoute, I can just use template that exist ...
0
votes
0answers
14 views
ng-tables using custom names for my filters
I'm trying to use ng-table filters with a search backend called ransack (under Ruby on Rails) is there a way to use custom filter names?
eg:
description_cont
When used with ransack this will look ...
0
votes
1answer
13 views
ng-table filter after hitting submit
I'm using ng-table in AngularJS with a Ruby on Rails backend. I'm using ng-table to display 10 rows at a time and I'm doing the search/sort and pagination on the server side.
The problem I'm having ...
0
votes
1answer
21 views
Accessing 9gag API in Angular.js
I am making a simple angular/rails app as a 9gag viewer, just for practice. I am using the unofficial api and it seems to work. I set up the rails app, and rails is just serving angular. I can call ...
0
votes
0answers
17 views
Rails 4, Devise and Angular : $resource on account update
I'm currently working with Angular, Rails 4 and Devise. I want to be able to update the current user account through Angular.
To start, on my Rails side, I needed to have a custom Registration ...
0
votes
1answer
50 views
Upload file with paperclip and angularjs
I'm trying to implement this Angularjs upload in my rails application:
Angular File upload
This is my photos_controller:
def create
@photo = current_user.photos.new(photo_params)
respond_to do ...
0
votes
3answers
13 views
Angular $http post() format Defaults to HTML on Rails
I have a factory that exposes a create() function which uses $http.post() underneath. For some reason when it is called from an ng-click the request is being formatted as HTML. All of the params are ...
-1
votes
0answers
22 views
POST request hangs
I'm sending a POST request to get back a filtered report. I send my first few and they are pretty quick, no more than a second or two. On about my third request the request seems to hang, and doesnt ...
0
votes
2answers
24 views
Create a record in Rails from AngularJS
I have an Angular application that sends http requests to a rails server. I'd like to make a request to create a record (in the table SavedQueries).
The Angular app is actually making a very simple ...
3
votes
1answer
32 views
Can you use AngularJS with Rails Models
If the title question is unclear, let me clarify. Though the question is conceptual, rather than physical.
I have a rails application with a few models (order, buyer). I recently discovered angularjs ...
0
votes
1answer
17 views
AngularJS application not downloading file
I have a rails server that generates a csv from an http request, like this:
@results = some_json_string
require 'csv'
csv_string = CSV.open("results.csv","wb") do | csv|
...
0
votes
2answers
33 views
How to serve a file for download from Rails?
So this is probably a simple question, but I've never done it before.
I have a Rails action that queries a database and creates a csv string from the query result.
I'd like to take the query string, ...
0
votes
0answers
21 views
Rails 4 + AngularJS: templateUrl for directive not found?
I'm trying to create a directive in AngularJS to split my HTML into reusable partials:
app/assets/javascripts/products/directives/products.js:
app.directive('productsfilter', function() {
return {
...
0
votes
1answer
34 views
interpolating a '#' in a rails url
I have a a webpage which has different tabs. The tabs used to be different pages, but now through angularjs they are effectively a 'single-page' with no loading between each clicked tab.
So every URL ...
0
votes
0answers
16 views
Angular - Performance/Crawl-ability - Json to Jeykll - Thoughts? [closed]
I've considered a rebuild of Lionseek.com (Moving from CodeIgniter to ROR + AngularJS) - millions of pages/millions of pageviews a month/updated every minute or so.
Since most of the traffic is ...
1
vote
2answers
37 views
XMLHttpRequest No 'Access-Control-Allow-Origin' header is present on the requested resource
So there are a handful of questions on StackOverflow addressing this error, but of the 10-15 I checked, I could not find a solution to my exact problem.
I am running an Angular app (port 9000) and a ...
0
votes
0answers
8 views
Rails + Selenium: Tests fail if asset is loaded by AngularJS
I need to dynamically load image URLs using AngularJS. They work in my development and even in my tests I can see the images uploading properly through the browser that Selenium opens. However, my ...
3
votes
1answer
36 views
Angular + .nghaml template: Referencing Precompiled Image Assets
I'm using .nghaml for my templates and using the following gems for Angular integration:
gem 'angularjs-rails'
gem 'angular-rails-templates'
My Rail view layouts are name.html.haml and using ...
0
votes
0answers
9 views
Rails 4 + Angular + Selenium: No route matches [GET] “/%7B%7B%20product_color.color.image.url%20%7D%7D”
I'm getting the error: No route matches [GET] "/%7B%7B%20product_color.color.image.url%20%7D%7D" when I use selenium with my cucumber tests even though all the images are loading properly (I sleep 10 ...
0
votes
0answers
20 views
AngularJS + Rails 4: including $location provider causes all links to stop working?
In my Rails 4 app when I land on a particular page (my products#show page, ex: /products/30) and I click on any of the links on the page, the browser doesn't move. However, the URL changes with each ...
0
votes
2answers
28 views
Repopulate Angular app data with new data from form submission from a rails api
I have a rails api that sends default input to an Angular app. The angular app receives json at localhost:9000/api/query, and then the view at localhost:9000/#/query styles that json into an unordered ...
1
vote
1answer
25 views
My ng-change is not firing on my Angular/Rails app
I am building a notecard application and for some reason my ng-change is not firing at all. I cannot figure out what the issue is. I tried breakpoints in the JS to verify that it is not actually ...
0
votes
1answer
36 views
angular ui router, back button does cause state change
I'm using angular in a rails app and have ui-router set up with several states.
name: 'item'
url: '/items'
child states
name: detail
url: "/{item_id:[0-9]{1,4}}/detail"
parent: item
I'm ...
0
votes
1answer
20 views
ActiveRecord::RecordNotFound in Api::V1::PostsController#show
I am trying to follow Rails Todo API Part 1 from egghead.io https://egghead.io/lessons/angularjs-rails-todo-api-part-1
I am trying to access localhost:3000/api/v1/posts and the page should show the ...
0
votes
1answer
16 views
Rails 4 routes + AngularJS: How would I grab the products/:id parameter?
I'm trying to use pure Rails routes with AngularJS controllers. How would I grab the product id (30) of /products/30 in my Angular controller if the route is being generated by Rails?
...
-1
votes
3answers
34 views
How can I submit a new query in an angular application?
Let me start by saying this: this is my first forray into angularJS.
I am building an angular app with a feature where you can write sql directly against a database. Security issues aside (I am the ...
0
votes
0answers
14 views
How to get an instance variable from rails using angularjs and ui router?
I'm using a template in my state router. I want to get an instance variable from my rails server, but it doesn't have it's own path, so I can't use Restangular or something like that. Also, when I ...
0
votes
2answers
30 views
Error: Argument 'HomeCtrl' is not a function, got undefined
I get the following error:
Error: Argument 'HomeCtrl' is not a function, got undefined assertArg@
This is what my code:
in main.js,
var my_app = angular.module("my_app",[]);
var config = ...
0
votes
1answer
16 views
ui-sref not working approperly
I have a very basic angularjs app, using ui-router. The stateProvider is defined as follows:
$stateProvider
.state 'home',
url: '/'
.state 'products',
abstract: true
url: ...
0
votes
0answers
42 views
angularjs:-Improve performance of site
My team has made a website using angular js and ruby on rails as its backend..The issue I am getting is that when the javascript is precompiled and when it comes on the browser,the size of the ...
0
votes
0answers
35 views
Rails 4 + Angular: Already Bootstrapped with this Element '<body class=“ng-scope”>'
I'm on Rails 4 + turbolinks + the angular-rails gem : https://github.com/hiravgandhi/angularjs-rails. I only want Angular on one specific page, so in my index.html.erb view I have this:
<% ...
1
vote
0answers
29 views
How to organize many Angular.js constants?
I am working on an Angular.js and Rails application, and am using asset_path(...) calls for all my templates. Instead of having these littered all over my app, I'd like to have them stored in a single ...
0
votes
1answer
20 views
Render html of angularjs instead of default rails html
I want use angularjs in rails application and I'm new to angularjs. For this, I add angularjs file to project and created the below scripts and html:
HomeCtrl.js.coffee
@restauranteur.controller ...
1
vote
0answers
31 views
Rails REST API permissions (CanCan) with Angular JS client. How to render UI based on permissions?
I'm building a project which works only via JSON API (Rails 4.0, PostgreSQL). It's a big application with database based permissions. And I have AngularJS app which works with this REST API.
...
1
vote
0answers
25 views
AssetFilteredError while working on rails with angular
Following this angular rails tutorial, getting the error of Asset Filtered error
application.html.erb file is
<!DOCTYPE html>
<html ng-app>
<head>
<title>Blog</title>
...
0
votes
1answer
21 views
ng-href link not followed on Firefox
I'm using ng-href which seems to produce the correct results, and the correct behaviour on Chrome but not on Firefox.
on the page www.mydomian.com/clubs/ in my rails app i have the Haml
...
0
votes
1answer
32 views
pass parameters from angularjs to rails project
I have 2 project: 1.rails project. 2.angularjs project.
In the rails project, I have a widget model that I create by scaffold. Now I want get widget data from angularjs project and post data to rails ...
0
votes
1answer
25 views
ngAnimate in Rails, I just want to hook it up
why is it always so hard to hook things up to AngularJS?!?!?!
here's the error I get for anything new I try to install to Angularjs:
Error: [$injector:unpr] ...
3
votes
1answer
46 views
Use of Angular's ng-src in Rails Production environment
I'm building a simple AngularJS app in Rails - when compiled in Heroku / production - the ng-src is linking to the proper path but not producing the standard minified images even when used in ...
0
votes
0answers
46 views
HTTP:No 'Access-Control-Allow-Origin' header is present on the requested resource
I have 2 project:
rails project.
angularjs project.
Now I want use rails models in angularjs project. I have a widget model that I created by scaffold. Now I want add a new widget from angularjs ...
0
votes
1answer
26 views
socket.io/1/?t= not found
I have a web app that is running on rails 4 at localhost:3000. I am also have angularjs on client side. I have placed scoket.io.js file in my rails app public folder. From my angularjs client code, I ...
-2
votes
0answers
19 views
Controller is not using AngularJS commands
I am learning rails and angularjs... I started with a basic app. My controller is not taking my angular commands. I have been trying to break my head... It should be too simple, sorry guys... But ...
3
votes
1answer
24 views
Problems with angular promises' responses in services
I'm working with angular 1.2.18 for the first time. I am using it with rails 3.2 and coffeescript. I am trying to use a promise in a service to fetch some data that I will then use to populate a ...
0
votes
1answer
41 views
use angularjs in rails project
I want use angularjs in a rails project and I'm new to angularjs. for this, I create a staticpage controller with index action. I set this page for root page:
config/routes.rb
...
0
votes
2answers
70 views
CRUD operations using AngularJS and Mongoid fail partly
I am trying to integrate AngularJS into my Mongoid-powered Rails application. In particular, I want the get the basic CRUD operations to work.
1) Saving a book works!
2) Editing fails: Error: ...
-1
votes
0answers
24 views
Not able to call $http.put and $http.delete cross server in angularjs
I am able to call the $http.post and $http.get methods on other server from angularjs controller but I am unable to call $http.put and $http.delete cross server.
I run my api server in port :3001, ...