How to use ng-disabled with multiple expression

You may have ran into this issue when trying to bind a submit button with multiple disable conditions. The easiest way to do this is to embed the variable checking in the html as follows:

Both variable must be false for the button to be disabled:

<button class="button" ng-disabled="(!data.var1 && !data.var2) ? false : true">
</button>

Either variable can be false for the button to be disabled:

<button class="button" ng-disabled="(!data.var1 || !data.var2) ? false : true">
</button>

Ionic App Starter Templates on Noodl.io and Ionic Marketplace

I recently published some of my Ionic Starter Templates that should speed up your new hybrid app development on Noodl.io and Ionic Market. All starters have been tested on both iOS and Android.

 

Screen Shot 2016-01-10 at 3.27.51 PMIonic Geolocation – A quick way to start a new geolocation enabled app

Ionic Phonebook – A very easy way to start your phonebook & contacts app

Ionic OAuth – A full app with a node.js backend to support user creation, session, login & social login

Ionic Login Session – A full stack app with node.js backend without the social login support

Also please leave a rating if you get one! many thnx =)