How can I compare two scope values using angularjs in HTML only?

for example:

<div ng-if="place.id = place.reference.id"> show if equals</div>

I want this to cover certain scanrios

有帮助吗?

解决方案

You are assigning something this way...

To check for equality you need == or ===, but 3 should be used as Doug says -

"If there is every anything that causes unwanted effects and can be solved by something else, use the something else..."

Ok maybe he didnt say that exactly but you get the point....

<div ng-if="place.id === place.reference.id"> show if equals</div>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top