JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<div ng-app="app" ng-controller="myCtrl">
<my-directive question="question">
<input type="radio" ng-model="question.sex" name="sex" value="M">
<input type="radio" ng-model="question.agree" name="agree" value="M">
<button>click</button>
</my directive>
</div>
JavaScript
angular.module('app', [])
.controller('myCtrl', function($scope) {
})
.directive('myDirective', function() {
return {
scope: {
question: '='
},
link: function(scope, element, attrs) {
$(element).on('click', function(){
console.log(scope.question);
});
},
restrict: 'E'
}
});