I am using Angularjs v1.2.21 and I cannot access form state inside a directive, with another versions this works( I cannot change project Angularjs version)... I created a plunkr below:
.directive('testReplace', function () {
return {
restrict: 'EA',
replace: true,
scope:{
transaction: '=',
isvalid: '='
},
templateUrl: 'modal-back.html',
controller: function($scope) {
console.log($scope.myForm)
}
};
})