As in Vue.js assign the value obtained from the props variable?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
12 views
Tell amp-TA how to assign an object received from the parent component via props variable in the data? I tried to use v-bind-html template but the value of a variable when getting data from outside is not changed.
by | 12 views

2 Answers

0 like 0 dislike
Why not use in the template the value of props, instead of to suffer with change tracking, etc.?

Well and so, you can certainly use a watch to watch for changes props's, and reassign whatever you need.
by
0 like 0 dislike
And what does it do? Because the values from the props negativny. Through watch https://codepen.io/VladIT4/pen/MGJwGO?editors=1010

UPD:
how to assign object

The object is even easier, because it is a reference type, then watch to do. The relationship is two sided. https://codepen.io/VladIT4/pen/VxPLVo?editors=1010 but it is better not to do that, we need an explicit relationship between the components, through the v-bind and event.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Sep 5, 2019 by kirill-93
0 like 0 dislike
2 answers
asked Aug 10, 2019 by kirill-93
0 like 0 dislike
2 answers
asked Jul 4, 2019 by kirill-93
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
35,573 users