javascript - Correct way to reference up to date Vue delimiters in a component -
i'm authoring component vue.js applications , have run problem if delimiters changed in application code, plugin template not work correctly (this picked because alter vue delimiters not conflict twig template tokens).
my component sake of example looks like:
vue.component('example', { template: 'something {{ normal_delimiters }}' });
assuming standard <script>
includes in application:
<script src="path/to/vue.js"></script> <script src="path/to/my-component.js"></script> <script src="path/to/application.js"></script>
referencing vue.config.delimiters
option in component code yield default ({{ }}
) aren't changed until application code farther down page.
there few roads invest in looking @ using ready
handler on component , somehow updating template string, forcing delimiters changed first piece of javascript in page (very bad experience) etc, thought i'd ask if there "correct" way this.
it looks solution discussed abandoned.
it doesn't accessing or modifying this.$template
inside of lifecycle hooks has effect.
the release of vue 2 solves problem entirely having delimiters configurable on per-component basis.
Comments
Post a Comment