Conversation
|
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1348 +/- ##
==========================================
+ Coverage 20.32% 20.58% +0.27%
==========================================
Files 8 8
Lines 965 967 +2
Branches 352 352
==========================================
+ Hits 196 199 +3
+ Misses 769 768 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@bigopon from your post in Aurelia discourse
I'm not exactly sure what you mean with regards to my code, can you elaborate? is it because of this code below? |
|
@ghiscoding
I meant this code And for
I meant your |
|
@bigopon so are there any code that I can use that would work then? This util was just a helper for the end user to easily create a component |
|
immediately it can be worked around using |
|
@bigopon Yeah I would rather find a workable temp solution until you make another release, so you meant something like this? targetElement.innerHTML = `<${def.name} model.bind="bindableData.model" ${addonBindable} ${gridBindable} ${dataViewBindable} ${parentBindable}></${def.name}>`.trim();
delete (targetElement as any)['$au'];
return await this.au.enhance({
host: targetElement,
component: { bindableData },
container: this.au.container.createChild().register(AppTask.creating(() => { }))
});that doesn't seem to help since I'm still getting the same error it seems. There's probably a cache somewhere? dom.node.ts:31 Uncaught (in promise) Error: Node already associated with a controller, remove the ref "au:resource:custom-element" first before associating with another controller
at set (dom.node.ts:31:15)
at _Controller._hydrate (controller.ts:407:5)
at app-root.ts:132:20
at onResolve (functions.ts:433:10)
at app-root.ts:131:14
at onResolve (functions.ts:433:10)
at new AppRoot (app-root.ts:94:28)
at _Aurelia.enhance (aurelia.ts:77:34)
at AureliaUtilService.createAureliaViewModelAddToSlot (aureliaUtil.service.ts:20:28) |
|
Ahh yes my bad, should be deleting the property inside $au, not the object itself. It would be the |
|
Awesome that works and is a good temp solution to upgrade, thanks a lot 🚀
Side note, I was a little surprised to see you hijack the DOM element that way, it probably make sense though since that is the element being the target to the enhancing, but still was a surprise to me. Are there any Type helper instead of using ahh reviewing your PR code and I guess this is what I should use |
No description provided.