When a person clicks No on whether or not they want to trade in their car it is supposed to remove that element and add the other element asking if they have a car to trade in. However, when they click it does not remove the element but simply makes the car variable empty. It seems simple enough... don't know why it's not working.
<div class="inner-box" ng-if="car.length > 0">
<p class="lite">Would you like to trade in your</p>
<p class="heavy">{{car}} ?</p>
<a href="#" class="blue">Yes</a>
<a href="#" ng-click="car = ''">No</a>
</div>
<div class="inner-box" ng-if="car.length == 0">
<p class="heavy">Do you have a trade in ?</p>
<a href="#" class="blue">Yes</a>
<a href="#">No</a>
</div>
I've seen another question about this on here but their problem was that their nf-if wasn't a condition.
Just add a controller function for delete car
<div class="inner-box" ng-if="car">
<p class="lite">Would you like to trade in your</p>
<p class="heavy">{{car}} ?</p>
<a href="#" class="blue">Yes</a>
<a href="#" ng-click="deleteCar();">No</a>
</div>
<div class="inner-box" ng-if="!car">
<p class="heavy">Do you have a trade in ?</p>
<a href="#" class="blue">Yes</a>
<a href="#">No</a>
</div>
------JS---
$scope.deleteCar = function(){
$scope.car = '';
};