Rzslider not functioning properly due to CSS issues

I am facing an issue where rzslider is not appearing in my app. However, when I copy the code to an online editor, it works perfectly fine. Below is the code snippet:

var app = angular.module('rzSliderDemo', ['rzModule', 'ui.bootstrap']);
app.controller('MainCtrl', function ($scope) {
var alpha = [];
for(var i=65;i<=90;i++){
  alpha.push(String.fromCharCode(i));
}

for(var i=65;i<=90;i++){
  var first = 'A';
  var next = String.fromCharCode(i);
  alpha.push(first + next);
}
  $scope.alphabet = 1;
  $scope.alphabetMax = alpha.length - 1;
  $scope.alphabetTranslate = function(value) {
    return alpha[value].toUpperCase();
  };
   //Slider for class range
    $scope.range_slider_ticks_values = {
        startRange: 1,
        endRange: 12,
        options: {          
             stepsArray: 'LKG1,LKG2,class-1,class-2,class-3,class-4,class-5,class-6,class-7,class-8,class-9,class-10,class-11,class-12'.split(','),
            showTicksValues: true
        }
    };
     $scope.range_slider_batch_values = {
        startRange: 1,
        endRange: 12,
        options: {          
             stepsArray: alpha.toString().split(','),
            showTicksValues: true
        }
    };
    
    $scope.$on('slideEnded', function() {
    var startClass, endClass;
    startClass = $scope.range_slider_ticks_values.startRange+1;
    endClass = $scope.range_slider_ticks_values.endRange+1;
    //alert("startClass: " + startClass + " endClass : " + endClass)
    getBatchSliders(startClass, endClass)
  }); 
  
    $scope.getNumber = function(num,startClass,endClass) {
    return new Array(num);
  }

    function getBatchSliders(startClass, endClass) {
    endClass = parseInt(endClass);
    //console.log("startClass: " + startClass + " endClass : " + endClass)
    var totalSlider;

    if (startClass === 1 || startClass === 2) {
    //alert("pre class found")
        startClass = startClass;
        endClass = endClass;
        totalSlider = endClass;
    }
    if (startClass >= 3) {
    //alert("pre class not found")
        startClass = startClass-2;
        endClass = endClass-2;
      totalSlider = endClass ;
    }
    $scope.$apply(function() {
     $scope.startClass = startClass;
      $scope.endClass = endClass;
      $scope.totalSliders = totalSlider;
    })
  }   
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.14.3/ui-bootstrap-tpls.js"></script>
<script src="https://rawgit.com/rzajac/angularjs-slider/master/dist/rzslider.js"></script>
<div ng-app="rzSliderDemo">
    <div ng-controller="MainCtrl" class="wrapper">
             {{range_slider_ticks_values.startRange+1}}     
==
             {{range_slider_ticks_values.endRange+1}} 
        <article>
             <rzslider rz-slider-model="range_slider_ticks_values.startRange" rz-slider-high="range_slider_ticks_values.endRange" rz-slider-options="range_slider_ticks_values.options"></rzslider>
        </article>  
        
         Total class {{totalSliders}}
      <br>
      <br> Class start from {{startClass}} to {{endClass}}
       <div ng-if="totalSliders">     
      <div ng-repeat="i in getNumber(totalSliders,startClass,endClass) track by $index">
        <span>
        {{ alphabetTranslate($index) }}
        </span>        

<rzslider rz-slider-options="range_slider_batch_values.options" rz-slider-model="$index"></rzslider>


       
      </div>
    </div>
    </div>
</div>

Even though this code works in an online editor, the slider is not visible when I run the same code on my local system. Any suggestions?

Answer №1

What error was displayed in your browser console? Have you checked the network tab of your console for any information?

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips for resizing user-uploaded images to fit the required dimensions outlined in the design draft using CSS or JavaScript

Hey everyone! I'm facing an issue but my English isn't great. I'll do my best to explain it thoroughly, and if anything is unclear, please feel free to let me know! So here's the problem: today there's a block for users to upload p ...

Attempting to extract decibel levels from an audio file using JavaScript

I've been exploring the details provided here: Is there a way get something like decibel levels from an audio file and transform that information into a json array? However, when attempting to execute the JSBin snippet below, I encountered some conf ...

Is it possible to reduce a field value in firestore after successfully submitting a form?

I have a variety of items retrieved from firestore: availability : true stocks: 100 item: item1 https://i.stack.imgur.com/hrfDu.png I am interested in reducing the stocks after submitting a form. I used the where() method to check if the selected item m ...

Understanding the Behavior of Vue 3's setInterval Methods

Environment I am working on a Vue 3 Application where I need to run a constant setInterval() in the background (Game Loop). To achieve this, I have placed the code in store/index.js and invoked it from views/Playground.vue's mounted() lifecycle hook ...

The console log is not being displayed in my Redux reducer and it is returning an undefined

I'm facing an issue with my Redux application after integrating JWT into my Nest API. Below is the code snippet from my reducer: export default function reducer(state = {}, action) { switch (action.type) { case 'USER_LOGIN_SUCCESS&apo ...

The error message "Failed to load the default credentials in Firebase" occurs sporadically. Approximately 50% of the time, the app functions properly, while the other 50% of the time, this specific

Occasionally in my firebase functions log, I encounter an error message stating: "Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information." This error appears randomly withi ...

Having trouble getting the img src to work in Django 2.1 template?

I'm having trouble displaying images in my Django template file. Despite uploading the images to media static files, they do not appear on the template. When I click on the image link in the Django admin page, it shows a "Page not found(404)" error me ...

Is it possible to access a hidden JavaScript variable in Selenium?

Is there a way to extract the array "o" that contains data used for drawing a polygon? Simply using driver.execute("return o") or console.log doesn't seem to work. Any suggestions on how to achieve this? const zt = function(e, t, n, r) { c ...

Selecting options from the Gmail dropdown menu

I'm attempting to create a dropdown menu similar to the one in Gmail using Bootstrap. However, I have encountered 2 issues: 1- I am unable to click on the input checkbox to select all 2 - I would like it so that if I select all, the input gets sele ...

Due to high activity on the main thread, a delay of xxx ms occurred in processing the 'wheel' input event

While using Chrome version: Version 55.0.2883.75 beta (64-bit), along with material-ui (https://github.com/callemall/material-ui) version 0.16.5, and react+react-dom version 15.4.1, an interesting warning message popped up as I scrolled down the page with ...

Having trouble running Ajax with JavaScript on a Wamp server

Exploring the realm of ajax, I embarked on a journey guided by a YouTube tutorial to construct a basic food search application. The concept was simple - users would input the name of a food item, and if available, its name would be displayed below. On the ...

Update a variable in one component class using another component

My Hue class in a component contains a variable that I'm trying to modify: export default class Hue extends Component { state = { toggleState : false, toggleWhite : false } render(){...} ... } Within this component, I can chang ...

REACT performance impacted by slow array filtering

I have a custom listbox feature, where a div holds a vertical list of other div elements. There is also an input field for searching within the list. While it works fine with small data sets, it becomes extremely slow with large amounts of data. In additi ...

I'm facing some difficulties in sourcing my header into a component and encountering errors. Can anyone advise me on how to properly outsource my header?

Looking to streamline my headers in my Ionic 4 project by creating a separate reusable component for them. Here's how I set up my dashboard page with the header component: <ion-header> <app-header title="Dashboard"></app-he ...

Troubleshooting steps for resolving Heroku's "State changed from up to crashed" error caused by Mongoose connection issue

I am encountering an issue while deploying my Node.js/MongoDB app to Heroku. It crashes with the following error: MongooseServerSelectionError: connection <monitor> to 104.155.184.217:27017 closed Below are excerpts from my log: 2022-07-10T23:36:17. ...

What is the best way to enlarge the image to a specific percentage?

Although I have never programmed in HTML or worked on web projects before, I am currently using a git repository where the project is client-server. This means I need to modify the code to suit my requirements, which includes working with HTML. My problem ...

Unveiling the Mystery: Why YUI-3 Grids & Google Chrome Cause Overlapping Texts

Although I'm not well-versed in UI design, I find myself having to work on some CSS for a side project. Currently, I am utilizing YUI-3 files such as grids, reset, and fonts, all version 3.9.1. The main issue I am encountering is that the text inside ...

What is the more effective choice for Automation Testing: Static or Dynamic dropdown menu options?

Currently facing an issue with dropdown selections while conducting automated testing. Selenium's Select(); method has been reliable when running tests in multiple cycles and choosing different options each time. The challenge arises when the dropdow ...

An analysis of Universal Angular.io and Prerender.io from the viewpoint of Googlebot

Currently, my website is set up with Angular 1.4.x and prerender.io, which delivers static cached pages to Googlebot. Googlebot visits each page twice - once by hitting the URL directly, and then again by appending ?_escaped_fragment_ to the URL to access ...

Adding a scroll bar to a fixed container: tips and tricks

I am looking to implement a scrollbar in a fixed container for the cart products. The goal is to enable easy navigation through a large number of products added to the cart by scrolling within the container. Below is the HTML code snippet representing the ...