Create Vacancy

Angular expression evaluates to equal

I would like to do something like this.

<h3 ng-show="{{mode == 'create'}}">Create Vacancy</h3> <h3 ng-show="{{mode == 'edit'}}">Edit this Vacancy</h3> 

Where $scope.mode is either "create" or "edit."

How should I do it? Nothing I'm trying works.

+4
source share
1 answer

ng-show is the evals expression itself, so do not use interpolated text. Update your code to:

 <h3 ng-show="mode == 'create'">Create Vacancy</h3> <h3 ng-show="mode == 'edit'">Edit this Vacancy</h3> 
+22
source

All Articles