Replies: 1 comment
-
Duplicate of this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As demonstrated in this codepen, the parent scope is not accessible from within the
init()
function ofAlpine.data()
.However the parent scope is present when the
x-init
directive is used as demonstrated here.Expected behaviour: The
init()
function should behave likex-init
and have access to the parent scope.Actual behaviour: The
init()
function does not have access to the parent scope.Beta Was this translation helpful? Give feedback.
All reactions