catalogicsoftware / ngx-dynamic-dashboard-framework

This is a JSON driven angular x based dashboard framework that is inspired by JIRA's dashboard implementation and https://github.com/raulgomis/angular-dashboard-framework
MIT License
187 stars 95 forks source link

PropertyPage. Properties is Undefined. #8

Closed moda20 closed 6 years ago

moda20 commented 6 years ago

hey, Thanks for the great work on this. I can't say i am an expert in angular to get it all at once but ill mange ( extra class diagrams would be much more helpful ).

I tried to use the dynamic forms to make a simple login component but i failed with the error : propertyPage.properties is undefined and i didn't figure out what it is. it is not featured in the angular docs for dynamic fomrs.

a little help would on this be appreciated, thank you.

jayhamilton commented 6 years ago

Thanks for the encouragement. In terms of the class diagrams, that is a timely comment. This project does include documentation which I am looking to integrate more into the dashboard for those who would like quick access to it.

As far as the propertyPage.properties being undefined, let me review that and get back to you.

jayhamilton commented 6 years ago

I added a very simple todo gadget. Please review the content of the following commit: https://github.com/catalogicsoftware/ngx-dynamic-dashboard-framework/commit/b035502bb21540a1b658610bc548da864609547f

Unfortunately I inadvertently committed documentation changes along with the sample gadget. This means you will have to scroll down toward the bottom of the commit to see the relevant src folder change set. You will see all of the places that need to be updated to create a gadget. There you will see the model that includes the propertyPage.properties object you need to include.

Here are the files you would need to update/add: src/app/add-gadget/gadget-factory.ts - factory of all gadgets src/app/board/board.module.ts - gadgets are imported to the board src/app/board/grid/grid.module.ts - grid needs access to the gadget's service src/app/gadgets/gadget.module.ts - gadget module for all gadgets src/app/gadgets/todo/service.ts - gadget service src/app/gadgets/todo/todo-gadget.component.ts - gadget component src/app/gadgets/todo/view.html - gadget view src/assets/api/gadget-library-model.json - Here is where your problem might be. You need to add a configuration/property object to the model array. This dictates the property page content and drives the gadget factory creation logic. src/assets/api/todo-model.json - small json used for the service api to mimic getting data from an api src/assets/images/todo.png - icon for the add modal

jayhamilton commented 6 years ago

The last commit https://github.com/catalogicsoftware/ngx-dynamic-dashboard-framework/commit/219b30f78e7c0c007d5d2b012d593b4554ec3352

is a bit more condense. It will identify all of the pertinent files that need to update/created.