Skip to content

Commit b5c6005

Browse files
committed
fix: ng template updates
1 parent 25ef464 commit b5c6005

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

packages/template-hello-world-ng/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/template-hello-world-ng",
33
"main": "./src/main.ts",
4-
"version": "8.9.2",
4+
"version": "8.9.3",
55
"author": "NativeScript Team <[email protected]>",
66
"description": "NativeScript Angular Hello World template",
77
"license": "Apache-2.0",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Routes } from '@angular/router';
2-
import { PeopleComponent } from './people/person.component';
2+
import { PersonComponent } from './people/person.component';
33
import { PersonDetailComponent } from './people/person-detail.component';
44

55
export const routes: Routes = [
66
{ path: '', redirectTo: '/items', pathMatch: 'full' },
7-
{ path: 'items', component: PeopleComponent },
7+
{ path: 'items', component: PersonComponent },
88
{ path: 'item/:id', component: PersonDetailComponent },
99
];

packages/template-hello-world-ng/src/app/people/people.component.html renamed to packages/template-hello-world-ng/src/app/people/person.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ActionBar title="Computer Scientists"> </ActionBar>
1+
<ActionBar title="Computer Scientists" iosLargeTitle="true"> </ActionBar>
22

33
<GridLayout>
44
<ListView [items]="personService.items()">
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
import { ChangeDetectionStrategy, Component, NO_ERRORS_SCHEMA, inject } from '@angular/core'
22
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'
3-
import { Page } from '@nativescript/core'
43
import { PersonService } from './person.service'
54

65
@Component({
7-
selector: 'ns-people',
8-
templateUrl: './people.component.html',
6+
selector: 'ns-person',
7+
templateUrl: './person.component.html',
98
imports: [NativeScriptCommonModule, NativeScriptRouterModule],
109
schemas: [NO_ERRORS_SCHEMA],
1110
changeDetection: ChangeDetectionStrategy.OnPush
1211
})
13-
export class PeopleComponent {
12+
export class PersonComponent {
1413
personService = inject(PersonService);
15-
page = inject(Page);
16-
17-
constructor() {
18-
// Setup large titles on iOS
19-
this.page.on('loaded', (args) => {
20-
if (__IOS__) {
21-
const navigationController: UINavigationController = this.page.frame.ios.controller;
22-
navigationController.navigationBar.prefersLargeTitles = true;
23-
}
24-
})
25-
}
2614
}

0 commit comments

Comments
 (0)