Pergunta

I recently update Dart to Dart SDK version 0.7.1.0_r27025 and have not been able to get conditional templates inside tables to work. The code I have at the moment is:

<td template if="loaded">
    <p>Loading</p>
</td>
<td template if="!loaded">
    <div>...</div>
</td>

However, if I run that in dartium and inspect the DOM all I see is

<td></td>
<td></td>

and I get a RangeError in the code that was generated by build.dart.

Has something changed in how dart handles conditional templates in tables in the latest release?

Foi útil?

Solução

I was able to fix this by doing

<td>
    <template if="!loaded">
        <p>Loading...</p>
    </template>
    <div id="my_id"></div>
</td>

It seems it is no longer necessary to use the template as an attribute in tables.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top