I am new to angularjs. I am working with isolated scope. The two way binding using isolated scope is not working. Please check my code. If i remove age : '=' then my code is working 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}}