NG Component CSS

Hi

I am trying to get a Servoy component to recognise a css file within the component file structure. The spec file I am using has the following format

{
“displayName”: “infobox”,
“name”: “infobox-infobox”,
“definition”: “infobox/infobox/infobox.js”,
“libraries”: [
{
“name”: “infobox.css”,
“version”: “v1.0.0”,
“url”: “infobox/infobox/infobox.css”,
“mimetype”: “text/css”
}
],
“model”: {
“yourName”: {“default”: “World”,“type”: “string”},
“styleClass”: { “type”: “styleclass”, “default”: “test”,
“values”: [
“test”
]},
“toolTipText”: “tag string”,
“size”: { “type”: “dimension”, “default”: {“width”: 250, “height”: 30 }}
},

“version”: 1
}

This is basically ignoring the css within infobox.css the class definition is

.test {
background-color:red;
}

Any ideas would be more than welcome

best
Gordon

The answer to this was …


which attaches the styleClass and the onAction function to the display level of the component. See the other possible items in the Angular Materials examples - which incidentally are a great help and should have been shipped day one Servoy !! :)

Best
Gordon

For showing how component work we do ship components (but those are packaged in the installer/developer)
but the source of that is:

https://github.com/Servoy/servoy-client … voydefault

Those are for our legacy, that do a lot to be complaint to the default set of components
a more simple or clean component set is:

https://github.com/Servoy/servoy-client … components

(but ofcourse looking at the material stuff is also a very good option)

As an example how services (plugins) work:

https://github.com/Servoy/servoy-client … es/dialogs