JavaScript Angular: Why is my div not showing/hiding with ng-show/ng-hide? angular show hide,angular show hide div,angular show hide

I'm trying to make a super simple lightbox for some images. Basically I have a div with a set of images showing up using ng-repeat, and I want to have a lightbox div show up when one of the images is clicked. I can't figure out why my lightbox div won't appear. Here is my code:

angular.module('myApp')
.controller('PhotosCtrl', ['$scope', function PhotosCtrl($scope){
	$scope.photos = [
		{
			src: '/images/img1.png',
			caption: ' '
		},
		{
			src: '/images/img2.png',
			caption: ' '
		}
	];
	$scope.larges = [
		{
			src: '/images/img1-lg.png',
			caption: ' '
		},
		{
			src: '/images/img2-lg.png',
			caption: ' '
		}
	];
}]);
.photowrap{
	max-width: 85%;
	margin: 0 auto;
	padding: 12px 0;
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
	background-color: #fff;
}
.photos{
	margin: 0;
}
.photo{
	max-height: 250px;
	border: 2px solid #EBEBEB;
	border-radius: 5px;
}
p.caption{
	display: none;
}

.lightbox{
	max-width: 85%;
	margin: 0 auto;
	background-color: rgba(255,255,255,0.6);
	position: absolute;
}
.lbphoto{
	max-width: 100%;
	max-height: 100%;
	display: block;
	margin: 0 auto;
}
<div ng-controller="PhotosCtrl" class="content">
  <div class="photowrap">
    <a target='_blank' href="" ng-repeat="photo in photos" ng-click="showme=true" class="photos">
      <img ng-src="{{photo.src}}" class="photo img-responsive"/>
    </a>
    <div ng-show="showme" class="lightbox">
      <a target='_blank' href="" ng-repeat="large in larges" class="photos">
        <a ng-click="showme=false" class="close">x</a>
        <img ng-src="{{large.src}}" class="lbphoto img-responsive"/>
      </a>
    </div>
  </div>
</div>
Answer:1

I have AdobeEdge and I need to wrap it inside React.js component. Component's code: let ModalWithAnimation = React.createClass({ render() { return ( <div className="modal-...

I have AdobeEdge and I need to wrap it inside React.js component. Component's code: let ModalWithAnimation = React.createClass({ render() { return ( <div className="modal-...

According to this The syntax for adding new elements to the page is easy, so it's tempting to forget that there's a huge performance cost for adding to the DOM repeatedly. If you're adding many ...

According to this The syntax for adding new elements to the page is easy, so it's tempting to forget that there's a huge performance cost for adding to the DOM repeatedly. If you're adding many ...

I'm new to JS and JQuery, and I'm implementing a simple web app: I used 16 pictures to make a map (4x4 grid). When the user clicks or releases the mouse, the console prints out the mouse's X and Y ...

I'm new to JS and JQuery, and I'm implementing a simple web app: I used 16 pictures to make a map (4x4 grid). When the user clicks or releases the mouse, the console prints out the mouse's X and Y ...

I've created this little fancy jQuery Snippet to toggle the class of an element in an interval: setInterval(function(){$('.grid-item .slide-image').toggleClass('active')}, 800); The script works ...

I've created this little fancy jQuery Snippet to toggle the class of an element in an interval: setInterval(function(){$('.grid-item .slide-image').toggleClass('active')}, 800); The script works ...

  1. jquery toggle class onclick
  2. jquery toggle class animation
  3. jquery toggleclass not working
  4. jquery toggle class on hover
  5. jquery toggle class multiple
  6. jquery toggle class based on boolean
  7. jquery toggle class on button click
  8. jquery toggleclass delay
  9. jquery toggle class hide show
  10. jquery toggle class codepen
  11. jquery toggle class on scroll
  12. jquery toggle class condition
  13. jquery toggle class function
  14. jquery toggle class click
  15. jquery toggle class callback
  16. jquery toggle class by id
  17. jquery toggleclass off
  18. jquery toggle class visibility
  19. jquery toggle class this
  20. jquery toggle class on focus