Book Image

NativeScript for Angular Mobile Development

By : Nathan Walker, Nathanael J. Anderson
Book Image

NativeScript for Angular Mobile Development

By: Nathan Walker, Nathanael J. Anderson

Overview of this book

NativeScript is an open source framework that is built by Progress in order to build truly native mobile apps with TypeScript, JavaScript or just Angular which is an open source framework built by Google that offers declarative templates, dependency injection, and fully featured modules to build rich applications. Angular’s versatile view handling architecture allows your views to be rendered as highly performant UI components native to iOS and Android mobile platforms. This decoupling of the view rendering layer in Angular combined with the power of native APIs with NativeScript have together created the powerful and exciting technology stack of NativeScript for Angular. This book focuses on the key concepts that you will need to know to build a NativeScript for Angular mobile app for iOS and Android. We’ll build a fun multitrack recording studio app, touching on powerful key concepts from both technologies that you may need to know when you start building an app of your own. The structure of the book takes the reader from a void to a deployed app on both the App Store and Google Play, serving as a reference guide and valuable tips/tricks handbook. By the end of this book, you’ll know majority of key concepts needed to build a successful NativeScript for Angular app.
Table of Contents (24 chapters)
Title Page
About the Authors
About the Reviewer
Customer Feedback
Integration Testing with Appium

Chapter 1. Get Into Shape with @NgModule

In this chapter, we are going to kick things off with some solid project organization exercises to prepare us for building an amazing app with NativeScript for Angular. We want to give you some insights into a few important and powerful concepts to think about as you plan your architecture, to pave your way to a smooth development experience with scalability in mind.

Combining Angular with NativeScript provides a wealth of useful paradigms and tools to construct and plan your app. As often said, with great power comes great responsibility, and as awesome as this tech combination is to create amazing apps, they can also be used for creating an overengineered and difficult to debug app. Let's take a few chapters to walk through some exercises you can use to help avoid common pitfalls and truly unlock the full potential of this stack.

We will introduce you to Angular's @NgModule decorator, which we will use exclusively to help organize our app's code into logical units with explicit purpose and portability in mind. We will also introduce a few Angular concepts we will use in our architecture, such as dependency injectable services. After doing our diligence in building a solid foundation to work with, we will rapidly approach running our app for the first time towards the end of third chapter.

In this chapter, we will be covering the following topics:

  • What is NativeScript for Angular?
  • Setting up your native mobile app
  • Project Organization
  • Architecture planning
  • @NgModule decorator
  • @Injectable decorator
  • Breaking your app into modules