I'm facing an issue with setting the submit button value dynamically using Angular.js. The code I've written below explains my problem.
<body ng-controller="MainCtrl">
<input type="submit" value="{{ !model ? 'reset' : model}}" />
</body>
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.model = "Create new order";
});
My requirement is that when there is no value assigned to $scope.model
, the button name should reset.