Refactor examples in forms.md #93

Closed
bengitscode opened this Issue Apr 3, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@bengitscode

bengitscode commented Apr 3, 2017

The object returned can be used to validate the form data.

in api.js

```js
'use strict';

const ajaxDefaults = {
-  url: 'http://localhost:3000',
+ -  url: 'http://localhost:7165',
};

const myRequest = (data, success, fail) => {
  $.ajax(Object.assign({ method: 'POST', data }, ajaxDefaults))
  .done(success)
  .fail(fail);
};

module.exports = {
  myRequest,
};

@gaand gaand changed the title from Update url port in forms.md example to Refactor examples in forms.md Apr 4, 2017

@gaand

This comment has been minimized.

gaand commented Apr 4, 2017

☝️ is not how the browser template is used anymore.

@Jcornmanhomonoff

This comment has been minimized.

Contributor

Jcornmanhomonoff commented Jun 20, 2017

@gaand says closing as obsolete
form validation here: ga-wdi-boston/jquery-ajax-patch#24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment