Confusing attributes in angularjs directive's link function -


I am writing an angular.js directive, which will hide the condition conditionally. So it will look like this:

  link: function (scope, amm, ethers) {... elem.hide ()}   

I found lots Examples that were actually doing, but somehow my element attribute is not an array element, so there is no hidden () method in what I am missing?

Thank you!

Most people are loading jQuery before that load angle, which jquilite to its full jquilite Expanded.

Hide The method is not part of the jqLite API (), so such a method has not been revealed. / P>

This does not mean that you need jQuery, but this is not the right way to handle your problem. If you can already use the ng-show and ng-if instructions to hide an element based on the controller, can not you use them?

In your HTML, & lt; Add div ng-show = "isDisplayed" & gt ;, and scope.isDisplayed = false in your linking function

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -