javascript - AngularJS directive to display/hide either templates -


I have a checkbox as follows, and when I am checked or not, showing / hidden taxid input or CKNA input I have

   

To do this, I have written an instruction as follows, but it is not working. What exactly is the problem in my direction?

  app.directive ('chkNo', function ($ COLLECTION, $ LOG) {var template_taxid = "& lt; label id = 'taxidlbl' & gt; Tax ID number & lt; / Label & gt; & lt; br / & gt; Input  

You can only use ng-show ng-hide

  & lt; Input type = "checkbox" ng-model = 'chucks' & gt; & Lt; Div ng-show "chks" & gt; & Lt; Label & gt; Tax ID Number & lt; / Labels & gt; & Lt; Br / & gt; & Lt; Input type = text 'name =' taxid 'placeholder =' tax id number 'ng-model =' taxid 'required & gt; & Lt; / div & gt; & lt; div ng-hide "chks" & gt; & lt; label & gt; check number & lt; / labels & gt; & lt; br / & gt; input type = 'Text' placeholder = 'checking number' ng-model = 'CNN' required & gt; & lt; / div & gt;  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -