Hi,
You can't do it in this way, try to do something like that:
<template is="dom-if" if="*{{myTestFunction(user.isAuthenticated,user.isAdmin)
}}*">
<h2>Hello [[prop1]]</h2>
<form id="formLogout" is="iron-form" action="/security/deauthentication"
method="post">
<paper-button raised on-tap="doLogout">Sair</paper-button>
</form>
</template>
<script>
Polymer({
is:"your-component",
properties:{
prop1:{
type:String
},
...
},
*myTestFunction: function(isAuthenticated,isAdmin){ return isAuthenticated
&& !isAdmin; }*
})
</script>
Le samedi 3 septembre 2016 03:01:11 UTC+2, [email protected] a écrit :
>
> Hi all,
>
> I am trying to create a template dom-if with two conditions, but not
> working, any helps ?
>
> See my code:
>
> <template is="dom-if" if="{{user.isAuthenticated && !user.isAdmin}}">
> <h2>Hello [[prop1]]</h2>
> <form id="formLogout" is="iron-form" action="/security/deauthentication"
> method="post">
> <paper-button raised on-tap="doLogout">Sair</paper-button>
> </form>
> </template>
>
>
>
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/bcbb4bba-6f5f-4e36-b1c0-b4cf0865bce1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.