mercredi 22 mars 2017

checkbox scope is binding but not updating even with dot in angular.js 1.6.x

My js code

// Code related to the Disclosures submission (app/views/research/disclosure.html.erb) 
// for a research article goes here.

var researchDisclosureApp = angular.module('researchDisclosureApp', []);

researchDisclosureApp.controller('submissionController', ['$scope', function($scope){
    $scope.checkbox = {
        articleCheckbox1 : false
    };
}]);

My html code

<div class="container dashboard-container" ng-app="researchDisclosureApp"  ng-controller="submissionController">
  <div class="nra-heading-area">
    <div class="row">
      <div class="col-sm-6">
        <div class="nra-heading">New Research Article</div>
      </div>
      <div class="col-sm-6">
        <a href="/research_guidelines" class="nra-guidelines">Guidelines for Writing Research</a>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>

  <div class="disclosure-right">
    Your article is ready to publish. Please complete the required disclosures below to complete the submission.
  </div>


  <form id="disclosureContianer" name="disclosuresForm">
    <div class="ArticleStep2MainBox">
      <p class="ArticleStep2MainText">1. Please Confirm:</p>
      <div class="ArticleStep2Text01">
        <div class="ChoiceButtonBoxWA">
          <input type="checkbox" checked id="articleCheckbox1" ng-model="checkbox.articleCheckbox1"/>
        </div>
        I have prepared this research note in accordance with Code of Conduct.
        
      </div>

My result is showing only false without getting updated even if I uncheck or check the checkbox at the section on the frontend




Aucun commentaire:

Enregistrer un commentaire