Ng-repeat failing to apply checkbox functionality

When someone clicks on the levels in a list, I need to call a method in AngularJs. However, clicking on the checkbox within the ng-repeat does not trigger any action. Strangely, when I click on the checkbox outside of the ng-repeat, it works fine. Here is my code:

<div class="col-md-4">
                        <label>Select Level:</label>
                        <div ng-repeat="level in vm.Levels | filter: {Workshop:true}">


                            <div class="i-checks">
                                <input type="checkbox" ng-model="level.Name" id="{{'level-'+ level.SkillId}}" icheck />
                                <label class="control-label">
                                    {{level.Name}}
                                </label>
                            </div>
                        </div>
                        <input type="checkbox" />

                    </div>

I have also provided my controller code below:

(function () {
            'use strict';
            var controllerId = 'SeriesEditor';
            angular.module('app').controller(controllerId, ['apiFactory', "$filter", SeriesEditor]);

            function SeriesEditor(wfapi, $filter) {
                var vm = this;

                vm.Init = function () {                   
                    vm.Levels = [];                  
                }

     vm.loadLevelsForSeries = function () {

                    var mReq = new Models.services.LevelListRequest();
                    api.get(mReq)
                        .then(function (data) {
                            vm.Levels = data.Results;
                        });
                }
     }
        })();

Any help would be greatly appreciated. Thank you in advance.

Answer â„–1

// Unique code goes here

app
.module('myUniqueApp',[])
.run(function($uniqueRootScope){
$uniqueRootScope.uniqueTitle = 'uniqueTest Page';
})
.controller('uniqueController', ['$scope', function($scope){
  
$scope.UniqueLevels  = [{UniqueName:'uniqueString1',SkillId:1},{UniqueName:'uniqueString2',SkillId:2},{UniqueName:'uniqueString3',SkillId:3}]

}])
<!DOCTYPE html>
<html data-ng-app="myUniqueApp">

<head>
  <link rel="stylesheet" href="uniqueStyle.css">
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
  <script src="uniqueScript.js"></script>
</head>

<body data-ng-controller="uniqueController">

  <div class="col-md-4">
    <label>Select UniqueLevel:</label>
    <div ng-repeat="uniquelevel in UniqueLevels">

      <div class="i-checks">
        <input type="checkbox"  id="{{'uniquelevel-'+ uniquelevel.SkillId}}" icheck />
        <label class="control-label">
          {{uniquelevel.UniqueName}}
        </label>
      </div>
    </div>
    <input type="checkbox" /> unique checkbox outside

  </div>

</body>

</html>

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

Toggle the visibility of multiple divs depending on a specific attribute value

I previously inquired about this issue, but I believe my wording was unclear and the responses focused on how to display or hide a group of divs when clicking a button. While I understand that concept, my specific challenge is slightly different. Let me pr ...

Using lodash in JavaScript to flatten a nested object structure

I'm looking to flatten a hierarchical json structure. Here is an example of my json data: { "id": "111", "name": "v5", "define": { "system": "abc", "concept": [{ "code": "y7", "concept": [{ "code": "AGG", "di ...

How can I set the value of scope on a click event in Angular?

I'm having trouble creating a toggle feature in my angular project. I can't figure out why it's not functioning properly. My expectation is that when the a-tag is clicked, the lower div should display. <div> ...

ng-if is executed prior to the specified time

This unique Soundcloud player was created using Plangular, a directive that utilizes AngularJS and the Soundcloud API. Due to certain restrictions with third party apps not being able to stream some Soundcloud tracks, I have implemented ng-if="track" and n ...

Updating DOM element value from controller in AngularJs following an AJAX request

Currently, I am facing an issue in my code where I want to display a progress bar and hide it until isLoaded becomes true. <uib-progressbar class="progress-striped active" value="100" type="warning" ng-hide="{{isLoaded}}"></uib-progressbar> I ...

Unable to retrieve information from JSON file utilizing AngularJS version 1.6

