-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to resolve directive #603
Comments
This is an intended change, but probably should be more explicitly documented. Basically any markup that is in the parent's template will be compiled in the parent's scope - this includes directives written on the component node, and content that's going to be transcluded. So in your example the |
Oh, so I'm falling though the cracks for now :) If I understand well, this will not work at all in the next release? Since I use Vue, I've always attached my components settings with directives (owned by the component), this change will surely brake my workflow.
What are your thoughts? How could I achieve the same thing without hacking around child references? |
The recommended interface for a component is using // video component
video: {
paramAttributes: ['url', 'onended'],
template: '<video v-src="url" v-onended="onended"></video>',
replace: true
} Then when using it: <video v-component="video" url="page.videoUrl" onended="page.next"></video> The reasoning behind this is so that the only thing the parent component needs to know about a child component is its |
Custom directive in a sub-component fail to resolve if the directive is on the same node that call the component who owns the directive.
[Vue warn]: Failed to resolve directive: test
Here is a fiddle. This code use to work with previous versions of Vue (even
0.11.rc1
)The text was updated successfully, but these errors were encountered: