S
S
SLaMeeR2017-10-16 21:16:33
JavaScript
SLaMeeR, 2017-10-16 21:16:33

Why is the code not displayed everywhere?

Hello, the essence is this:
I am developing a mobile application on IONIC, and here is a code that displays a vip picture in the messages tab near the user's nickname, if he has one.
The code

<img src="https://image.flaticon.com/icons/svg/263/263399.svg" width="15px" ng-if="p.premium == 1">

If this code is inserted, for example, into the profile tab or guests, it does not matter, then the VIP picture is not displayed.
Why is that?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Immortal_pony, 2017-10-16
@Immortal_pony

And what about PHP? The p.premium
variable is obviously not equal to one elsewhere. The application code needs to be improved.

P
Ptolemy_master, 2017-10-17
@Ptolemy_master

I agree with the previous speaker, most likely, equality is not respected. To know for sure, paste the additional code and you will see

<img src="https://image.flaticon.com/icons/svg/263/263399.svg" width="15px" ng-if="p.premium == 1">
=={{p.premium}}!!

Equals and exclamation marks to make it easier to see the meaning

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question