Ng-model doesn't work in different directive


#1

For some reason I have to have a button in ion-footer, but my input is in ion-content, which they both are within 2 different directive. I have problem getting the value of ng-model. I have create a demo to show my problem :

http://play.ionic.io/app/81ff26fc9a28


Ionic side menu does not refresh my page
#2

I had once the same problem and I resolve it by making the variable in an object.
$scope.object = {
myInput : 123
}
Here the Solution :
http://play.ionic.io/app/2f271a882b18


#3

You have to understand the scoping in angular 1.

Directives create their own scopes.

the changed “myInput” in ionContent only lives there.