function addElementToDropdown(dropdownName, routerName, glyphiconName, enableTranslation, clientFramework) {
    let navbarPath;
    try {
        if (clientFramework === 'angular1') {
            navbarPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.html`;
            jhipsterUtils.rewriteFile({
                file: navbarPath,
                needle: `jhipster-needle-add-element-to-${dropdownName}`,
                splicable: [`<li ui-sref-active="active">
            <a ui-sref="${routerName}" ng-click="vm.collapseNavbar()">
                <span class="glyphicon glyphicon-${glyphiconName}"></span>&nbsp;
                <span${enableTranslation ? ` data-translate="global.menu.${routerName}"` : ''}>${_.startCase(routerName)}</span>
            </a>
        </li>`
                ]
            }, this);
        } else {
            navbarPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`;
            jhipsterUtils.rewriteFile({
                file: navbarPath,
                needle: `jhipster-needle-add-element-to-${dropdownName}`,
                splicable: [`<li>
                    <a class="dropdown-item" routerLink="${routerName}" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
                <i class="fa fa-${glyphiconName}" aria-hidden="true"></i>&nbsp;
                <span${enableTranslation ? ` jhiTranslate="global.menu.${routerName}"` : ''}>${_.startCase(routerName)}</span>
            </a>
        </li>`
                ]
            }, this);
        }
    } catch (e) {
        this.log(`${chalk.yellow('\nUnable to find ') + navbarPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + dropdownName} ${chalk.yellow('not added to menu.\n')}`);
        this.debug('Error:', e);
    }
}
/**
 * Add a new menu element, at the root of the menu.
 *
 * @param {string} routerName - The name of the AngularJS router that is added to the menu.
 * @param {string} glyphiconName - The name of the Glyphicon (from Bootstrap) that will be displayed.
 * @param {boolean} enableTranslation - If translations are enabled or not
 * @param {string} clientFramework - The name of the client framework
 */
Add a new menu element, at the root of the menu.
@param {string} routerName - The name of the AngularJS router that is added to the menu.
@param {string} glyphiconName - The name of the Glyphicon (from Bootstrap) that will be displayed.
@param {boolean} enableTranslation - If translations are enabled or not
@param {string} clientFramework - The name of the client framework
Add a new menu element at the root of the menu . @param { string } routerName - The name of the AngularJS router that is added to the menu . @param { string } glyphiconName - The name of the Glyphicon ( from Bootstrap ) that will be displayed . @param { boolean } enableTranslation - If translations are enabled or not @param { string } clientFramework - The name of the client framework
function addElementToDropdown(dropdownName, routerName, glyphiconName, enableTranslation, clientFramework) {
    let navbarPath;
    try {
        if (clientFramework === 'angular1') {
            navbarPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.html`;
            jhipsterUtils.rewriteFile({
                file: navbarPath,
                needle: `jhipster-needle-add-element-to-${dropdownName}`,
                splicable: [`<li ui-sref-active="active">
            <a ui-sref="${routerName}" ng-click="vm.collapseNavbar()">
                <span class="glyphicon glyphicon-${glyphiconName}"></span>&nbsp;
                <span${enableTranslation ? ` data-translate="global.menu.${routerName}"` : ''}>${_.startCase(routerName)}</span>
            </a>
        </li>`
                ]
            }, this);
        } else {
            navbarPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`;
            jhipsterUtils.rewriteFile({
                file: navbarPath,
                needle: `jhipster-needle-add-element-to-${dropdownName}`,
                splicable: [`<li>
                    <a class="dropdown-item" routerLink="${routerName}" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
                <i class="fa fa-${glyphiconName}" aria-hidden="true"></i>&nbsp;
                <span${enableTranslation ? ` jhiTranslate="global.menu.${routerName}"` : ''}>${_.startCase(routerName)}</span>
            </a>
        </li>`
                ]
            }, this);
        }
    } catch (e) {
        this.log(`${chalk.yellow('\nUnable to find ') + navbarPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + dropdownName} ${chalk.yellow('not added to menu.\n')}`);
        this.debug('Error:', e);
    }
}
function addElementToDropdown ( dropdownName , routerName , glyphiconName , enableTranslation , clientFramework ) { let navbarPath ; try { if ( clientFramework === 'angular1' ) { navbarPath = ` ${ CLIENT_MAIN_SRC_DIR } ` ; jhipsterUtils . rewriteFile ( { file : navbarPath , needle : ` ${ dropdownName } ` , splicable : [ ` ${ routerName } ${ glyphiconName } ${ enableTranslation ? ` ${ routerName } ` : '' } ${ _ . startCase ( routerName ) } ` ] } , this ) ; } else { navbarPath = ` ${ CLIENT_MAIN_SRC_DIR } ` ; jhipsterUtils . rewriteFile ( { file : navbarPath , needle : ` ${ dropdownName } ` , splicable : [ ` ${ routerName } ${ glyphiconName } ${ enableTranslation ? ` ${ routerName } ` : '' } ${ _ . startCase ( routerName ) } ` ] } , this ) ; } } catch ( e ) { this . log ( ` ${ chalk . yellow ( '\nUnable to find ' ) + navbarPath + chalk . yellow ( ' or missing required jhipster-needle. Reference to ' ) + dropdownName } ${ chalk . yellow ( 'not added to menu.\n' ) } ` ) ; this . debug ( 'Error:' , e ) ; } }
Add a new menu element, at the root of the menu.
Add a new menu element at the root of the menu .