Sometimes the classList will be undefined.

''' file:///android_asset/www/lib/ionic/dist/js/ionic.bundle.js: Line 3115 : Uncaught TypeError: Cannot call method &#x27;contains&#x27; of undefined '''
This was the error log in my product.