Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.create = function(isValid) {
- if (isValid) {
- var article = new Articles({
- title: this.title,
- content: this.content
- });
- article.$save(function(response) {
- $scope.articles.push(response);
- });
- this.title = '';
- this.content = '';
- } else {
- $scope.submitted = true;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement