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
1
vote
1 answer
Copy all attributes from custom element into template in Aurelia
When you are creating a custom element in Aurelia, is there a way to take all of the extra attributes that aren't bound and copy them to a specific element inside the template. For example, say I create a custom element called "my-custom-element"…

John White
- 19
- 3
1
vote
1 answer
How to use static methods in view templates
I want to use static class constants in my view template
Javascript
class FilterModel {
static const FILTER_TYPE_STRING() {
return 'string';
}
}
HTML

Mike Reiche
- 382
- 3
- 12
1
vote
1 answer
Aurelia: Is there any option / decorator to restrict an attribute to a specific element
Hi I have created a custom element named as 'panel' and a custom attribute 'panel-type'. I want to restrict this 'panel-type' can be used only in 'panel' element. Is there any way to do that?

Tuhin
- 3,335
- 2
- 16
- 27
1
vote
1 answer
Aurelia compose with globalResources
Our plan is the following: A dashboard with webparts. We plan on develop many different "webparts" (as custom elements), and later, based on role or preferences we will show just a selection of the availible webparts.
Say I have the following custom…

Larsi
- 4,654
- 7
- 46
- 75
1
vote
1 answer
How to tear down an enhanced fragment
I am working on an existing SPA where we replace components with Aurelia components step by step. We use the enhance API of the TemplatingEngine. That works pretty well but we also need to tear down those enhanced fragments (remove event listeners,…

Sébastien Roch
- 23
- 3
1
vote
2 answers
Repeating with custom elements performance issues in IE
We have some performance issues with IE10/11. The following plunker explains some of our degrading performance while repeating table rows with custom elements.
Plunker Example
code
In this plunker example, we get a total of 68 ms in chrome to…

Anders
- 878
- 1
- 9
- 20
1
vote
0 answers
is it necessary to define a template in a separate file?
Is it possible to compose a template defined in the same file, like the following. Or is it required that the composed template be contained in a separate file?
…

Doug Kent
- 865
- 2
- 9
- 20
1
vote
1 answer
Difference when using '@containerless' on VM and 'containerless' in HTML view on custom elements
I'm seeing weird behaviour when using containerless functionality for aurelia components. We're creating custom elements for in SVG container, which required us to use containerless tag to strip the custom element tags before adding it to the DOM,…

Henry
- 21
- 3
1
vote
2 answers
Inline template in custom aurelia component
In aurelia, for views I can supply an Inline template by just implementing the getViewStrategy method and returning an InlineViewStrategy in the ViewModel. But this just works for Views, not for custom elements. Is there a similar way to supply an…

Daní
- 355
- 1
- 17
1
vote
1 answer
Is replaceable attribute obsolete in aurelia 1.0?
I was under the impression that slot superseded replaceable, but I've been told replaceable was reintroduced in the 1.0 release, is that true?

Meirion Hughes
- 24,994
- 12
- 71
- 122
1
vote
1 answer
Why bindable decorator is not respected when a custom element rendered with compose
It is possible to pass attributes to Aurelia custom element with @bindable decorator:
export class ItemCustomElement {
@bindable model: Item;
}
Why custom elements rendered by are treated differently,…

zakjan
- 2,391
- 1
- 19
- 29
1
vote
1 answer
Creating elements in Aurelia
I'm trying to create an Aurelia element inside of another element. I'm using the docking framework from phosphor and when I dynamically create a panel I want to add a component which I've build using Aurelia.
For example: I have a very simple…

Mr. Baudin
- 2,104
- 2
- 16
- 24
1
vote
1 answer
Customizing Aurelia to use .cshtml
I found a very helpful article showing how to use Razor partials (cshtml) with aurelia. However, I could not get the code to run and learned from RobEisenberg comment that
ConventionalViewStrategy.convertModuleIdToViewUrl
had been deprecated. He…

Bridget Arrington
- 444
- 7
- 22
1
vote
1 answer
Accessing DOM elements and composition lifecycle for non-viewModels in Aurelia
I have an application that is closely tied to the DOM. I need to keep track of the size and position of the elements that represent the objects behind them.
myViewModel.js
export class MyViewModel {
// my root view model has important…

Matthew James Davis
- 12,134
- 7
- 61
- 90
1
vote
1 answer
Aurelia: Multiple Slots in Template?
Is it possible to have multiple slots in a custom component?
i.e.

Meirion Hughes
- 24,994
- 12
- 71
- 122