I am new on AngularJs and I want to see header when only checkbox value is true. I set its initial value false but header is showing in first running. My question is why header is showing in first time without any click?
var app = angular.module("myApp", []);
app.controller("myController", function($scope) {
$scope.myVar = "false";
});
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myController">
<form>
<input type="checkbox" ng-model="myVar">if u want to see header click this checkbox</input>
<h1 ng-show="myVar">show this if checkbox returned true</h1>
</br>
{{myVar}}
</form>
</div>