与研究文章的披露提交 (app/views/research/disclosure.html.erb) 相关的代码在这里。
var researchDisclosureApp = angular.module('researchDisclosureApp', []);
researchDisclosureApp.controller('submissionController', ['$scope', function($scope){
$scope.checkbox = {
articleCheckbox1 : false
};
}]);
我的html代码
<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.
{{checkbox.articleCheckbox1}}
</div>
即使我取消选中或选中前端 {{checkbox.articleCheckbox1}} 部分的复选框,我的结果也只显示 false 而没有更新