Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ws= new websocket("ws:/*********")
- ws.onmessage=function(message)
- {
- if(message)
- {
- if(message.type=="weather")
- {
- $state.go("Index.weather",{weatherObj:message});
- }
- if(message.type=="temperature")
- {
- $state.go("Index.temperature",{tempObj:message});
- }
- if(message.type=="humidity")
- {
- $state.go("Index.humidity",{humObj:message});
- }
- if(message.type=="rain")
- {
- $state.go("Index.rain",{rainObj:message});
- }
- etc..
- }
- }
Add Comment
Please, Sign In to add comment