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.
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.
{
"serviceGrid" : [
{
"icon" : "fas fa-bullhorn",
"title" : "Creative Design",
"polygon_color" : "svg-primary",
"content" : "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem industry's standard."
},
{
"icon" : "fas fa-mobile-alt",
"title" : "Digital Marketing",
"polygon_color" : "svg-secondary",
"content" : "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum."
},
{
"icon" : "fab fa-nintendo-switch",
"title" : "Mobile Apps",
"polygon_color" : "svg-success",
"content" : "Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus facer."
},
{
"icon" : "fas fa-bullhorn",
"title" : "UI/UX Designing",
"polygon_color" : "svg-error",
"content" : "Dolor posuere proin blandit accumsan senectus netus nullam curae, ornare laoreet adipiscing luctus."
},
{
"icon" : "fas fa-mobile-alt",
"title" : "Web Development",
"polygon_color" : "svg-primary",
"content" : "Lorem Ipsum is simply dummy text of the printing and typesetting industry.Lorem standard dummy"
},
{
"icon" : "fab fa-nintendo-switch",
"title" : "Digital Marketing",
"polygon_color" : "svg-secondary",
"content" : "Lorem Ipsum is simply dummy text of the printing and typesetting industry.Lorem standard dummy"
}
],
"serviceSlider" : [
{
"backgroundImage" : "assets/images/blog5.jpg",
"backgroundText" : "U",
"title" : "User Experience",
"content" : "Lorem ipsum dolor sit amet, consecte tuer adipiscingelit, sed diai nonupmy nibhie euism tincidunt ut laoreet."
},
{
"backgroundImage" : "assets/images/blog5.jpg",
"backgroundText" : "B",
"title" : "Design Websites",
"content" : "Lorem ipsum dolor sit amet, consecte tuer adipiscingelit, sed diai nonupmy nibhie euism tincidunt ut laoreet."
},
{
"backgroundImage" : "assets/images/blog5.jpg",
"backgroundText" : "D",
"title" : "Brand Designing",
"content" : "Lorem ipsum dolor sit amet, consecte tuer adipiscingelit, sed diai nonupmy nibhie euism tincidunt ut laoreet."
},
{
"backgroundImage" : "assets/images/blog5.jpg",
"backgroundText" : "N",
"title" : "Seo Optimization",
"content" : "Lorem ipsum dolor sit amet, consecte tuer adipiscingelit, sed diai nonupmy nibhie euism tincidunt ut laoreet."
},
{
"backgroundImage" : "assets/images/blog5.jpg",
"backgroundText" : "P",
"title" : "Creative Design",
"content" : "Lorem ipsum dolor sit amet, consecte tuer adipiscingelit, sed diai nonupmy nibhie euism tincidunt ut laoreet."
}
],
"serviceFeatures" : [
"Purpose, Vision & Values",
"Responsive Websites",
"Brand Strategy",
"Custom Apps",
"Logos & Visual Identies",
"Intranets",
"Naming",
"Donation Tools",
"Web Designing",
"Seo Optimization",
"Copywriting",
"UX & Content Strateg"
]
}
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
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: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.