1.0.3 • Published 9 months ago

generator-dmc-uicomp-materialcard v1.0.3

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
9 months ago

generator-dmc-uicomp-MaterialCard

Installation

First, install Yeoman and generator-dmcpodplugin using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-dmc-uicomp-MaterialCard

Then generate your new project:

yo dmc-uicomp-MaterialCard

How To Use the MaterialCard

  1. Include the Material Card XML View like below in your XML View
 <mvc:XMLView viewName="<path to material card>.MaterialCard.MaterialCard" />
  1. Publish the event like below to load the material card details in your controller. along with data, it taken success and error call back functions.
let eventBus = this._getPodController().getOwnerComponent().getEventBus();
eventBus.publish("MaterialCard", "loadMaterialDetails", {
   material:"yourMaterial", version:"yourMaterialVersion",
   success:function(data){
        /* data =  {
          material: "string",
          description: "string",
          version: "string",
          image: "url",
          additionalData:"array of Objects" //response of get material/v1/materials public api call
        }
        */

      console.log(data)
     },
   error:function(err){
    console.log(err)
   }

})
1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago