Thursday, August 25, 2016

Angular JS Stop Dynamic Validation on Change Option of Select Dropdown

Angular JS Stop Dynamic Validation on Change Option of Select Dropdown

Code to stop the validation on dynamic update to the textbox or nay other elements.

< form name="$parent.balanceTransferForm" >
< select options="accounts" on-change="changeSourceAccount(value, $parent.balanceTransferForm)" ></ select  >
< /form >

$scope.changeSourceAccount = function(account, form){
$scope.balanceTransferPreValidateReqObj.transferAmount.value = "";
if(form!=null){
                form.$setPristine();
                form.$setUntouched();
        }
};

Wednesday, May 11, 2016

how to create or make a loading screen in html javascript

Here is the simple way to create or make a loading screen in html and javascript
Write two functions like below:
// This is to show the loading page / progress bar


function showProgress() {
    var scrollPos = (window.pageYOffset > $('html').scrollTop())?(window.pageYOffset):($('html').scrollTop()),
    imgYPos = scrollPos + (($(window).height() / 2 ) -30 ) ,
    overlayObj = $('
').height($(document).height())
                     .css('background-position', 'center '+imgYPos+'px');            
    $('body').append(overlayObj);
}
// This is to hide the loading page / progress bar
function hideProgress() {
    $('.pageLoadingOverlay').remove();
}

And the CSS for this code snippet is
.pageLoadingOverlay {
    height: 100%;
    width: 100%;
    display: block;
    z-index: 100;
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.5) url("../images/325.gif") no-repeat center center; 

}

Now you can call showProgress() when processing the screen and hide progress while closing the screen

Freecharge Coupon Code New User - Freecharge Coupon

Use below Freecharge Promo Code to recharge through Freecharge and get Rupees 50.

RMCJ7C5

Use this Freecharge Promo Code to recharge with minimum amount of Rs. 50 and get 50 to your Freecharge account.

Freecharge Promo Code: RMCJ7C5

To Get Rs. 50 as Freecharge Cash Back follow the process

Download Freecharge App or Login/Register with your Freecharge account

Click on Mobile Recharge

Recharge with Rs. 50

Use Promo Code RMCJ7C5

Proceed to pay with freecharge

Get Rs. 50 to your freecharge account.

You are Done...

Wednesday, April 6, 2016

How to set Android Home environment variables to your MAC OSx

How to set Android Home environment variables to your MAC OSx

When you try to create project using terminal from your MAC BOOK (MAC OSx), you end up getting an error saying:

Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.

To resolve this error, you need to set the ANDROID HOME environment variable. 
  • Make sure you install the android SDK installed in your MAC.
  • Navigate to the installed location of android SDK and copy the path.
    • EX: /Users/Madhavan/Library/Android/sdk
  • Open the terminal and export ANDROID HOME variable.
    • export ANDROID_HOME=/Users/Madhavan/Library/Android/sdk
  • Set the path variable to ANDROID_HOME.
    • export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Open terminal and write your command like below:

Madhavan-Subramanian-MacBook-Pro: Madhavan$
export ANDROID_HOME=/Users/Madhavan/Library/Android/sdk

Madhavan-Subramanian-MacBook-Pro: Madhavan$

export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools