Custom menu output

You can try the following to modify the links of the menu items that are pages:

add_filter( 'nav_menu_link_attributes', function( $atts, $item, $args, $depth )
{
    if( 
          isset( $item->object ) 
       && 'page' === $item->object 
       && isset( $args->theme_location ) 
       && 'primary' === $args->theme_location 
    )
        $atts['href'] = home_url( 
            sprintf( '/#/page/%d',  $item->object_id ) 
        );

    return $atts;
}, 10, 4 );

where we target the primary theme location.

This should give this kind of links:

http://example.tld/#/page/12345

tech