I've just started learning angularjs and I'm working with isolated scope. I seem to be having issues with two-way binding using isolated scope. Can someone please review my code and help me debug this issue? When I remove age : '=' from my code, everything works fine.
**HTML**
<div ng-controller="homeCtrl">
<my-dir name="{{namee}}" age="{{age}}"></my-dir>
</div>
**JS**
var app = angular.module("home")
app.controller("homeCtrl",["$scope",function($scope){
$scope.namee = "John";
$scope.age= 30;
}]);
app.directive("myDir",function(){
return{
restrict :'E',
scope: {
name : '@',
age : '=',
},
template: ['Directive name is: {{name}}',
'<p>{{age}}</p>'
]
}
})
**Output**
John 30
Directive name is: {{name}} {{age}}