質問

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