I'm having trouble retrieving data from my JSON file using AngularJs 1.6 myApp.controller("homeCtrl", function($scope, $http) { $scope.Data = []; var getJsonData = function() { $http.get('contactlist.json').then(func ...

Leveraging the AngularJS promise/defer feature alongside the Quickblox framework, learn how to efficiently upload images and subsequently upload public URLs to a custom

I am currently developing an application that requires users to upload 5 images of themselves. Using a backend-as-a-service platform like Quickblox, I have to create and upload blob files individually. Once each image is uploaded, I receive a success call ...

AngularJS - Hiding Elements Dynamically Using `ng-hide` Based on an

Is it possible to create an inline expression for ng-hide in the following manner: ng-hide="userType!=user" Please advise on how to achieve this. ...

The changes to the grid options do not reflect immediately on the UI Grid interface

I am currently working on a project using the UI Grid module in AngularJS. I want to include row filtering as an option, but since not all users require it and the filter boxes take up a lot of space, I decided to disable filtering by default and add a but ...

Using ng-required with the Angular UI-Ace library allows for implementing required

What is the best way to incorporate ng-required with angular ui-ace within a form? Below is the code I have written: <form name="scriptform"> <div name="script" ui-ace="{ onLoad: configureAce }" ng-required="" ng-m ...

Adjust the color of the active link on the page using Angular and CSS

I have a project that I need to modify by adding a sub menu that appears on every page but is only coded once. My goal is to highlight the link for the current page, all within one HTML snippet. Although the list renders correctly, I'm struggling to g ...

Enlarging the modal overlay

My Angular/Bootstrap app features a small text area within a modal window that often contains lengthy content exceeding the size of the textarea and modal itself. I am looking to incorporate a button within the modal window that, when clicked, opens a lar ...

Error encountered in Angular after consolidating JavaScript files into a single file: [$injector:modulerr]

After developing an Angular application, everything seemed to be functioning well when I included the controllers.js, routes.js, directives.js files separately in index.html. However, upon attempting to combine these files into a single js file using gul ...

Error message: RefererNotAllowedMapError - Google Maps API has encountered an issue with

I've integrated the Google Places API into my website to display a list of addresses, but I'm encountering the error detailed below. Encountered the following error when trying to use Google Maps API: RefererNotAllowedMapError https://developers ...

ng-options do not refresh automatically when modifying elements in the array

Having trouble updating the data in a select list? It seems that when selecting 'test', the value retrieved from the API is 'ÅšlÄ…sk' even though it's not listed. For example: I select 'test' but it shows as 'ÅšlÄ ...

The selected option is not visually highlighted in the ui-select due to a programming issue

angular version: AngularJS v1.3.6 http://github.com/angular-ui/ui-select : Version: 0.8.3 var p1 = { name: 'Ramesh', email: '[email protected]', age: 99 }; $scope.people = [ { name: 'Amalie', ...

The functionality of AngularJs routing does not seem to be operating as anticipated

Please check out my demo example on Plunker. I have been experimenting with integrating the AdminLTE template with AngularJs Routing. I have defined the routing rules in my app.js file as follows: app.config(function ($routeProvider, $locationProvider) { ...

Using AngularJS to Listen for Events with $scope.$on() and $timeout()

Just diving into the world of AngularJS and need some help understanding how to use certain functions. Take a look at the code snippets below and shed some light on their functionality: $scope.$on('$viewContentLoaded', function(event) {}); Can ...

One controller displays ng-repeats while the other does not

I have 2 controllers loading in different locations within my view. One controller works perfectly, but the other one does not show ng-repeats or appear in ng-inspector. I have confirmed that the http data is visible in the inspector. Both controllers are ...

AngularJS Pagination: Organizing Content Efficiently

Utilizing Bootstrap's Pagination directive to implement pagination in a table. Interestingly, when manually adding data to $scope.transactions (referencing the commented out code in the controller), the pagination functions flawlessly. However, attem ...