AngularJS - Add computation value from a function to the scope
问题 I have two datepicker fields which is implemented using AngularStrap datepicker directives: http://mgcrea.github.io/angular-strap/. <input type="text" name="startDate" ng-model="startDate" data-date-format="dd/mm/yyyy" placeholder="DD/MM/YYYY" bs-datepicker /> <button type="button" class="btn" data-toggle="datepicker"> <i class="icon-calendar"></i> </button> <input type="text" name="endDate" ng-model="endDate" data-date-format="dd/mm/yyyy" placeholder="DD/MM/YYYY" bs-datepicker /> <button