Hi, Try with "==="
Regards, *Dakshika Jayathilaka* PMC Member & Committer of Apache Stratos Senior Software Engineer WSO2, Inc. lean.enterprise.middleware 0771100911 On Tue, Sep 15, 2015 at 1:31 PM, Dinithi De Silva <dinit...@wso2.com> wrote: > Hi Dakshika / Jerad, > > I am trying to retrieve the tenantId stored in a session variable into > handlebars js file. The variable "teananID" has the value of the tenant id > (Ex: -1234) but when comparing it with -1234 or any other integer the > condition is always false. > > Please find the piece of code in my handlebar js file below. > > {{#ifCond tenantID "==" -1234}} > <p>Test1</p> > {{else}} > <p>Test2</p> > {{/ifCond}} > > > Please note that I have tried printing the variable using console.log and > it gave the value -1234. And also we can compare two strings using the same > way without any issue. > > What could be the missing part in the condition to always become false? > > Thanks. > -- > *Dinithi De Silva* > Associate Software Engineer, WSO2 Inc. > m:+94716667655 | e:dinit...@wso2.com | w: www.wso2.com > | a: #20, Palm Grove, Colombo 03 >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev