-
Notifications
You must be signed in to change notification settings - Fork 11
Unreliable data passing to component. #173
Comments
Data passed using directives (v-with/paramAttributes) are available after compilation of DOM. Maybe you are calling |
I'm trying to do more or less this: pass down the So, I have both a few methods triggered with |
Well, this still sounds very abstract and I don't see a way to triage the problem without seeing real code. Even if you can't reproduce the problem in a fiddle, showing what you are trying to do would still help. |
@yyx990803 I think just found out what triggers my problem. JSFiddle: http://jsfiddle.net/bk0ngqfp/1/ After 2 seconds, It only seems to be a problem if |
Thanks for the fiddle, this has been fixed in |
Got it. Thanks for the quick fix! |
I have a few nested components in the following fashion:
component (different lists) > component (the list) > component (list item)
, with a combination ofv-component="{{ currentView }}"
andv-repeat
. I also passed down a few additional parameter usingv-with
(also triedparamAttributes
) all the way from the top most layer to the bottom.The problem is that sometimes I cannot access those parameters passed down from
v-with
. I have not isolated the source of the problem, and I will see if I can put them in jsfiddle's (or find out what I did wrong).I have a method that uses a
v-with
variableusername
, and the following will both logundefined
.Unless I do either of theses:
Add the following
created
to the component:This results in
this.username === username
andthis.$data.username === undefined
.Refresh. I don't really understand why it'd be different between a fresh load and a refresh, but the same problem doesn't appear in a refresh. Update: the refresh has nothing to do with the problem; the application was simply in a different state.
The text was updated successfully, but these errors were encountered: