How to use the same ionic html for showing different images? - html

I'm building wallpaper/gallery ionic app.I am trying to design app in such a way that users can click on the image shown as ionic card and and users will be shown the image in full screen probably using ionic slides with a button for downloading image below.
I know for a fact that using same code for displaying images full screen more than one time is not a good practice.
Is there any way i can use the same ionic slide code multiple times showing corresponding image full screen.
FYI,here is the code,
<ion-slidesj zoom="true">
<ion-slide>
<div class="swiper-zoom-container">
<img src="assets/img/dog.jpg">
</div>
<ion-label>Woof</ion-label>
</ion-slide>
<ion-slide>
I want to use above same code multiple times with different img srcs for corresponding image user clicks.
Thanks.

You just need to create Angular/Ionic custom component here.
ionic generate component MyImageSlider
After that wrap your image slider inside it and send your image URLs dynamically to that custom component when a user clicked the ionic card.
You can see how to create a custom Component here.

You can use a loop to iterate through all your. Store all images path in a array of string and then iterate through that array. And pack your block of code in this loop .

Related

Django lazy load images

i am working on a Django project, where we built a Bootstrap carousel of images.
My task now is to try and lazy load those images.
How would I write a view in Django and in HTML that would request the next image in the list and the render it.
The carousel does have a back and next button that could be used as an event but I am unsure how I would go about partially rendering the slideshow.
Thanks in advance.

Is there a way to display an image grid with tick able Images in Nativescript Angular?

I am trying to get images into a grid on a Nativescript Angular App and then be able to tick them and move to the next page with the id's or names of those images.
i can do the image grid but i can't make them tickable. I'd be okayy with even just changing transparency on the clicked ones if possible.
Something like this
You could use RadListView with GridLayout for this purpose.
Checkmark on the Image is something you have to deal with your ng-template. Show the checkmark based on a flag in your data item, toggle that flag upon itemTap.

Popup windows for histogram with AngularJS

I would like to have some kind of popup window that will display a chart on the same page as where I clicked the button.
Something like this:
How would I achieve this in AngularJS? I have already set-up all the multi view files, like modules, controllers etc. I assume I only need to change HTML template for the main controller?
UPDATE
I have histograms loading on separate component with route #!/histogram/:elemId.
So in fact everything is ready in terms of creating a graph and data collection.
What I want to do is to have such popup window that displays on the same page, where the link was clicked. Something like alert(), but so it's not displayed by browser, but by the page, if this makes sense
You can see the code at GitHub
Well you have to create a popup modal that it's gonna be the base, I don't have full time to explain it right here but I left you a simple tutorial on YouTube youtube.com/watch?v=aqCMlI6Wq64
Make a ng-controller like:
<div class="chart" ng-controller="histogramController">
<p>Stuff here</p>
</div>
Then the controller can you make:
function histogramController($scope) {
// Chart.js functions on scope
}

ReactJS: Image Selector

I am new to ReactJS ,I am developing a application where we display a List of Images from web and User can select an image,enter some details and submit this image to Backend application. I am looking for React Component (possibly from Material UI -https://material-ui-1dab0.firebaseapp.com/demos/grid-list/) where I can display a list of image and when clicking a image it show it as selected.I am looking something like Image Picker in Jquery (https://rvera.github.io/image-picker/).
Thanks!
react-image-picker npm package.
There are also several react-native specific packages if your target platform is mobile.

Entire image link with a section of the image mapped elsewhere

When you link an entire image like in the HTML code below, can you still use image mapping to link a specific area on that image to a different address than what would be specified in the code below. For example, I have an image here: http://joshuamcauley.zxq.net/products/gloves/FBG2.png that when the user clicks on it a pop-up box appears with more information about the product. I was wondering if I used an image mapping program, can I make the Buy Now area add the product to the shopping cart or would the general link of the entire image over-ride this?
HTML
<img src="#">
What you are trying to do can be achieved by the html's map tag, so that you can map a particular section of the image to a specific href/perform different tasks.
Tutorial-HTML Map may be helpful to you on this.
Hope this is what you are looking for.