aurelia / aurelia/templating

Nested templates not resolving

Open
#493 13 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
113
Forks
101
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a bug report**

* **Library Version:**
1.0.7

**Please tell us about your environment:**
* **Operating System:**
Windows 10

* **Node Version:**
4.6.0

* **NPM Version:**
3.10.9

* **JSPM OR Webpack AND Version**
webpack 2.1.0-beta.22
* **Browser:**
all

* **Language:**
TypeScript 2.0.9

**Current behavior:**
As described [here](http://stackoverflow.com/questions/40536509/aurelia-nested-template-replace?noredirect=1#comment68338108_40536509) nested templates do not resolve as expected. Shortcut to gist: [here](https://gist.run/?id=a52a0c17d0f7bae22b9ea1987ddc5583)

**Expected/desired behavior:**
If a template has a template both should be resolved.

* **What is the motivation / use case for changing the behavior?**
While the templating is nice and easy to use restricting templates to a single resolution (i.e. only 1 level of templating can be resolved) will limit the extensibility of plugins. It also goes against DRY principles as you'd have to recreate the entire template if you only wanted to change a small part. In the gist above you can see the unfortunate design pattern needed to append the grid's data with bad-app.

Contributor guide

Open the contributing guide

Research direction

Reproduce the nested-template case from the linked Stack Overflow report and gist using the reported Aurelia, webpack, Node, and TypeScript versions. Trace the template-resolution entry point, then verify that a template containing another template resolves both levels and that existing template behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript, webpack
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.