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;

var user_type = $sessionStorage.user.type;

if(user_type == “standard”) {
} else if(user_type == “tenant”) {
} else if(user_type == “landlord”) {
} else if(user_type == “agent”) {

//we need to add the user id to all the myproperties links
var currenthref = $(".myproperties").attr(“href”);
currenthref = 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…