I make a demo which is working fine .I will explain the demo I have one text field and button .Whatever user type on text field then after click button it show the text in pop up screen .when user write any thing on pop up screen and submit button press it display on screen
My Question that I take one model this ng-model="modaldata.passedValue" but when I take ng-model="passedValue" my functionality stop why ? I change every where is js also to passedValue instead of modaldata.passedValue Plunker http://plnkr.co/edit/PhXuubnDaYklqyoEdRtt?p=preview
here is code
$scope.modalClick = function() {
//alert($scope.modaldata.passedValue);
textValue = $scope.modaldata.passedValue;
$rootScope.$broadcast('modalSubmit', {
modalText: $scope.modaldata.passedValue // send whatever you want
});
$modalInstance.dismiss('cancel');
}