1

I've defined the following directive I've defined the following dirctive in my js file:

.directive('tabContent',function(){    
                return {
                restrict: 'E',
                template:'<div ng-if="view==\'card" ng-include="card.html"></div>'
            }
        })

and than used it in my html:<tabContent></tabContent> but all I got is a remark <!--div--><!--ng-if--><!--ng-include--> What am I missing?

1 Answer 1

2

You are missing a closing escaped ' on card in your string and ng-include requires single quotes as well, since it will parse your url as an expression.

template:'<div ng-if="view==\'card\'" ng-include="\'card.html\'"></div>'
Sign up to request clarification or add additional context in comments.

2 Comments

the solution is more simple than I thought. Thanks
@omer727 happy to help!

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.