Questions tagged [angularjs-ng-checked]

Sets the checked attribute on the element, if the expression inside ngChecked is truthy.

44 questions
81
votes
7 answers

AngularJS: ng-model not binding to ng-checked for checkboxes

I referred to this before asking this question: AngularJs doesn't bind ng-checked with ng-model If ng-checked is evaluated to true on the html side, the ng-model is not updated. I can't ng-repeat as suggested in the above question because I have to…
Abilash
  • 6,089
  • 6
  • 25
  • 30
11
votes
4 answers

ng-checked and ng-change radio button not work together - angularjs

http://plnkr.co/edit/RP9SpO1qGjn5Ua6pZJ3D?p=preview js angular.module("sampleapp", []).controller('samplecontroller', function($scope,$rootScope) { $scope.radii = [ {id:.25, checked:false, name:"1/4 Mile"}, {id:.5, checked:false, name:"1/2…
3
votes
1 answer

AngularJS ng-checked isn't updating checkbox when model changed in javascript

I have a filtered list of objects being repeated with ng-repeat with an input checkbox beside each item. When the list isn't filtered (as it is when the page is loaded) then I don't want the checkboxes checked. If the list is filtered I do want the…
ac66
  • 49
  • 1
  • 7
2
votes
1 answer

Not able to get the passed argument in ng-checked function

I called a function in ng-checked to check of the current checkbox's value is 'test' or not if it is checked then the checkbox should be checked or else the checkbox should be unchecked To achieve this I passed this.value as an argument for show…
Harish
  • 1,193
  • 6
  • 22
  • 45
2
votes
2 answers

All the checkboxes inside a ng-repeat are getting checked when I select just one

I have list of objects named rolePermissionList like this: [{"id":1,"name":"createUser","type":"user","marked":1},{"id":2,"name":"deleteUser","type":"user","marked":1},{"id":3,"name":"editRole","type":"role","marked":0}] and I use ng-repeat to…
2
votes
0 answers

ng-checked/ng-model prevent change to model when user clicks checkbox

I'm building a simple form with a toggle. I want to bind the toggle to my model, welcomeEmail.welcome_email_on. When I click the toggle, I want to call toggleWelcomeEmail() in my controller. This function will check if the new state is true or false…
2
votes
2 answers

angularjs checkbox ng-checked not working

I have the following code :-
mfc
  • 3,018
  • 5
  • 31
  • 43
1
vote
1 answer

Pre-checked inputbox are not being serialized

I have a simple code that list many colors and check if some has been chosen previamente by user(this is setted on code but in really its come from the database). When i submit the form, the pre-checked inputs don't are listed in array and if i…
1
vote
0 answers

Angular JS : Selecting first radio button in dynamic data set

I have an array of objects over which I do orderby:"Attribute A" ,iterate over it using ng-Repeat and set ng-checked="$index === 0 ? true : false". Now on same data on click Attribute B U do orderby : "Attribute B" and on click on C, orderby :…
Groovy
  • 57
  • 1
  • 10
1
vote
1 answer

ANGULARJS: Function I have in ng-checked directive runs infinitely

Trying to do something I thought is pretty simple but it's turning out to be pretty annoying. I'm just trying to have a function that runs when you click on a checkbox using the ng-checked directive. This is the HTML:
amacdonald
  • 157
  • 15
1
vote
1 answer

How to make a input disabled by default using angular directives

How do I make a textual input field disabled by default and have it toggled using a checkbox. I am getting the checkbox to toggle the input field between an enabled and a disabled state but I cannot get the input field to be disabled by default even…
1
vote
4 answers

Values are not automatically assigning in checkbox

I have a checkbox to show deactivate account , when check box is selected in request I need to send activationstatus as false for showing deactivate account and when unchecked it should pass value as true. My checkbox is just passing same value…
1
vote
2 answers

Handling Checkbox in angular js

div class ="col-lg-5 stylethistitle"> Show Deactivated Account
I need to pass $scope.checkedStatus in my json request as false when it is selected and true when it is unselected. I need…
1
vote
3 answers

AngularJS - Checkbox cheked with ng-click after i checked with select all it check all but Clearing all is not clears all

AngularJS - Checkbox cheked with ng-click after I checked with select all, it check all, but Clearing all is not clears all I have a list of objects in and Json array. I have declared the checkboxes with ng-repeat but when i check one and more…
1
vote
1 answer

Angular checkbox not saving its state between page navigation

I am using Angular Table which displays records from a MySQL using ng-repeat. THe last column is a checkbox column. The problem is that when navigating between pages (pagination), the state of which the checkbox was loaded with persistent. How do I…
necross
  • 147
  • 2
  • 11
1
2 3