It’s great that our application is able to list bundles that already exist, but what about adding new ones? The right tool for this job is the venerable HTML <form> tag. Using a form, we can capture user input and process it by making a proxied call to the back-end APIs. Since the form is static HTML, we’ll put it in app/templates.ts. Open that file now and add this template.
|||export const addBundleForm = Handlebars.compile(`|
||| <div class="panel panel-default">|
||| <div class="panel-heading">Create a new bundle.</div>|
||| <div class="panel-body">|
||| <div class="input-group">|
||| <input class="form-control" placeholder="Bundle Name" />|
||| <span class="input-group-btn">|