Sunday, 1 September 2013

how to update a value from 'controller', in a 'directive'?

how to update a value from 'controller', in a 'directive'?

I write a 'dialog' directive for testing,but I don't know how to update
the value from controller in a directive
app.controller('testController',function($scope){
$scope.testValue = 'testing';
});
app.directive('testDirectvie',function(){
return function(scope,element,attr){
// this func will open the modal window,
// so how can I can the testValue from controller?Thx all
};
});

No comments:

Post a Comment