Use Angular's isArray in favor of jQuery's.
Persist sidebar visibility between page reloads.

Used the ngCookies module of angular to store the variable in a cookie.