Greetings
Please tell me how to transfer data from a controller to a directive using the syntax controller as
For example:
angular .module('test', []) .controller('first', function () { this.somevar = 'Lorem'; // -> Эту переменную }) .directive('one', function () { restrict: 'A', link: function () { console.log(somevar); // <- Получить здесь } });