JavaScript ng-show on basis of Angular directive?

I'm using the AngularSlideables to smoothly expand and collapse an area where people can find more details with the following code (Fiddle here):

<h3 slide-toggle="#details" >More details</h3>
<div id="details" class="slideable">
    <p>Bespoke aesthetic Bushwick craft beer. Qui aesthetic butcher, cardigan ex scenester Neutra American Apparel mumblecore.</p>
</div>

This works fine, but when the details area is expanded I want More details to be changed to Less details (and a minus-icon) so that it is clear that you can click again to change back.

Normally I would do something like this using an ng-show="some expression", but I don't see what kind of expression I can use here to know whether it is expanded or not.

Does anybody know how I can change the Mode details to Less details with this AngularSlideables-directive? All tips are welcome!

Answer:1

I changed the source code a little bit to expose the toggle status. This is a little bit awkward but it works.

 restrict: 'A',
 scope : {
       expanded : "=expanded"
 },

Here is the link

Answer:2

I have a directive that should open file picker window when a controller variable changes. Here is the snippet of the directive: angular.module('settingsInternal') .directive('triggerUpload', ...

I have a directive that should open file picker window when a controller variable changes. Here is the snippet of the directive: angular.module('settingsInternal') .directive('triggerUpload', ...

i'm trying to make captions in owl carousel. i'm using animate.css. I've added animation to captions in carousel but it's not working for all. Only first slides caption have animation. Here is my code;...

i'm trying to make captions in owl carousel. i'm using animate.css. I've added animation to captions in carousel but it's not working for all. Only first slides caption have animation. Here is my code;...

  1. carousel with caption
  2. carousel with caption bootstrap 4
  3. carousel with caption codepen
  4. carousel with caption bootstrap
  5. carousel with caption jquery
  6. carousel with caption example
  7. carousel caption on top
  8. carousel caption in the middle
  9. carousel caption in center
  10. carousel caption on right
  11. carousel caption in html
  12. owl carousel with caption
  13. owl carousel with caption example
  14. amp carousel with caption
  15. carousel slider with caption
  16. bootstrap carousel with caption animation
  17. owl carousel with caption example codepen
  18. slick carousel with caption
  19. image carousel with caption
  20. waterwheel carousel with caption'

I'm trying to make a list toggle code effecient. I plan on making about 20 lists and copying pasting the code and changing the classes seems really inefficient. I just can't figure out a way to make ...

I'm trying to make a list toggle code effecient. I plan on making about 20 lists and copying pasting the code and changing the classes seems really inefficient. I just can't figure out a way to make ...

  1. jquery toggle list items
  2. jquery toggle list
  3. jquery toggle list example
  4. jquery toggle list view
  5. jquery toggle list elements
  6. jquery classlist toggle
  7. jquery toggle ul list
  8. jquery toggle effects list
  9. jquery toggle checkbox list
  10. jquery toggle display list item
  11. jquery toggle faq list
  12. jquery toggle ul list javascript

I am trying to pull the first image I can get from a URL and display it in a div. I can successfully pull things such as title and headers from the URL but images will not work. var html = ...

I am trying to pull the first image I can get from a URL and display it in a div. I can successfully pull things such as title and headers from the URL but images will not work. var html = ...

  1. pulling image from docker hub
  2. pulling image from ecr
  3. pulling image from docker registry
  4. pulling image from website
  5. pulling image from docker
  6. kubernetes pulling image from private registry
  7. pulling docker image from ecr
  8. pulling docker image from artifactory
  9. docker pulling image from private registry
  10. pulling an image from a pdf
  11. pulling an image from artifactory
  12. pulling an image from a url
  13. facebook not pulling image from link
  14. pulling text from image