1

I tried to do that like as:

$scope.showCloneIcon = function(scope)
        {

            if(scope.$parentNodeScope !== null){

                var parent_value = scope.$parentNodeScope.$modelValue.type_value;

                if(parent_value === 'array_objects'){
                    return true;
                }
            }

            return true;
        };

So, it does not hide element where I use ng-show

1
  • 3
    scope.$parent will work Commented Jun 13, 2017 at 7:07

1 Answer 1

1

Please try this

$scope.showCloneIcon = function(scope)
{
  if(scope.$parent !== null)
  {
    var parent_value = scope.$parent.$modelValue.type_value;
    if(parent_value === 'array_objects')
    {
      return true;
    }
  }
  return true;
};
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.