0

I'm trying to build an ionic2 application,the shedule application send notifications to users,i want to do something like this but it didn't worked

<div *ngIf="beacon.uuid=='ebefd083-70a2-47c8-9837-e7b5634df557'">{{schedule("ok","okkk")}}</div>
3
  • what is this value?ebefd083-70a2-47c8-9837-e7b5634df557 Commented Mar 30, 2017 at 10:37
  • can you add the schedule function ? Commented Mar 30, 2017 at 10:41
  • the if should be in your .ts file, avoid mixing view, and function calls, also you might want to share the complete code (.ts included) for us to test. you can use plnkr.co for that Commented Mar 30, 2017 at 10:49

1 Answer 1

1

Change you code to this :

<div *ngIf="beacon.uuid==='ebefd083-70a2-47c8-9837-e7b5634df557'">{{schedule("ok","okkk")}}</div>

Use === instead of == , in Angular 2.

Sign up to request clarification or add additional context in comments.

1 Comment

You can try it in your code , with == , and its most preferable that use === instead of == in angular 2. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.