How to Incorporate Ionic Framework | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (181).NET Core  (28).NET MAUI  (227)Angular  (113)ASP.NET  (49)ASP.NET Core  (81)ASP.NET MVC  (87)Azure  (42)Black Friday Deal  (1)Blazor  (236)BoldSign  (14)DocIO  (24)Essential JS 2  (110)Essential Studio  (200)File Formats  (74)Flutter  (137)JavaScript  (226)Microsoft  (122)PDF  (83)Python  (1)React  (105)Streamlit  (1)Succinctly series  (131)Syncfusion  (967)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (46)Webinar  (53)Windows Forms  (59)WinUI  (72)WPF  (163)Xamarin  (159)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (11)Business intelligence  (55)Button  (4)C#  (164)Chart  (148)Chart of the week  (58)Cloud  (15)Company  (440)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (73)Development  (681)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (13)Excel  (43)Extensions  (23)File Manager  (7)Gantt  (21)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (522)Mobile MVC  (9)OLAP server  (2)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (45)Performance  (13)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (8)Reporting / Back Office  (9)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (5)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (32)Solution Services  (4)Spreadsheet  (11)SQL  (15)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (406)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (628)What's new  (343)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

How to Incorporate Ionic Framework

Ionic is one of the most popular frameworks for building web apps right now. Did you know we have an ebook that not only shows you how to use Ionic, but also takes you through building an app with it? We thought we’d give you a quick look at what’s inside our popular ebook, Ionic Succinctly, by Ed Freitas.

The Ionic framework is an open-source SDK built on top of Angular, integrating with Cordova, and programmed using mostly TypeScript and JSON data format. Ionic is used to build cross-platform mobile apps and progressive web apps with ease by utilizing web technologies such as HTML, JavaScript, and CSS. In this e-book, Ed Freitas will guide you through the process of creating an app that searches through the popular Succinctly series library and sort the books into learning paths.

Key Ionic Concepts in only 91 pages.

  • Getting started with Ionic
  • Installing Ionic-Angular
  • Main differences from Ionic for Angular
  • Creating a new project
  • Ionic project structure
  • Starting the Ionic App
  • Using Visual Studio Code Ionic plugins
  • Building apps with Ionic frameworks

The key concepts in this book answer some of the leading developer questions regarding the Ionic framework, outlining practical concepts and implementation.

Get a glimpse inside this e-book:

Chapter 4: Building the App

Quick intro

One of the things I love most about Ionic is how easy it is to cover a lot of ground with barely any information overload. So far, we’ve seen how to scaffold a project, add pages, and wire those pages up, and also how to do testing with Ionic View and the browser, and deploy to Ionic Pro.

That’s actually an impressive feat on its own, considering that it’s all been outlined in a small number of pages. This is only possible because the framework accommodates for this level of brevity without sacrificing on essential content.

But like everything in life, the best way to learn something new—no matter how concise the content might be—is by building something. That’s what we’ll be doing throughout this chapter.

To make the most of this chapter, I highly advise you to check the great Ionic component documentation as we go along, also, which you can find here.

At the end of this chapter, you can find the link to download the full source code of this app.

Before we start

But before we start, I want to mention that I like to keep things simple—because it not only allows for easier knowledge retention, but also limits the scope to just the necessary essentials required to get something done.

With this philosophy in mind, let’s create our Succinctly Library app by keeping it as simple as possible. This means our app won’t use a database or perform AJAX requests, so all the data required will be hard-coded.

Of course, you may later modify the app to make it more complex and include such features, but that’s something I’ll totally leave up to you.

The Library page

The app’s Library page will be the main entry point to the application. As we’ve recently seen, it contains the side menu with the links to the other main pages of the app.

I’m a big fan of having a side menu in an app; however, I believe that the main content of the Library page should include some cards that also point or reference the other main pages of the app, such as Books and Paths—so let’s add some cards to the Library page in order to achieve this.

In order to add some data that we’ll display on these cards, we’ll need to open up the library.ts file and add the following code.

This code can be added to the LibraryPage class just before the constructor. This is how the updated library.ts file with this code now looks:

We’ll use the cardData object within the library.html file in order to build a couple of cards to display within the UI. Let’s do this next.

Let’s open up library.html and add the following code within the ion-content tag.

Let’s quickly examine this. We’ve added the ion-list component in order to be able to iterate through the various elements of the cardData object—this can be achieved by using ngFor.

Each element of cardData, represented by the card object, is then referenced within the ioncard component. The card.pushPage property is used to allow the user to navigate to the page that corresponds to card.title.

After making this change, this is how the library.html file looks:

We can preview the UI changes in the browser by running the ionic serve command.

In order to test Ionic-Angular’s navigation features, let’s click on either the Paths or the Books card. As expected, and as seen in Figure 4-b, the corresponding page is displayed and added to the navigation stack. This is possible because card.pushPage references the page that Ionic will mount.

We can unmount the current page on the navigation stack and return to the previous one—in this case, the Library page—by simply clicking the back arrow button.

We now have our Library page working; however, we can still improve the way the card component looks, so let’s do that next.

For more information on how to build an Ionic app, please continue reading.

If you like this blog post, we think you’ll also like the following free e-books:

Application Insights Succinctly
Google Maps API Succinctly
W3.CSS Succinctly
ASP.NET WebHooks Succinctly


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed