Skip to content

Instantly share code, notes, and snippets.

@iCoolchar
Created April 25, 2017 09:20
Show Gist options
  • Save iCoolchar/2e847365fc07bf1cb07668caaa085348 to your computer and use it in GitHub Desktop.
Save iCoolchar/2e847365fc07bf1cb07668caaa085348 to your computer and use it in GitHub Desktop.
angular delete on row and take effect at once
var idx = $scope.adverts.indexOf(adv);
if (idx > -1) {
$scope.adverts.splice(idx, 1);
}
notify("删除成功!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment