Cannot read property 'contains' of null ionic.bundle.js:26794

Error as above, i’m doing ionic serve and have a “$state.go(‘tab.dashboard’);”

Was working fine. Can’t see what i’ve changed to make it not work!

Controller for dash is DashCtrl which is straight forward:

.controller(‘DashCtrl’, function($scope,$state,$localStorage,$sessionStorage) {

$scope.$session = $sessionStorage;
console.log($sessionStorage.user.email);

var user_type = $sessionStorage.user.type;

if(user_type == “standard”) {
$(".standard_user").toggle();
} else if(user_type == “tenant”) {
$(".tenant_user").toggle();
} else if(user_type == “landlord”) {
$(".landlord_user").toggle();
} else if(user_type == “agent”) {
$(".agent_user").toggle();
}

//we need to add the user id to all the myproperties links
var currenthref = $(".myproperties").attr(“href”);
currenthref = currenthref + $sessionStorage.user.id;
$(".myproperties").attr(“href”,currenthref);

})

Anybody come across this before?

Ok. Now its weird. If i clear the cache of my browser, the page loads. If i make a change to the page at all, it then breaks again…