Yii Framework Forum: Polyfill for Vuejs - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Polyfill for Vuejs

#1 User is offline   hutch90 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 14-February 18

Posted 05 June 2018 - 03:01 PM

I am working on a website that uses the Yii1 framework. We have started using Vuejs to make certain tasks a little easier. One problem, though, is that IE11 does not accept all the syntax that other browsers do. The specific problem I'm running into is that the template can be put between ``, but IE11 does not accept that. Of course, I could use single quotes and escape single quotes inside of the template, but that is very tedious. I have heard that using babel polyfill can correct this, but I'm having a hard time figuring out how to use it with Yii.

Example:

Vue.component('forum-example', {
	props: ['forum', 'comments', 'question', 'title'],
	template: `
	<div class='forum-example-container' v-bind:data-question-id='question.id'>
		<question-details
			@toggle-expanded='expanded = !expanded'
			:question="question"
			:comments="comments"
			:forum="forum"
			:title="title"
			:key="question.key">
		</question-details>
	</div>
	`,
	data: function() {
		return {
			expanded: false,
		}
	},
});

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users