I am new to Angular.I have a custom directive in which i want to attach 
ng-show to the element. However, this does not seem to get reflected at all 
even though when i inspect the element, i see that it has value of 
ng-show="false".

Here is what the directive looks like:

ngular.module('testApp')

    .directive('nmUiEditorShowControl', function($document, $rootScope) {

        return {

            restrict: 'A',

            link: function(scope, element, attrs) {

                    element.attr('ng-show', 'false');

            }

        };

    });

I want to set the value of ng-show to a function. However, for now even 
hardcoding thid to false does not seem to have any effect. The control to 
which i attach this directive (button in this case) is always visible

despite having ng-show set to false in the dom.

Any inputs will be much appreciated. Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to