<commit_before>(function() {
    'use strict';
    var defaultActiveClass = 'active';

    angular.module('stakes.common.directives', [])
        .directive('isActive', ['$location',
            function($location) {
                return {
                    restrict: 'A',
                    link: function($scope, element, attrs) {
                        var activeClass = attrs.activeClass || defaultActiveClass;
                        var path = attrs.route || attrs.href.substr(1);
                        $scope.location = $location;
                        $scope.$watch('location.path()', function(newPath) {
                            element.toggleClass(activeClass, (path === newPath));
                        });
                    }
                };
            }
        ]);
})();<commit_msg>work with href or ng-href<commit_after>(function() {
    'use strict';
    var defaultActiveClass = 'active';

    angular.module('stakes.common.directives', [])
        .directive('isActive', ['$location',
            function($location) {
                return {
                    restrict: 'A',
                    link: function($scope, element, attrs) {
                        var activeClass = attrs.activeClass || defaultActiveClass;

                        var path = attrs.route || (attrs.href || attrs.ngHref).substr(1);
                        $scope.location = $location;
                        $scope.$watch('location.path()', function(newPath) {
                            element.toggleClass(activeClass, (path === newPath));
                        });
                    }
                };
            }
        ]);
})();
{'fraction_non_alphanumeric': 0.13213213213213212, 'fraction_numerical': 0.0012012012012012011, 'mean_word_length': 1.3138888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3301527', 'n_tokens_mistral': 401, 'n_tokens_neox': 387, 'n_words': 69}