JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="badIsolatedDirective">
<input ng-model="someModel"/>
<div isolate ng-model="someModel"></div>
<div isolate ng-model="$parent.someModel"></div>
</div>
CSS
</style> <!-- Ugly Hack to make remote files preload in jsFiddle -->
<script type="text/javascript" src="http://code.angularjs.org/1.2.0-rc.3/angular.min.js"></script>
<style>
JavaScript
angular.module('badIsolatedDirective', []).directive('isolate', function() {
return {
require: 'ngModel',
scope: { },
template: '<input ng-model="innerModel">',
link: function(scope, element, attrs, ngModel) {
scope.$watch('innerModel', function(value) {
console.log(value);
ngModel.$setViewValue(value);
});
}
};
});