Closed doubleaa93 closed 7 years ago
Pass an Element
as the second argument to aurelia.enhance
to limit the enhancement. See http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/app-configuration-and-startup/8.
@EisenbergEffect this may be closed.
@Gheoan Sorry forgot to mention I am passing an element and the same problem applies
aurelia.enhance(document.querySelector('my-component')
In html
<body aurelia-app="main">
....
<div>
<my-component></my-component>
</div>
@doubleaa93, the aurelia-app
attribute on the body
element is not needed if you are using enhance
.
I'm submitting a bug report
Please tell us about your environment:
Operating System: Windows 7 64bit
Node Version: 6.10.1
NPM Version: 3.10.10
Aurelia CLI OR JSPM OR Webpack AND Version webpack 2.3.3
Browser: all
Language: Typescript
I'm using Aurelia to enhance an element on an existing page using aurelia.enhance which works fine but, aurelia parses the entire dom body and this page contains jquery templates like this
EDIT I'm passing an element to aurelia.enhance
aurelia.enhance(document.querySelector('my-component')
When the page loads aurelia has remove all the
${}
inside the jquery templates making the existing application not work correctly.Can I prevent aurelia from parsing the entire body, but to do starting from a certain dom element.