Created
August 31, 2013 16:45
-
-
Save ckentq/6399349 to your computer and use it in GitHub Desktop.
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 pageChange = function(pageName){ | |
$timeout(function(){ | |
console.log("inTimeout"); | |
app=function(){ | |
console.log("not in Timeout"); | |
$rootScope.$broadcast("pageChanged",pageName); | |
}; | |
app(); | |
},1000); | |
} | |
return { | |
pageName:function(newPage) { //換分頁發出 | |
if(newPage){//page name = string or none | |
pageName= newPage; | |
pageChange(newPage); | |
}else{ | |
return pageName; | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment