Customizing Widgets and Sections

Kava consists of various types of beautifully designed widgets. Which is easy to customize and use.

We following the concept of reusebiltiy so that with one code snippet user can use it in other section as much as he want. Like in following screenshot this is services information section and we made widget of this section so that by changing the content user can use easily.

Service Section Item

Content Customization

Go to src>app>template>grid>ServiceItem> and open ServiceItem.component.html . You will see the following code.

Content is coming from json file.Go to src>assets>data>service.json. In this file you will find the content of above mentioned widget. Change the content as per your requirement.

All widget/section content will change as above mentioned steps.

Use existing section in other pages

If you want to use sections any widget in any other pages then do the following:

Let us assume that you want following section in About Us page

Service Section

Follow the steps below:

Step:1 Go to src >app>Pages>Home and open Home.component.html file and copy service section code(html) as you see in following:

Step:2 Now go to src>app>Pages>AboutUs>About and open About.component.html . Paste this in where you require.

Step:3 Go to src >app>Pages>Home and open Home.component.ts file and search for ngOnInit() function copy service content which is following.

Step:4 Now go to src>app>Pages>AboutUs>About open its .ts file named, About.component.ts file and search for ngOnInit() function and paste the code into function like this.

Save file and you will see service section on About Us page.

Last updated

Was this helpful?