I have one form with three buttons edit update and cancel.Onload of the page I need to hide the update button.
When I click edit button edit should be hide and update should be displayed.
when I click on update I need to redirect some other page.
Hoe to do this?
<form id="show_details">
<label>Project Name</label>
<label><input type="text"></label>
<label>Client </label>
<label><input type="text"></label>
<label>Project Co-ordinator</label>
<label><input type="text" disabled="true" ></label>
<label>Client Co-ordinator</label>
<label><input type="text"></label>
<label>Resource</label>
<label><input type="text" disabled="true"></label>
</div>
</form>
<div class="row">
<span class="pull-right btnMarginTop">
<button class="btn btn-primary" id="projectDetailsEdit" ng-click="goEvent()">Edit</button>
<button class="btn btn-primary" id="projectDetailsUpdate" ng-hide="editMode=true" ng-click="goEvent()">Update</button>
<button class="btn btn-default" onclick="window.location.href = '/Project/ProjectList'">Cancel</button>
</span>
</div>
<script>
var app = angular
.module("intranet_App", [])
.controller(function ($scope, $http) {
$scope.editMode = false;
$scope.goEvent = function(){
$scope.editMode = !$scope.editMode;
if($scope.editMode){
$scope.editMode = false;
}else{
$scope.editMode = true;
}
}
})
</script>