Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering TypeScript 3

You're reading from   Mastering TypeScript 3 Build enterprise-ready, industrial-strength web applications using TypeScript 3 and modern frameworks

Arrow left icon
Product type Paperback
Published in Feb 2019
Publisher Packt
ISBN-13 9781789536706
Length 694 pages
Edition 3rd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Nathan Rozentals Nathan Rozentals
Author Profile Icon Nathan Rozentals
Nathan Rozentals
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. TypeScript Tools and Framework Options FREE CHAPTER 2. Types, Variables, and Function Techniques 3. Interfaces, Classes, and Inheritance 4. Decorators, Generics, and Asynchronous Features 5. Declaration Files and Strict Compiler Options 6. Third-Party Libraries 7. TypeScript Compatible Frameworks 8. Test-Driven Development 9. Testing Typescript Compatible Frameworks 10. Modularization 11. Object-Oriented Programming 12. Dependency Injection 13. Building Applications 14. Let's Get Our Hands Dirty 15. Other Books You May Enjoy

Modular code

So far, our application has all of its HTML, CSS, and business logic as part of the AppComponent class. Although we have already broken this class down into separate app.component.html and app.component.css files, it really contains a number of separate components all in one. Let's take this opportunity to modularize our code, and create three separate classes. These three separate classes will be, as follows:

  • A NavbarComponent class to render and handle the navigation bar at the top of the screen.
  • A SideNavComponent class to render the left-hand side navigation panel.
  • A RightScreenComponent to handle the detail panel that slides in from the right.

This means that the AppComponent class becomes the central application class, and it will be responsible for coordinating each of these components.

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime