{"size": 1002, "ext": "js", "max_stars_repo_path": "Version 1.0/AngularSPA/AngularSPA/Scripts/Angular/Controllers/Categories/categoryRelatedTagsController.js", "max_stars_repo_name": "rcapel/FRED-API-Toolkit", "max_stars_repo_stars_event_min_datetime": "2016-03-10T14:20:08.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-29T15:55:52.000Z", "max_issues_repo_path": "Version 1.0/AngularSPA/AngularSPA/Scripts/Angular/Controllers/Categories/categoryRelatedTagsController.js", "max_issues_repo_name": "rcapel/FRED-API-Toolkit", "max_issues_repo_issues_event_min_datetime": "2016-09-28T23:39:15.000Z", "max_issues_repo_issues_event_max_datetime": "2019-08-29T23:12:43.000Z", "max_forks_repo_path": "Version 1.0/AngularSPA/AngularSPA/Scripts/Angular/Controllers/Categories/categoryRelatedTagsController.js", "max_forks_repo_name": "rcapel/FRED-API-Toolkit", "max_forks_repo_forks_event_min_datetime": "2016-05-20T02:39:46.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-14T18:32:46.000Z"}
{"max_stars_count": 11, "max_issues_count": 2, "max_forks_count": 2, "avg_line_length": 37.1111111111, "max_line_length": 119, "alphanum_fraction": 0.6806387226}
﻿"use strict";
(function () {

	angular.module("appModule")
		.controller("categoryRelatedTagsController", ["$scope", "$routeParams", "categoriesControllerBase", "controllerBase",
			function ($scope, $routeParams, categoriesControllerBase, controllerBase) {
				$scope.fredPath = "/category/related_tags";
				categoriesControllerBase.initialize($scope, function (api) {
					api.form = "/Views/Categories/relatedTagsForm.html";
					api.results = "/Views/Common/tagsResults.html";
					api.initialOrderByColumn = "name";
				});

				// override initial default values
				$scope.onFormSubmit = function () {
					controllerBase.redirect($scope.fredPath + "/id/" + $scope.categoryId + "/tag_names/" + $scope.tagNames);
				};
				$scope.$parent.tagNames = $routeParams.tag_names != null ? $routeParams.tag_names : null;

				categoriesControllerBase.fetch($scope,
					$scope.categoryId != null && $scope.tagNames != null,
					$scope.categoryId + "/tag_names/" + $scope.tagNames);
			}
		]);

}());
