Currently seeking an Angular 2-6 package featuring a horizontal image scroll with arrows, similar to the functionality on Airbnb: https://i.sstatic.net/BOWzD.jpg
Any suggestions or recommendations are greatly appreciated – thank you!
Currently seeking an Angular 2-6 package featuring a horizontal image scroll with arrows, similar to the functionality on Airbnb: https://i.sstatic.net/BOWzD.jpg
Any suggestions or recommendations are greatly appreciated – thank you!
This solution provides a custom horizontal scroll feature
In the .html file:
<div class="pull-left mt-sm">
<i class="icon-arrow-left pointer" (click)="scrollLeft()"></i>
</div>
<div #widgetsContent class="custom-slider-main">
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
<div class="info-box">
<img src="file.jpg" class="info-box">
</div>
</div>
<div class="pull-right mt-sm">
<i class="icon-arrow-right pointer" (click)="scrollRight()"></i>
</div>
In the .scss file:
.custom-slider-main{
display: flex;
overflow: hidden;
scroll-behavior: smooth;
}
.info-box{
width: 50px;
height:50px
}
In the .ts file:
@ViewChild('widgetsContent') widgetsContent: ElementRef;
Use the following functions when clicking on the left/right buttons:
scrollLeft(){
this.widgetsContent.nativeElement.scrollLeft -= 150;
}
scrollRight(){
this.widgetsContent.nativeElement.scrollLeft += 150;
}
If you're looking to create an image slider, there are a few options available to you. You could utilize an npm package, or take the time to learn how to build your own from scratch. A quick search for "angular Carousel" on Google will yield numerous results, including popular packages such as bootstrap and ngx-bootstrap that come with built-in slider functionality.
Is there a way to hide the custom validation message div when the input field is in focus? I'm looking for a solution to this issue. <div class="form-group"> <label class="col-sm-4 control-label">Password</label> <div class ...
Looking to apply two different background colors to my button. Here is the design I'm aiming for: Is it feasible to achieve this design using only CSS, or do you have any other suggestions? Appreciate your input! ...
Looking to retrieve a public day in the Jalali calendar using npm Jalali-moment with the following code: var moment = require('jalali-moment'); moment().locale('fa').format('YYYY/M/D'); I found a website that has achieved thi ...
I encountered a problem while working on an ionic app. I needed to have individual control over toggle switches, but my current code toggles all switches at once whenever one switch is tapped. Is there a way to fix this and manage each toggle switch separa ...
I need help troubleshooting an issue with sending a Delete request from my movie.component.ts file to delete a review. Unfortunately, I keep receiving the dreaded HttpErrorResponse error. Can anyone pinpoint where I may be making a mistake? Take a look at ...
el.scrollIntoViewIfNeeded() function is used to scroll to element el if it's not within the visible browser area. Although it generally works well, I have encountered some issues when trying to use it with a fixed header. I have provided an example s ...
In order to customize the Angular Material select component (https://material.angular.io/components/select/overview) to have an input field transformed into an icon button, I attempted to override its styling. While this approach worked well for me, I came ...
I have a custom node script that I use to automate the setup of my application. This script creates directories, generates files, and executes a series of node commands. Everything functions correctly for the most part. The specific commands being executed ...
Every time I execute npm start, I encounter the following message: When running npm start, I receive a warning about one of the dependencies, babel-preset-react-app, importing the "@babel/plugin-proposal-private-property-in-object" package withou ...
I am facing an issue with my Angular 7 application hosted on IIS 7. The app should be accessible at https://example.com/fitcbooks/web. It was working fine initially, but suddenly stopped without any clear reason. Despite the fact that URL Rewrite on the se ...
I'm having trouble getting my rows and columns to display on top of my background image. I've been struggling with this issue for a while now. Any assistance on this matter would be greatly appreciated! I'm fairly new to this, so if it&apos ...
Just set up nodejs on my Ubuntu 14.04 system. Upon running node --version, I see that it's v4.4.2. Also, npm is installed with version 3.9.2. When I execute the command npm install -g express, this is the output I get: install express js Once the ins ...
I am facing an issue with my HTML page that displays correctly on medium and large devices but encounters difficulties on smaller screens. When the screen size decreases, the text inside the grey elements takes up all the space, causing the two right-float ...
I have a collection of tabs, and I want to dynamically add an <hr> element with the class "break-sec" when a certain class is active. This element should be placed within a <span> element with the class "vc_tta-title-text" after the text. Here ...
As a beginner in web design, I am experimenting with using font awesome icons in Angular 9 projects within list items. While some of the icons are displaying properly, others are not. You can see the issue in the attached image. To access the icons, I have ...
There are numerous options available in JavaScript, .htc, and jQuery to create rounded corners for IE 6,7,8. (Not compatible with IE 8) http://code.google.com/p/jquerycurvycorners/ http://code.google.com/p/curvycorners/ Which solution offers the faste ...
Struggling to set up typescript using the command npm install -g typescript, I encountered the following error message: npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! at Error (native) npm ERR! ...
I have experimented with various CSS guides in order to place the footer at the bottom of the page, and I have found the example below to be the simplest method. html, body, #root { height: 100%; } #root { display: flex; flex-direction: column; } ...
I'm currently navigating through IntelliJ to set up Angular support. https://www.jetbrains.com/help/idea/2017.1/using-angular.html#install_angular_cli After successfully creating the project, I am unsure of how to run it. My guess is that I need to ...
My goal is to iterate through an array, make a HTTP request, retrieve another array from it, and assign the selected object from the fetched array to a newly added Form Control in the form. This is how I approached it: for (let i = 0; i < typeaheadFiel ...