-
For
@noView
:Finally, it would appear that
@noView
and@processContent
have changed as well. I haven’t been able to migrate the following use case (i.e., the specific combination of the two decorators below):@noView() @processContent(false) export class TsiDxButton() { ... }
As you noted,
@noView
can now be achieved withtemplate: null
in the custom element options, though it’s a good thing that we can create a decorator@noView
to specify that.
- For
@processContent(false)
:
Thanks for explaining the intention. It can be achieved in v2 via the data property on the instruction of the custom element instance
As you noted you’ll delete theimport { resolve, IInstruction } from 'aurelia'; import { HydrateElementInstruction } from '@aurelia/template-compiler'; @processContent((node, platform, instructionData) => { instructionData.template = node.querySelector('dx-template'); }) export class DxSelectBox { constructor() { const { data } = resolve(IInstruction) as HydrateElementInstruction; const template = data.template; // do your stuff here } }
<dx-template>
after the extraction during the compilation, I think the above should suffice.
-
For the post itself:
… How do achieve this scenario in Au2? This was explicitly covered in Rob’s course, and I use it in our Au1 application with great success!
Thanks for the long detailed post, (and others). It may give some more good idea where in the doc we can improve, maybe a course is needed again. cc @dwaynecharrington .