From the course: Building Native Mobile Apps with NativeScript and Angular 2
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Directives: ngIf - JavaScript Tutorial
From the course: Building Native Mobile Apps with NativeScript and Angular 2
Directives: ngIf
- [Narrator] Let's switch gears and leave the item list for a bit, while we work on the item details page to see two common Angular structure directives at work. Later in this course, we'll add navigation between the list and the details pages. Let's close everything out here, and we're gonna create a new pt-item folder, module and component. Since the backlog item is still part of the backlog feature, we'll create a folder for the item page inside the pt-backlog feature folder. We'll be adding quite a few things in the pt-item folder that are all related, so let's create a separate angular module just for the pt-item. You can think of it as a mini feature within the backlog feature. We're gonna call this file pt-item.module, and we're gonna create pt-item.component, typescript HTML and CSS files in this folder. Let's use our Angular snippets to create a component. We're gonna call it PTItem. And in the HTML, let's use the ns label snippet. And we're gonna set the text property to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Components5m
-
Component template2m 58s
-
Component styles2m 25s
-
Template variables3m 41s
-
Handling Listview tap2m 33s
-
Backlog item template4m 9s
-
Nested layouts4m 50s
-
Directives: ngIf6m 52s
-
Directives: ngFor3m 48s
-
Dependency injection: Part 14m 26s
-
Dependency injection: Part 26m 31s
-
Application lifecycle9m 56s
-
Modules3m 40s
-
Barrels2m 6s
-
-
-
-
-