FollowUpCenterApp.directive('followUpFaqDirective', function() { return { restrict: 'E', templateUrl: '/BusinessCenter/PrintContent/Follow_Up_FAQ', controller: [ '$scope', 'CoreMetricsFactory', 'followUpUtility', function($scope, CoreMetricsFactory, followUpUtility) { //FAQ menu model $scope.AllCategories = followUpUtility.labels.faqData; //initialize angular.forEach($scope.AllCategories, function(category, index) { category.IsCategoryShow = true; angular.forEach(category.Questions, function(question, index) { question.IsAnswerShow = false; question.IsQuestionShow = true; }); }); $scope.clickFaqQuestionContainer = function(question) { question.IsAnswerShow = !question.IsAnswerShow; }; }, ], }; });