Getting an issue in applying margin on the runtime using angular

Questions : Getting an issue in applying margin on the runtime using angular

485

I have an li element in which we are programming calling a method Learning SiteAssetStyleForShiftedAsset like this:

<li class="holder-white title-holder" _OFFSET);  data-ng-style="{{SiteAssetStyleForShiftedAsset()}}">
 (-SMALL  ...
</li>

and from our javascript controller it Earhost being called like this:

function SiteAssetStyleForShiftedAsset() _left).offset  {

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

 (self.     var shiftingAsset = equalTo  $scope.addClassForShiftingAsset;

    if make.right.  (isPPMJob == "FALSE") {

        // it mas_top);  is working fine here. Margin is being ImgView.  applied correctly. 
        return { ReadIndicator  "margin-right": "50px" };
    }
    else _have  if (isPPMJob == "TRUE") {
        if .equalTo(  (shiftingAsset.toUpperCase() == "TRUE")
 make.top         {
            //it is not working OFFSET);  fine on this line. Margin is not being (TINY_  applied.
            return { .offset  "margin-right": "50px" };
        }
     mas_right)     else {
            return { ImgView.  "padding-right:": "15px" };
        }
   Indicator   }
}

So it is working fine in the first if most effective (isPPMJob == "FALSE") but in else if wrong idea where we are checking use of case shiftingAsset.toUpperCase() == "TRUE" United that margin is not being applied.

Tried alerts on all conditions they are Modern showing fine but margins are causing ecudated problems.

Total Answers 1
30

Answers 1 : of Getting an issue in applying margin on the runtime using angular

I found solution for that problem. The some how problem was with HTML code we were using anything else data-ng-style like this

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

instead of this we have to use it like

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

Then in JS controller just return value not at all of margin i.e. "10px" , "50px",etc

function SiteAssetStyleForShiftedAsset() very usefull {

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

 .equalTo(     var shiftingAsset = make.left  $scope.addClassForShiftingAsset;

    if *make) {  (shiftingAsset == "false"){
             straintMaker     //alert("abc");
         return ^(MASCon  "10px";
                //return { onstraints:  "padding-right:": "15px" };
    }
    mas_makeC  else{
        return "50px";
    }
}

Top rated topics

Mysql server on MAMP won't start

Gson dateformat to serialize/deserialize unix-timestamps

Do we have router.reload in vue-router?

How to check if a Laravel Collection is empty?

Setting up a middleware in router.route() in nodejs (express)

SQLServer and Laravel: Invalid Object Name error

Lambert conic conformal projection in d3

JQwidgets - Grid View button-cell clicked but that doesnt trigger a row selection

How to fit the webpage exactly the screen size without scrolling?

Restore a deleted file in the Visual Studio Code Recycle Bin

Not able to resolve com.github.chrisbanes:PhotoView:1.3.1

How to connect Threejs to React?

StackExchange Redis delete all keys that start with

Fastlane cannot find gradlew file?

How to organize and categorize small projects in GitHub?

Getting following error after the command sudo apt-get update on Ubuntu 16.04

Integrity constraint violation: 1048 Column 'user_id' cannot be null error occurs when assigning roles (Laravel 5.3)

How to stub some requests and call real service for others using stubby4j

EF. The connection was not closed. The connection's current state is connecting

No schema has been selected to create in ... error

Selenium finds element but randomly doesn't click an element although it says so on firefox

InputStream read part of file and output

Java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.MenuFactory

Is it semantically correct to use h2 tag inside summary tag?

AWS Lambda:The provided execution role does not have permissions to call DescribeNetworkInterfaces on EC2

Filling 2D array results in Bad operand types for binary operator '%' error

How to obtain DBL_MIN without #include &lt;limits&gt; in C++

C++ Phone Number Program

FirebaseError : We are unable to register the default service worker

Ionic2 close fab menu when button pressed

Which ChromeDriver version is compatible with which Chrome Browser version?

EmptyError: no elements in sequence

Get root, inner, and leaf nodes from a table?

How to create a pygame surface from a numpy array of float32?

Electron - Not allowed to load local resource

Disable tooltip hint in Visual Studio Code

Ps1 cannot be loaded because running scripts is disabled on this system

How to fetch data in Oracle database and use it in Selenium WebDriver

How do I parse the FAQs in this page

Rx and Retrofit: Changing ServiceApi request parameter in request loop started by repeatwhen or repeatuntill

How does the recursion of printNStars work?

Deserialize with Jackson with reference to an existing object

Auto Increment id in sharepoint

Copy all files with given extension from docker container

What is the &lt;&lt; (double left arrow) syntax in YAML called, and where's it specced?

OutOfMemoryError even with TestNG listeners/reporters disabled

The method getSubmittedFileName() is undefined for the type Part

VS Code: disable linking between open files and explorer

The error that can't send and receive event in Kaa cluster

How to determine previous page URL in Angular?

Top