Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Issue in applying margin using angular "data-ng-style"

data-ng-style="{{SiteAssetStyleForShiftedAsset()}}"

data-ng-style="{'margin-right': SiteAssetStyleForShiftedAsset()}"

function SiteAssetStyleForShiftedAsset() {

        var isPPMJob = localStorage.getItem("IsPPMJob").toUpperCase();

        var shiftingAsset = $scope.addClassForShiftingAsset;

        if (shiftingAsset == "false"){
                    //alert("abc");
             return "10px";
                    //return { "padding-right:": "15px" };
        }
        else{
            return "50px";
        }
    }
 
PREVIOUS NEXT
Tagged: #Issue #applying #margin #angular
ADD COMMENT
Topic
Name
9+4 =