回答

0

您可以使用

vm.previousMonth = angular.copy((vm.viewDate.getFullYear() * 12) + vm.viewDate.getMonth()) - 1; 

//To get the previous month then to disable using this condition 

ng-disabled="vm.previousMonth === ((vm.viewDate.getFullYear() * 12) + vm.viewDate.getMonth()) - 1" 

檢查在這裏 http://plnkr.co/edit/NFI6tq?p=preview

+0

謝謝您的回答。我的意思是用'ng-show'隱藏按鈕。 – Muhammed

+0

當然,您可以使用與ng-hide –

+0

相同的條件。 – Muhammed