I have a js "my_js_file.js" file which I include only into a single page. In that js file I need to get an url by calling a phoenix helper:  # my_js_file.js  function func1(userLogin) {   var createUserUlr = "<%= user_home_path(@conn,...
I'm working with a web application that is developed with the Phoenix Framework (written in Elixir).  I've got a form field that currently looks like this:  <div class="form-group">   <%= select f, :category_id, @categories,...
I have a backend built with Elixir / Phoenix and a frontend built with Angular 2 (Typescript, Brunch,io for building, ES6). I now want to use Phoenix Channels. And I'm a bit desperate trying to use the Phoenix Javascript Client in my frontend.  W...
I need to translate stuff on the client side of my Elixir Phoenix application. What is the best workflow for that? I've the default gettext system on the server side with it's translation files. How do I make a subset of the translations avai...
I have created Phoenix 1.0.4 (Elixir) application. After I had added some logic in application I wanted to switch my work for front-end part. On page http://www.jonathanbirkholz.com/how-to-use-font-awesome-on-phoenix/ I read that for 3rd assets I sho...
I'm trying to convert a Ruby on Rails + d3.js app to Elixir on Phoenix + d3.js.  I cannot seem to get d3.js to load properly.  I have it in web/static/vendor/js/d3.v3.min.js. And my brunch-config.js has an order before section like this:  order:...
I'm trying to import a jQuery plugin (js-offcanvas) with npm but I keep getting the same error:  app.js:20: Uncaught TypeError: $(...).offcanvas is not a function   the app.js file:  import offcanvas from "js-offcanvas"  $('#off-canva...
I can't seem to change any of my JavaScript files without restarting  the server - it really kills a lot of the live-reloading fun of working in Phoenix. I don't do a ton of JavaScript, so I'm not sure if I'm doing something wrong.  P...
Inside  tag in my index.html.eex i can use this syntax to retrive text.  <%= gettext "Login failed!"%>   Now i have a js file used for validating fields, and i load this file as a script inside index.html.eex.  Everything works fine but...
Inside a render function in my template I'm passing this parameter:  placeholderTitle: (gettext "Companie\'s name")   I need to escape the ' because that string is going to be used inside inline javascript:  onfocus="if (this....

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.