Created
December 18, 2016 05:04
-
-
Save rahulsahay19/e328b604709ba0ab68c43d5de4aeb11c to your computer and use it in GitHub Desktop.
movieApp
This file contains 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
define("movieApp",["movieManagement"],function(movieManagement){ | |
/* event handlers */ | |
// Its good idea to prefix private methods with _ | |
function _registerEventHandlers() { | |
$("#new-movie-button").on("click", movieManagement.add); | |
$("#delete-all-button").on("click", movieManagement.clear); | |
$("#save-button").on("click", movieManagement.save); | |
$("#movie-list").on("click", ".delete-button", movieManagement.remove); | |
} | |
return{ | |
init:function(){ | |
_registerEventHandlers(); | |
movieManagement.render(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment