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
x-component tag example #49
Comments
Ok, I just realized this doesn't work with anonymous components. Those with just a view template file and no associated class. Does someone know how to get those working? |
The same way that you create an alias for the class based components - instead of passing a class, pass the name of a view. |
@ryangjchandler Thanks, but do you have this working? I get the following error:
This seems to be tightly coupled with the Laravel application in I did manage to get it working in the end, but not using the blade class in this repo. I had to create a fake version of the Illuminate\Contracts\Foundation\Application class and pass that as the 3rd parameter to my own version of the It's all very convoluted, but everything works now. |
Yeah, it's slightly annoying that it's tightly bound to the Laravel If would be nice if this library included an |
@jreviews Could you please share your convoluted solution where everything works? |
@lexdubyna I don't have it anymore, but this repo has a working example https://github.com/clickfwd/yoyo-blade-app You can see how to use it here https://github.com/clickfwd/yoyo-blade-app/blob/master/app/bootloader.php Ignore all the Yoyo stuff and use $blade->render to render your layout. |
@jreviews Thank you very much! Your solution works great! |
I put together a demo using this package that allows using the x-component tag syntax in template files.
https://github.com/clickfwd/blade-standalone-component-tags
Would love some feedback on whether this is a good approach or if someone has a better way to do it.
The text was updated successfully, but these errors were encountered: