我是Angular js的新手。我正在嘗試顯示錯誤消息視圖toaster()
。我在谷歌搜索,但我沒有找到正確的結果。當我點擊cancel()
按鈕時,我會收到一個錯誤,說烤箱未定義爲。有沒有其他方法來定義烤麪包機
HTML:<button class="btn btn-secondary" ng-show="editMode" ng-click="toggle_cancel()"> Cancel </button>
角JS:
$scope.toggle_erase = function(information){
toastr.toggle_erase('Are you sure want to delete ?')
$scope.hideDelay(3000):
}
你需要在代碼中包含'toastr'。說明在這裏 - https://github.com/CodeSeven/toastr –