Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
use a parameter from typescript in template?

I have the following a computed property to check wether a user is more active of on social media or on social professional network

mediaOrSocial() {
  if (this.socialMedia) {
    const postLikes = this.socialMedia.postLikes;
    return postLikes === 30 || this.postLikes !== 30;
  } else if (this.socialPro) {
    const postLikes = this.socialPro.postLikes;
    return postLikes === 30 || this.postLikes !== 30;
  }
},

my question is can I borrow the variable postLikes in template to make a condition on string interporlation in template {{ }} ?

exp {{ postLikes > 100 ? 'influencer' : 'not enough visibility' }}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!