<commit_before>'use strict';

angular.module('common.nav', ['bbc.navigation'])
    .controller('CommonNavCtrl', function ($scope, $location, $bbcNavigation) {

        $bbcNavigation.getTopList(function (error, navList) {

            if (error || navList.length === 0) {
                $scope.menuTopList = [];
            }
            else {
                $scope.menuTopList = navList;
            }
        });

        $bbcNavigation.getSubList(function (error, navList) {

            if (error || navList.length === 0) {
                $scope.menuSubList = [];
            }
            else {
                $scope.menuSubList = navList;
            }
        });

        $scope.isActive = function (route) {
            return route === $location.path();
        };
    });<commit_msg>fix(navigation): fix active link bug<commit_after>'use strict';

angular.module('common.nav', ['bbc.navigation'])
    .controller('CommonNavCtrl', function ($scope, $location, $bbcNavigation) {

        var appRoute = $bbcNavigation.getRoute();

        $bbcNavigation.getTopList(function (error, navList) {

            if (error || navList.length === 0) {
                $scope.menuTopList = [];
            }
            else {
                $scope.menuTopList = navList;
            }
        });

        $bbcNavigation.getSubList(function (error, navList) {

            if (error || navList.length === 0) {
                $scope.menuSubList = [];
            }
            else {
                $scope.menuSubList = navList;
            }
        });

        $scope.isActive = function (route) {

            if (route === appRoute) {
                return true;
            }

            return route === $location.path();
        };
    });
{'fraction_non_alphanumeric': 0.1394422310756972, 'fraction_numerical': 0.0022766078542970974, 'mean_word_length': 1.5367965367965368, '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': '5194426', 'n_tokens_mistral': 494, 'n_tokens_neox': 467, 'n_words': 86}