Javascript export order #5324
-
My problem:
data return:
So if i want to get rating count, the wrapper base url trait value is "https://fakestoreapi.com/products/1" and the path of the dynamic-text is "rating.count". Then the script of the dynamic-text:
The script will add the attribute name "dynamic-text" to the text component, so the wrapper will select all the component base on that attribute, read then change the inner text. it work really good in the editor, but when i download the HTML, the problem is the script of the text is written after the wrapper, so the wrapper cant not detect the dynamic-text because the attribute is not set.
Any solution for this, or suggest a better way for me? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@artf can you help me, thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Xin chào, bạn cho mình xin source code tham khảo được không? |
Beta Was this translation helpful? Give feedback.
I've solved it by writing data pattern in custom trait, so the logic of the pattern applies before the logic of the wrapper. Thanks.