Hi,

I am assuming that the padding value is conditional. In some cases you want 
padding as 15px, and in other cases you want padding as 10px. You may take 
the padding rule out in a separate class, for.eg padding15 and padding0. 
Using ng-class directive, you can dynamically change the class on your 
required condition. For eg:

<div class="error-class" ng-class="{conditionA: padding15, conditionB: 
padding0}">
   <span>Oops !!! Its look like something going wrong !!! Please try again 
later 
    ...  </span>
</div>


I hope this helps.

Regards,

Vaibhav Gupta

On Thursday, 5 May 2016 09:28:03 UTC+5:30, Selva wrote:
>
> I am calling error-stuff directive in my view as below and i am trying to 
> override the directive's padding 15px to 0px in my view which is not 
> working. So my div1's value and div2's values are not in a straight line 
> since div2 takes more padding in my view.
>
>  Error:
>           Oops !!! Its look like something going wrong !!! Please try again 
> later ...
>
>
> <div id="div1" class="row">
>
>    <div  class="pull-left">
>       <span>Error :</span>
>    </div>
>
>     <div id="div2" style="padding:0px; vertical-align:top">
>         <error-stuff></error-stuff>
>     </div></div>
>
> The html template on the error-stuff directive as below
>
> <div class="error-class">
>    <span>Oops !!! Its look like something going wrong !!! Please try again 
> later 
>     ...  </span></div>
>
> *in my app.css*
>
> .error-class{
> margin-bottom:20px;
> padding:15px;
> box-sizing:border-box;
> line-height:1.5;
> font-size:15px;}
>
> So how do i make *div1 and div2 content in straight line* by overriding 
> the directives padding:15px to padding:0px?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to