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

Is there a way for me to verify if I have already made an AJAX data request

I have an image gallery with thumbnails. When a user clicks on a thumbnail, an ajax request is fired. I want to prevent the ajax request from firing again if the user clicks on the same thumbnail and instead use the existing data. $.getJSON(url, function( ...

What issues are present in the Ajax script and the PHP radio input?

I'm having trouble extracting the value of a radio input in this code so I can update the database: <script type="text/javascript> function getVote() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlh ...

What flaws are present in this authentication system?

As a developer with a passion for coding, rather than a security expert, I came across The definitive guide to form-based website authentication, which highlighted the importance of SSL or complex algorithms in safeguarding login data from eavesdropping. D ...

Encountering an error when using JSONP with a period in the callback function

I am currently facing an issue with making an ajax jsonp call. It seems that the json returned contains a dot in the callback function, as shown in the example below: ABCD.render_section({ "page": { "parameters": { "pubDate": "2013-06-05 00:00:00.0", ...

A guide on setting the array value on the user interface based on a key within the SectionList

My code is currently retrieving an array value and populating these values based on the key in a SectionList. The keys are displaying properly in the UI, but I am encountering some issues in my render item function, particularly in the second section. Esse ...

Utilizing a Function's Return Value as a State in React - A Comprehensive Guide

Currently, I am delving into the realm of functional components within React and have crafted a simple piece of code that should output 'Nah' if the state value is at 0. However, there seems to be an issue as this functionality does not seem to ...

Internal VS External Stylesheets: What you need to know

I'm currently in the process of developing a website and I have started utilizing the style tag at the beginning: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" ...

Transform two fixed elements into dynamic elements using JQuery

Is there a way to replace two static elements in the table <tr class="item-row"> with data from an ajax call instead of just appending to them? Currently, I am using this javascript line to append: $(".item-row:last").after('<tr class="item- ...

Retrieving information through callback functions

A function I developed checks a list of tags that are submitted to it, sorting the good ones into a "good" array and the bad ones into a "bad" array. This process occurs within a callback, allowing the rest of my code to continue once complete. However, I ...

Error: Required variable missing in AJAX Post request

When making an ajax call, I use the following code: o.open("POST",q,true); o.setRequestHeader("Content-type","application/x-www-form-urlencoded"); o.setRequestHeader("Content-length",p.length); o.setRequestHeader("Connection","close"); Here, q represent ...

Adding margin to an HTML element causes the entire page to shift downward

Despite successfully applying margin to other elements, I encountered an issue with #searchbarcontainer where it causes the entire page to shift downward. My goal is to center it slightly below the middle of the page, but I'm struggling to find a solu ...

URL Labeler StateProvider: A unique StateProvider that adds a distinctive label to the

I need help figuring out how to add a user-friendly URL at the end of the current URL using $stateProvider. As an example, on StackOverflow's question pages, the URL format is stackoverflow.com/questions/(question_id)/(question title). I want to repl ...

Building an Express API using ES6 script: A Step-by-Step Guide

After creating a no-view REST API using the express generator, I decided to convert everything to ES6 script and compile it with Babel. However, upon entering localhost after the changes, an error message appeared: No default engine was specified and no ...

Is it possible to call a ref from a different component in React?

I'm currently working on a React chat application and I want the input field where messages are entered to be focused every time you click on the chat box. However, the challenge I'm facing is that the chat box in the main component is separate ...

Navigate through the rows and columns of an HTML table by utilizing Javascript with webdriver, specifically for Protractor in a non-angular environment

I need help with iterating through rows and columns using Selenium Webdriver. I am currently using Protractor for a non-angular web page. I have some Java code that works with the WebElement class to get the number of links, but now I need to transition th ...

Ensuring the screen reader shifts focus to the previous element

Utilizing the screen reader to redirect focus back to the previous element has proven to be a challenge for me. After clicking the Return button, it will vanish and the Submit button will take its place. If the Submit button is then clicked, it disappears ...

I am having issues with sendKeys and click() functions in my code. I am unable to access the elements using Protractor's javascript

<input class="form-control validation-field ng-dirty ng-touched ng-invalid" placeholder="Password" type="password"> Despite using the element to retrieve it, I am unable to send keys and no error message is displayed. This issue persists in both Fir ...

What are some other options to using position: absolute when working within an inline position:relative?

I've been struggling with this problem for some time now and just can't seem to find a solution. The issue involves a series of position: relative spans enclosing text, along with a position: absolute span set to right: 0;. I expected the second ...

Display the outcomes of two MongoDB queries simultaneously on a single page

As I dive into the world of MongoDB and Node.js/Express, I find myself struggling to fully grasp some of the concepts. Forgive my inexperience, but I haven't been able to locate a clear answer for what I'm trying to achieve. My goal is straight ...

Determining the height of the first element in jQuery

I am dealing with multiple elements that share the same class but have different heights. The class 'xyz' is only for styling borders, as shown below: <div class='xyz'></div> //1st element height=10px <div class='xy ...