Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a button with ng-click function. When I click the button, it should show the form which is coded in a templateUrl using a custom directive.

Which function should I use to get the screen change work?

Plunker here : http://plnkr.co/edit/oxyOJ0XFDlZsLsnCegsI?p=preview

carVarApp.directive('dataEntry', function() { return { restrict: 'E', controller : function($scope) { $scope.onClickEntry = function () {

                     $scope.formModel = {};
                   };
               },
  templateUrl: 'dataEntry.html'
};
share|improve this question

1 Answer 1

you wont need custom directive for show-hide of custom url..

<div ng-show="showForm">
  <div ng-include src="{{templateUrlPath}}"></div>
</div>
share|improve this answer
    
can you please accept/upvote the answer if it helped?? –  entre Oct 24 '14 at 16:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.