I have to show an error msg on unique validation check on my html page. I have set error msg on $scope variable. But I am not getting how to display error msg on html page.

This is my controller code where I am setting error msg like:

```
$scope.error=="Name already in use"

```

This is my html page where I want to show error message:

```
<!--I am showing msg like this but the poblem is when the page is being loaded {} comes. -->
<span class="error" ng-show="error"> {{error}}</span>

```

How to show error msg only when some error msg comes. Please suggest some way for this.

![enter image description here](https://i.stack.imgur.com/hQIab.png)