Created
August 29, 2015 14:39
-
-
Save gmmorris/5aa1d72f823df7807bf4 to your computer and use it in GitHub Desktop.
Gists for my article on the LH rewrite
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
var StateController = new function(){ | |
this.GetState = function(){ | |
$(document).trigger('navestate:giveMeTheState',this) | |
}; | |
this.hereYouGo = function(navState){ | |
// Do something with navState | |
}; | |
}; | |
var NavState = new function(){ | |
var myNaveState = { nav : 'state' }; | |
$(document).on('navestate:giveMeTheState',function(e, giveItTo){ | |
giveItTo.hereYouGo(myNaveState); | |
}); | |
}; | |
StateController.GetState(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment