pipHelp
pipHelp.Service
This service is provided an interface to manage the Help component. It is available on the config and run application phases. On the both phases the interface is the same. This module requires the 'pipState' module.
This method allows add new page into navigation menu. It accepts config object to define new state with needed params.
Param | Type | Details |
---|---|---|
pageObj | Object | Configuration object contains settings for another page |
pageObj.state | Object.<string> | Name of page state which is available via UI router |
pageObj.title | Object.<string> | Page title in the navigation menu. |
pageObj.access | Object.<boolean> | If it is true it will be available only for logged in users |
pageObj.visible | Object.<boolean> | If it is true the page will be visible |
pageObj.stateConfig | Object.<Object> | Configuration object in format like UI Router state |
// on the config phase pipHelpProvider.addPage({ state: 'test', title: 'Test help page', auth: true, stateConfig: { url: '/test', templateUrl: 'help/help_test1.html' } });
This method return name of the default state.
string | Name of the state |
// on the config phase pipHelpProvider.getDefaultPage();
This method returns asset of all pages registered in the Help component.
Array<Object> | List of registered states |
// on the config phase pipHelpProvider.getPages();
This method establishes passed state as default which is redirected at after transfer on abstract state
Param | Type | Details |
---|---|---|
name | Object | Name of the state |
pipHelpProvider.setDefaultPage('test');