You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: fix tab title
* chore: add missed import statement
* chore: fix path to assets
According to the folder structure stated in the Folder structure section, the assets folder is in the app folder, not in the src one.
* chore: app.scss --> app.css
Since the app template provides app.css but not app.scss, we need to provide the styles in the correct format.
description: `A satirical examination of the beliefs and practices of The Church of Jesus Christ of Latter-day Saints.`,
229
229
details: [
@@ -237,13 +237,11 @@ export class FlickService {
237
237
},
238
238
{
239
239
title: 'Revenue',
240
-
body:
241
-
'Grossed over $500 million, making it one of the most successful musicals of all time.'
240
+
body: 'Grossed over $500 million, making it one of the most successful musicals of all time.'
242
241
},
243
242
{
244
243
title: 'History',
245
-
body:
246
-
'The Book of Mormon was conceived by Trey Parker, Matt Stone, and Robert Lopez. Parker and Stone grew up in Colorado and were familiar with The Church of Jesus Christ of Latter-day Saints and its members. They became friends at the University of Colorado Boulder and collaborated on a musical film, Cannibal! The Musical (1993), their first experience with movie musicals. In 1997, they created the TV series South Park for Comedy Central and in 1999, the musical film South Park: Bigger, Longer & Uncut. The two had first thought of a fictionalized Joseph Smith, religious leader and founder of the Latter Day Saint movement while working on an aborted Fox series about historical characters. Their 1997 film, Orgazmo, and a 2003 episode of South Park, "All About Mormons", both gave comic treatment to Mormonism. Smith was also included as one of South Park\'s "Super Best Friends", a Justice League parody team of religious figures like Jesus and Buddha.'
244
+
body: 'The Book of Mormon was conceived by Trey Parker, Matt Stone, and Robert Lopez. Parker and Stone grew up in Colorado and were familiar with The Church of Jesus Christ of Latter-day Saints and its members. They became friends at the University of Colorado Boulder and collaborated on a musical film, Cannibal! The Musical (1993), their first experience with movie musicals. In 1997, they created the TV series South Park for Comedy Central and in 1999, the musical film South Park: Bigger, Longer & Uncut. The two had first thought of a fictionalized Joseph Smith, religious leader and founder of the Latter Day Saint movement while working on an aborted Fox series about historical characters. Their 1997 film, Orgazmo, and a 2003 episode of South Park, "All About Mormons", both gave comic treatment to Mormonism. Smith was also included as one of South Park\'s "Super Best Friends", a Justice League parody team of religious figures like Jesus and Buddha.'
description: `The legend of Grand Duchess Anastasia Nikolaevna of Russia.`,
291
289
details: [
@@ -319,7 +317,7 @@ export class FlickService {
319
317
}
320
318
```
321
319
322
-
Add a `/src/assets/` directory to your project, and copy the 3 static images over from the sample project [here](https://github.com/NativeScript/tutorials/tree/main/angular-tutorial/src/assets).
320
+
Add a `/src/app/assets/` directory to your project, and copy the 3 static images over from the sample project [here](https://github.com/NativeScript/tutorials/tree/main/angular-tutorial/src/assets).
323
321
324
322
:::tip Note
325
323
You can create barrel exports for your models and services to give you more flexibility in organizing your files and folders. To do this, create an `index.ts` in your `services` and `models` directory and export `flick.service.ts` and `flick.model.ts` respectively. You can also add another `index.ts` in your `core` folder and export your `services` and `models` directory.
@@ -384,41 +382,37 @@ Next, open your `home.component.html` and add the `ListView` component:
384
382
385
383
### Create flick cards
386
384
387
-
Before we dive into creating the card below, let's create some classes for our background and text colors that we will be using in the application. As this will be shared throughout the application, let's add this to the `app.scss`. Open `app.scss` and add the following:
385
+
Before we dive into creating the card below, let's create some classes for our background and text colors that we will be using in the application. As this will be shared throughout the application, let's add this to the `app.css`. Open `app.css` and add the following:
388
386
389
-
```scss
390
-
// src/app.scss
387
+
```css
388
+
/* src/app.css */
391
389
392
-
// applied when device is in light mode
393
-
.ns-light {
394
-
.bg-primary {
395
-
background-color: #fdfdfd;
396
-
}
397
-
.bg-secondary {
398
-
background-color: #ffffff;
399
-
}
400
-
.text-primary {
401
-
color: #444;
402
-
}
403
-
.text-secondary {
404
-
color: #777;
405
-
}
390
+
/* applied when device is in light mode */
391
+
.ns-light.bg-primary {
392
+
background-color: #fdfdfd;
393
+
}
394
+
.ns-light.bg-secondary {
395
+
background-color: #ffffff;
396
+
}
397
+
.ns-light.text-primary {
398
+
color: #444;
399
+
}
400
+
.ns-light.text-secondary {
401
+
color: #777;
406
402
}
407
403
408
-
// applied when device is in dark mode
409
-
.ns-dark {
410
-
.bg-primary {
411
-
background-color: #212121;
412
-
}
413
-
.bg-secondary {
414
-
background-color: #383838;
415
-
}
416
-
.text-primary {
417
-
color: #eee;
418
-
}
419
-
.text-secondary {
420
-
color: #ccc;
421
-
}
404
+
/* applied when device is in dark mode */
405
+
.ns-dark.bg-primary {
406
+
background-color: #212121;
407
+
}
408
+
.ns-dark.bg-secondary {
409
+
background-color: #383838;
410
+
}
411
+
.ns-dark.text-primary {
412
+
color: #eee;
413
+
}
414
+
.ns-dark.text-secondary {
415
+
color: #ccc;
422
416
}
423
417
```
424
418
@@ -482,7 +476,7 @@ Let's start with creating the files for our details feature with the following c
@@ -575,13 +569,14 @@ export class AppRoutingModule {}
575
569
576
570
Now that we have the routes already set up, we can use NativeScript Angular's `RouterExtensions` to perform the navigation. The `RouterExtensions` class provides methods for imperative navigation, similar to how you would navigate with the Angular `Router` and `Location` classes. To use the class simply inject it in your component constructor and call it's `navigate` function. Open `home.component.ts` and add the following:
577
571
578
-
```typescript{7,21,25-27}
572
+
```typescript{7-8,22,26-28}
579
573
// src/app/features/home/home.component.ts
580
574
581
575
import { Component } from '@angular/core'
582
576
import { FlickService } from '~/app/core'
583
577
584
578
// Add this 👇
579
+
import { ItemEventData } from '@nativescript/core'
585
580
import { RouterExtensions } from '@nativescript/angular'
0 commit comments