I'm baffled here I've got a controller which looks like this..
angular.module('publicRegApp')
.controller('CompanyNameController', function ($scope) {
$scope.title = 'Title One';
$scope.onSearch = function(){
console.log("clicked");
$scope.title = "Title Two";
}
});
in my template I have:
<button type="submit" class="btn btn-default" ng-click="onSearch()">Search</button>
When I click the button the console log gets fired but the $scope.title doesn't change. I'm so confused please help :-(
type="submit"totype="button"