Created
April 20, 2017 14:11
-
-
Save juliozuppa/034708f8d51971909b3ae16ff8a22b95 to your computer and use it in GitHub Desktop.
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
// padrão módulo | |
var MYAPP = { | |
// definição dos namespaces | |
models: {}, | |
views: {}, | |
controllers: {}, | |
utils: {} | |
} | |
MYAPP.models.User = function (name, email, gender) { | |
this.name = name; | |
this.email = email; | |
this.gender = gender; | |
} | |
MYAPP.controllers.userController = (function (User) { | |
var user = new User('Julio', '[email protected]', 'M'); | |
return { | |
// coloca aqui as propriedades e métodos que deseja expor(tornar publico) | |
} | |
})(MYAPP.models.User); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment