$scope variable not changing in controller when changed using directive
问题 I tried in all ways (keeping the scope to false, etc but not able to change my scope in controller),am I missing something. directive: angular.module("ui.materialize.inputfield", []) .directive('inputField', ["$timeout", function ($timeout) { return { transclude: true, scope: {}, link: function (scope, element) { $timeout(function () { Materialize.updateTextFields(); // The "> > [selector]", is to restrict to only those tags that are direct children of the directive element. Otherwise we