Part of the Aurelia platform and contains an extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.
Questions tagged [aurelia-templating]
87 questions
28
votes
2 answers
Aurelia: sanity check template html?
I recently asked why self-closing elements do not work in Aurelia's templating system; and it was because self-closing elements are invalid html.
Yet, today I again made the same mistake (with widgets this time) and was left scratching my head why…

Meirion Hughes
- 24,994
- 12
- 71
- 122
9
votes
4 answers
In Aurelia, can I bind a function from my containing view-model to be called by my custom element?
I have a custom element which will take user input, and on [save] button click, I want to pass information to the parent view-model so I can send it to the server and move to the next section. I'm going to simplify this for example's…

Anj
- 974
- 2
- 10
- 22
8
votes
2 answers
Aurelia - multiple Enhance statements
Updated with solution (28.03.2017):
http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/app-configuration-and-startup/8
Have updated Aurelia docs with solution (scroll down a little).
Special thanks to Charleh for…

Alex Sidorenko
- 546
- 1
- 3
- 14
6
votes
1 answer
In Aurelia, can a slot be used in a repeat.for binding?
I'd like to create a custom element that loops through an array and applies the to each item in the array. For example, the view template of the custom element would contain something like:
…

Glen Hughes
- 4,712
- 2
- 20
- 25
6
votes
4 answers
What are the differences between using and ? What are some scenarios where one is more suitable?
A teammate and I have been building an application in Aurelia for the last four months, and he and I have been creating and using components in these two different ways. I want to have some consistency and change everything over to one of the two…

Anj
- 974
- 2
- 10
- 22
5
votes
2 answers
Aurelia - boosting performance of repeat.for view rendering
I have a so called chat view that basically consists of a repeat.for that loops over all the messages and renders the message views using .
The problem is that it becomes quite slow once the message count exceeds 50 and the user navigates…

Tarps
- 1,928
- 1
- 11
- 27
4
votes
1 answer
How to force Aurelia to destroy/recreate a view/viewModel pair without using router
It came as a surprise when starting out with Aurelia that if.bind doesn't result in a child view/viewModel getting destroyed. It does go through a bind/unbind attached/detached cycle, and I can see how this makes sense for some scenarios. But I…

FunkyCodeMonkey
- 59
- 7
4
votes
1 answer
Cannot call function in view model from element
When I click button #btn1 or #btn2 Save, the console says that:
Uncaught Error: save is not a function
getFunction @ aurelia-binding.js:1971
evaluate @ aurelia-binding.js:1565
callSource @ aurelia-binding.js:4989
(anonymous function)…

drakid
- 320
- 4
- 13
3
votes
1 answer
Aurelia: How do I inject a component template in existing html?
As you can see in the below image, it is not working out for me. The template html appears above the table and not below the header as I expected.
What I am trying to do is create an optional filter component that works with the table data. When…

Tom Aalbers
- 4,574
- 5
- 29
- 51
3
votes
3 answers
AureliaJS - Call child function from parent
I'm using AureliaJS to build a dynamic forms scenario, where I have a parent form with the gross operations needed and multiple child's form's, that change based on user input.
These child's form's have only two specific things themselves. Their…

César Afonso
- 73
- 7
3
votes
2 answers
Change element type at runtime
Is it possible to dynamically define the type of an element inside a custom components template at runtime?
I'd like to avoid duplication of the inner contents of the button and a element in the following example:
3
votes
2 answers
Aurelia - which view port is the view-model being rendered in?
I have a two-column layout setup, the two columns have very similar functionality, so the very same view-model is being reused. Hovewer, the rendering might slightly differ depending on which side is it being rendered, so wondering how is it…

balazska
- 963
- 6
- 25
3
votes
1 answer
Simple DOM manipulation in custom aurelia atttribute
I am experimenting with Aurelia custom attribute by testing a simple DOM manipulation.
To my surprise performing the manipulation by appending and ellipse node to the parent svg node does modify the HTML but doesn't render the ellipse.
Manipulating…

Etienne Theoret
- 33
- 3
3
votes
2 answers
How to evaluate an Aurelia interpolation expression outside a view?
In Aurelia, let's say I have a string containing an interpolation expression "Today at ${value | date: 'time'}" and some object representing the binding context for this { value: new Date() }.
Is there any way to, outside of a view, just take that…

Thomas Darling
- 63
- 6
3
votes
0 answers
Aurelia In-page templates
Wondering if anyone has tried to turn a piece of markup returned by a server into a reusable Aurelia template?
Let me explain what i'm talking about using a simple example. Let's say a sever renders a page with a list of products for a category.…

tszarzynski
- 604
- 7
- 15