Web SDK 1019 changes

I have been using the latest Web SDK (v.1019) with Angular 16 and I have a couple of questions regarding replicating certain features from the old CLI.

1. How can I tweak the options to display/hide the navigation bar and/or header of my application?

I remember this was done via the c8y option in package.json file. I thought these same options would available under the runTime options of the new Cumulocity configuration file (cumulocity.config.ts).

They even showed up on my IntelliSense.

import { ConfigurationOptions } from '@c8y/devkit/dist/options';
import { version } from './package.json';

export default {
  runTime: {
    version,
    name: 'application',
    contextPath: 'application',
    key: 'application-application-key',
    dynamicOptionsUrl: '/apps/public/public-options/options.json',
    hideNavigator: false,
    hideHeader: true
  },
  // other config options
} as const satisfies ConfigurationOptions;

However, when running them on my localhost server these effects do not take place, even though the element still appears in my DOM.

NOTE: My application background is set to the same color as that of the header, hence the lack of distinction between the two.

2. Neither the header nor the navigation panel display once I deploy my application to Cumulocity.

In fact, the application resembles a vanilla Angular app but with branding applied from my Cumulocity tenant; again, even though the header and navigator element are present in my DOM.

Hi @luclib,

You have to restart your local development server when performing changes to the cumulocity.config.ts just like it was before when you edited the package.json.
You probably just missed to do so.

Regards,
Tristan

Hi Tristan,

Your suggestion worked for displaying and hiding the header; however, the navigator remains hidden. I will try tweaking a few other options in the meantime.

Regards,
Lucas

Please check the documentation regarding what the different options are doing:
https://resources.cumulocity.com/documentation/websdk/ngx-components/classes/ApplicationOptions.html#hideNavigator

hideNavigator will only prevent the navigation from being opened when initially starting the app. In case this option is not set or set to false, the navigation itself will only show up if there are items to be shown. You might not be having any NavigatorNodes as part of your app?

Regards,
Tristan

Yes, I think it might be lacking those navigator nodes.

Yes! I got it to work!

As a follow-up, do the NavgationFactory and hookNavigator need to be implemented at the AppModule level? What if I wanted to implement several features within the application?

You can also provide the hookNavigator in sub-modules.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.