File

src/lib/layout/layout.directive.ts

Description

The Layout directive. This directive can be added to any component for layout handling (save/load). When added to a common DOM node, a new node will be created on layout model: use this to group template layouts by custom nodes (e.g. a div with 2 components). Components that can save/load layouts MUST implement OnLayout (or OnExtendedLayout) interface in order to work with this directive.

  • For example:
  • The first grid will save/load layouts within a UI page, since it has "cmf-core-controls-layout" directive and BusinessDataGrid implements OnLayout.
  • The second grid will NOT save/load layouts, since the directive is not on it.
  • The customized component, can save/load layouts, because it has the directive "cmf-core-controls-layout" and it implements OnLayout.

Implements

OnExtendedLayoutInternal OnDestroy AfterViewInit

Metadata

Index

Properties
Methods
Accessors

Constructor

constructor(dom: DOMService, util: UtilService, _selfComponent: Type, parentModel: LayoutModel, childModel: LayoutModel)
Parameters :
Name Type Optional
dom DOMService No
util UtilService No
_selfComponent Type<any> No
parentModel LayoutModel No
childModel LayoutModel No

Methods

Public componentImplementsOnExtendedLayout
componentImplementsOnExtendedLayout()

True if component where directive is implements OnExtendedLayout

Returns : boolean
Public getDefaultLayout
getDefaultLayout()

Get default layout object for current Layout

Public ngAfterViewInit
ngAfterViewInit()

ng.ngAfterViewInit

Returns : void
Public ngOnDestroy
ngOnDestroy()

ng.OnDestroy Remove node from Layout Model tree

Returns : void
Public onLoadExtendedLayout
onLoadExtendedLayout(layoutDef: InternalLayoutBaseDef)

Get onLoadLayout Promise for current component or call onLoadInternalLayout if available (override).

Parameters :
Name Type Optional Description
layoutDef InternalLayoutBaseDef No

Layout to load

Returns : Promise<void>
Public onSaveExtendedLayout
onSaveExtendedLayout()

Get onSaveLayout Promise for current component or call onSaveInternalLayout if available (override).

Properties

Public childModel
Type : LayoutModel
Public parentModel
Type : LayoutModel
Decorators :
@Optional()
@SkipSelf()

Accessors

layoutId
getlayoutId()
setlayoutId(value: string)
Parameters :
Name Type Optional
value string No
Returns : void

results matching ""

    No results matching ""