Subnet Calculator using Angular JS