Question: Is there a standered naming convention when making folders in a prism project ?

This works
**ViewModals:**

```
HelloWorldPageViewModel

```

**View:**

```
HelloWorldPage

```

**App:**

```
Container.RegisterTypeForNavigation<Views.HelloWorldPage >();

```

***But for some reason , this does not work***

I added the folling folders Login > Template >

**ViewModals:**

```
Login.Template.HelloWorldPageViewModel

```

**View:**

```
Login.Template.HelloWorldPage

```

**App:**

```
Container.RegisterTypeForNavigation<Views.Login.Template.HelloWorldPage >();

```

Answer: 
You can't.

The ERB interpolation (anything in ERB tags `<% %>` or `<%= %>`) happens on the server before the the javascript is sent to the client. If your script is placed in `app/assets/javascripts` this done when the scripts are compiled at deploy time.

The Ajax request happens later on the client.

You either need to do the templating on the client side:

```
var $template = $('<li></li>');
var promise = $.getJSON(
  url: '/item/filter',
  data: {
      price: $('#price').val()
  },
  success: function(data) {
    $.each(data, function( index, value ) {
      $("#item_list_wrapper").append( $template.clone().text(value));
    };
  },
  error: function(){
    alert('error');
  }
)

```

Or use a `js.erb` template:

```
var promise = $.ajax(
  url: '/item/filter',
  data: {
      price: $('#price').val()
  },
  dataType: 'application/javascript',
  error: function(){
    alert('error');
  }
)

```

You can also use Rails UJS to send the ajax request by adding the `data-remote="true"` to the form (usually done by adding `remote: true` to the form helper options).

```
# defaults to the js format
# set "data-type" => :json to send JSON instead
<%= form_tag('/item/filter', remote: true) %>
  <%= number_field_tag(:price) %>
  <%= submit_tag 'Filter items' %>
<% end %>

```

You need to setup your controller to respond to the `js` format:

```
class ItemsController
  def filter
    # ...
    respond_to do |format|
      format.js
    end
  end
end

```

---

```
// app/items/views/filter.js.erb
$("#item_list_wrapper").html("<%= escape_javascript(render partial: 'item/item_list') %>");

```
I think it may have to do with not passing in the `data` to your partial. Try changing views/item/item\_list.erb to

`<% items.each do |i| %>
 something
<% end %>`

then call it in your view: 

`<%= render partial: 'item/item_list', locals: { items: @items } %>`

then finally pass in data to the partial using JS: 

`$("#item_list_wrapper").html("<%= escape_javascript(render partial: 'item/item_list', locals: { items: data }) %>");`

Having said all that, I'd also recommend learning to use remote => true to simplify your js. I've found this guide straightforward: <https://coderwall.com/p/kqb3xq/rails-4-how-to-partials-ajax-dead-easy>