Skip to content

Add New Custom Page

Himelhoch edited this page Oct 7, 2014 · 19 revisions

These are the instructions on how to add a new custom page to your theme. The custom page example is called Page1.html. It contains bknd-ng-grid and bknd-dashboard directives as examples of how to use bknd directives.

To add a new custom page to your theme, please follow the steps:

1. Add Page1.html to the Menu

To add Page1.html to the menu, go to \themes[your theme]\my-pages\menuController.js

1.1. Uncomment the event appConfigCompleted, this will add Page1 to the menu 1.2. Uncomment the event menuItemSelected, this will navigate to Page1 when the menu item is selected

2. Add Routing to Page1

Go to \themes[your theme]\backand\js\app.js, uncomment the /page1 routing

3. Add the page1Controller Reference

Go to the theme index page, for example if you are working with the AdminLTE theme, go to index-lte.html, uncomment page1Controller reference: <script src="themes/AdminLTE-master/my-pages/page1/page1Controller.js"></script>

4. Use the bknd-ng-grid and bknd-dashboard Directives

You can see bknd-ng-grid and bknd-dashboard directives in Page1 of your custom page.

bknd-ng-grid

Here you have two options, one if you are working in the demo app, uncomment bknd-ng-grid with view-name="Employees" and the bknd-dashboard with dashboard-id="1". Or, if you are working with your own app, you must enter the name of your table or view into view-name.

bknd-dashboard

As above, if you are using your own app, you may create a new dashboard through the REST Config and enter your id to dashboard-id.