0
votes

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'
    };
1

1 Answers

0
votes

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

<div ng-show="showForm">
  <div ng-include src="{{templateUrlPath}}"></div>
</div>