<commit_before>(function(angular) {

	/*
		Add or removes an element if route matches or not.

		<ANY drpx-if-route="match-regexp">...</ANY>
	*/
	angular
		.module('drpx.ifroute',[
			'drpx.ifdirectivesupport',
		])
		.directive('drpxIfRoute', drpxIfRoute);

	drpxIfRoute.$inject = ['DrpIfDirectiveSupport','$location'];
	function drpxIfRoute  ( DrpIfDirectiveSupport , $location ) {

		var directive = {
			restrict: 'A',
			transclude: 'element',
			priority: 600,
			terminal: true,
			$$tlb: true,
			link: link,
		};

		function link(scope, element, attr, ctrl, transclude) {

			var ifSupport = new DrpIfDirectiveSupport({
				element: element,
				transclude: transclude,
				comment: 'if-route'
			});

			scope.$watch(function() {
				return $location.path();
			}, function (newPath) {
				var match = '^' + attr.drpxIfRoute + '$';
				if (newPath.match(match)) {
					ifSupport.enter();
				} else {
					ifSupport.leave();
				}<commit_msg>bug fix of old named supporter<commit_after>(function(angular) {

	/*
		Add or removes an element if route matches or not.

		<ANY drpx-if-route="match-regexp">...</ANY>
	*/
	angular
		.module('drpx.ifroute',[
			'drpx.ifdirectivesupport',
		])
		.directive('drpxIfRoute', drpxIfRoute);

	drpxIfRoute.$inject = ['DrpxIfDirectiveSupport','$location'];
	function drpxIfRoute  ( DrpxIfDirectiveSupport , $location ) {

		var directive = {
			restrict: 'A',
			transclude: 'element',
			priority: 600,
			terminal: true,
			$$tlb: true,
			link: link,
		};

		function link(scope, element, attr, ctrl, transclude) {

			var ifSupport = new DrpxIfDirectiveSupport({
				element: element,
				transclude: transclude,
				comment: 'if-route'
			});

			scope.$watch(function() {
				return $location.path();
			}, function (newPath) {
				var match = '^' + attr.drpxIfRoute + '$';
				if (newPath.match(match)) {
					ifSupport.enter();
				} else {
					ifSupport.leave();
				}
{'fraction_non_alphanumeric': 0.15592515592515593, 'fraction_numerical': 0.0031185031185031187, 'mean_word_length': 3.3355855855855854, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '319917', 'n_tokens_mistral': 801, 'n_tokens_neox': 652, 'n_words': 139}