I am wondering how to How to transfer $http.get response from controller() to link() in Angularjs-directive. as the below code, $scope.x is not passed from $http.get respons