Last active
          August 29, 2015 14:17 
        
      - 
      
- 
        Save lukasborawski/9087a53d02066710c86b to your computer and use it in GitHub Desktop. 
    MVC JavaScript App Structure
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var _userForm = { | |
| getElement: { | |
| d: $(document), | |
| f: $('.js-userForm') | |
| }, | |
| send: function() { | |
| var self = this; | |
| self.getElement.d.on('click', self.getElement.f, function(e) { | |
| e.preventDefault(); | |
| var t = $(this); | |
| requirejs(["formModel"], function() { | |
| var formModel = _formModel.post(t.parents('form'), t); | |
| }); | |
| }); | |
| return self; | |
| } | |
| } | |
| var userForm = _userForm.send(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment