-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add attribute with no value? #41
Comments
This depends if you are in XML or HTML5 mode. $twital = new TwitalLoader($loader);
$twital->addSourceAdapter('/\.wsdl$/', new XMLAdapter()); // handle .wsdl files as XML
$twital->addSourceAdapter('/\.htm$/', new HTML5Adapter()); // handle .htm files as HTML5 |
I configured the source adapter to use HTML5 as you suggested. However I still receive this error if I do not add a value to the "selected" attribute:
|
This crashes: |
I ran into an issue here:
<option t:for="language in languages" value="{{language['code']}}" t:attr="language['code'] == userLang ? selected='' ">{{language['name']}}</option>
How does one conditionally add a 'selected' attribute with no attribute value? Since that's how it's usually defined, by just existing, and not having any particular value.
If I use this:
t:attr="language['code'] == userLang ? selected
(no equals sign or value)
it crashes
and if I give it a null value
selected=Null
, it ends up giving it a zero length string in the tag like this:selected=''
This is nit picky but I want to know if it's possible with just using Twital.
The text was updated successfully, but these errors were encountered: