Here i want to access a variable or a list of variables which is passed when initalizing a new view from its corresponding template.
Code example
Creating a list view
@Taskit.module "Tasks.List", (List, Taskit, Backbone, Marionette, $, _) ->
class List.NewTask extends Taskit.Views.ItemView
template: JST["backbone/taskit/tasks/tasks/list/_templates/new_task"]
Template for the above list view
<div id="new-task-form">
</div>
Initializing the ItemView
view = new Taskit.Tasks.List.NewTask
project_id: "project_id"
Here my question is how can i access the "project_id" variable from its template.
<%= project_id %> #is not working
In Backbone it can be achieved by
$(@el).html(@template({task: @model, project_id: "project_id"}))