Skip to content

Instantly share code, notes, and snippets.

@juliozuppa
Created April 20, 2017 14:11
Show Gist options
  • Save juliozuppa/034708f8d51971909b3ae16ff8a22b95 to your computer and use it in GitHub Desktop.
Save juliozuppa/034708f8d51971909b3ae16ff8a22b95 to your computer and use it in GitHub Desktop.
// 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