Search Posts

Category: ruby-on-rails

how to Angular2token post name?

After setup device + rails api and create a register component. After create a user and check on db the User just commited the email and password. But, i added the name and nickname on form fields. Someone have any tip to spare? or is with the same issue? Rails console User Load (0.6ms) SELECT “users”.* FROM “users” ORDER BY “users”.”id” DESC LIMIT ? [[“LIMIT”, 1]] => #<User id: 5, provider: “email”, uid: “[email protected]”, name: […]

AngularJS – Is it possible to store {{expressions}} as a $scope.variable value?

I am building a Rails app but using AngularJS for bits of the front end. Is it possible to store {{expressions}} as a $scope.variable value? Code: Here is the angular controller // I am pulling data from the rails controller via the gon gem. $scope.entertainmentTemplate = gon.active_entertainment_template.description; Which translates to: $scope.description = “{{productName}} is a great product and also has awesome {{additionalInfo}}. These are some more example words, blah blah..”; Defined variables in angular controller: […]

Firebase auth or angular2-token?

For a mobile and rails API is better use firebase auth or angular2-token for authentication? Seems that Firebase Auth is more suited for mobile with ionic but if you would like to use Rails API as backend to provide a web service with Angular? so, please give your thoughts! Source: AngularJS

Ruby On Rails: How can I read text from other sites that are written by angularjs

I want to read the value 10059 from another site. It contained in the p tag looks like this, and i want it. <p class=”currency_desc”>10059 usd</p> What I did in rails app: require ‘nokogiri’ require ‘open-uri’ doc = Nokogiri :: HTML (open (‘http://sample.com’)) content = doc.to_html …. …. But the content I got about it was not what I wanted, because it was written by angularjs ? <p class=”currency_desc”>{{ buy_rates}} usd</p> How do I do […]