*myTestFunction is called only when one argument is passed. On passing two 
arguments, the function isn't called.*On Monday, September 5, 2016 at 
3:24:05 PM UTC+5:30, [email protected] wrote:
>
> 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/1fc96e73-2d99-442d-b467-b53c9c6592c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to