亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Angularjs directive的模板里使用了input radio,但無法選中

Angularjs directive的模板里使用了input radio,但無法選中

繁花如伊 2018-08-06 11:10:17
HTML如下:<div class="genderBox">      <div class="fl">             買家             <input type="radio" ng-model="regForm.type" value="buyer"/>      </div>      <div class="fr">             賣家             <input type="radio" ng-model="regForm.type" value="seller"/>      </div>      <div class="cl"></div> </div>Javascript中創建了directive:(function(){ angular.module('homeRegister',[    'ui.router']).directive('homeRegister',function(){    return {         templateUrl:'/frontend/components/modal-home/home-register/home-register.html',         controller:homeRegister     } });function homeRegister($scope,$http,$timeout,Flash,FormFilter){     $scope.regForm={         type:'buyer',     };     $scope.goLogin=function(){         $timeout(function() {             $scope.$parent.isLogin = true;//父scope中         },0);     }; }打開頁面后點擊radio沒有效果。加了name屬性,試了ng-value也都不行。求各路大神幫忙解決一下。。。多謝!
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 619 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號