Skip to content

Commit 8f136be

Browse files
committed
chore: ng demo
1 parent ada1b4c commit 8f136be

File tree

5 files changed

+10257
-8238
lines changed

5 files changed

+10257
-8238
lines changed

demo-snippets/ng/basic-pager/basic-pager.component.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component, NO_ERRORS_SCHEMA, OnInit } from '@angular/core';
22
import { RouterExtensions } from '@nativescript/angular';
33

44
@Component({
55
selector: 'ns-basic-pager',
66
templateUrl: './basic-pager.component.html',
7-
styleUrls: ["./basic-pager.component.scss"],
7+
styleUrls: ['./basic-pager.component.scss']
88
})
99
export class BasicPagerComponent implements OnInit {
1010
constructor(private router: RouterExtensions) {}
1111

1212
items = [
1313
{
14-
title: "First",
15-
color: "#e67e22"
14+
title: 'First',
15+
color: '#e67e22'
1616
},
1717
{
18-
title: "Second",
19-
color: "#3498db"
18+
title: 'Second',
19+
color: '#3498db'
2020
},
2121
{
22-
title: "Third",
23-
color: "#e74c3c"
22+
title: 'Third',
23+
color: '#e74c3c'
2424
},
2525
{
26-
title: "Fourth",
27-
color: "#9b59b6"
26+
title: 'Fourth',
27+
color: '#9b59b6'
2828
}
2929
];
3030

demo-snippets/ng/indicator/indicator.component.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component, NO_ERRORS_SCHEMA, OnInit } from '@angular/core';
22
import { RouterExtensions } from '@nativescript/angular';
33

44
@Component({
55
selector: 'ns-indicator',
66
templateUrl: './indicator.component.html',
7-
styleUrls: ["./indicator.component.scss"],
7+
styleUrls: ['./indicator.component.scss']
88
})
99
export class IndicatorComponent implements OnInit {
1010
selectedIndex = 0;
@@ -13,20 +13,20 @@ export class IndicatorComponent implements OnInit {
1313

1414
items = [
1515
{
16-
title: "First",
17-
color: "#e67e22"
16+
title: 'First',
17+
color: '#e67e22'
1818
},
1919
{
20-
title: "Second",
21-
color: "#3498db"
20+
title: 'Second',
21+
color: '#3498db'
2222
},
2323
{
24-
title: "Third",
25-
color: "#e74c3c"
24+
title: 'Third',
25+
color: '#e74c3c'
2626
},
2727
{
28-
title: "Fourth",
29-
color: "#9b59b6"
28+
title: 'Fourth',
29+
color: '#9b59b6'
3030
}
3131
];
3232

demo-snippets/ng/install.module.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
import { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptModule } from '@nativescript/angular';
23

3-
import { PagerModule } from "@nativescript-community/ui-pager/angular";
4+
import { PagerModule } from '@nativescript-community/ui-pager/angular';
45

56
import { StaticPagerComponent } from './static-pager/static-pager.component';
67
import { BasicPagerComponent } from './basic-pager/basic-pager.component';
78
import { IndicatorComponent } from './indicator/indicator.component';
89

910
export const COMPONENTS = [StaticPagerComponent, BasicPagerComponent, IndicatorComponent];
1011
@NgModule({
11-
imports: [PagerModule],
12+
imports: [NativeScriptModule, PagerModule],
13+
declarations: [...COMPONENTS],
1214
exports: [PagerModule],
1315
schemas: [NO_ERRORS_SCHEMA]
1416
})
1517
export class InstallModule {}
1618

17-
export function installPlugin() { }
19+
export function installPlugin() {}
1820

1921
export const demos = [
2022
{ name: 'Static Pager', path: 'static-pager', component: StaticPagerComponent },
2123
{ name: 'Basic Pager', path: 'basic-pager', component: BasicPagerComponent },
22-
{ name: 'Indicator', path: 'indicator', component: IndicatorComponent }
24+
{ name: 'Indicator', path: 'indicator', component: IndicatorComponent },
25+
{ name: 'Carousel', path: 'carousel', component: CarouselComponent },
2326
];
24-

demo-snippets/ng/static-pager/static-pager.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component, NO_ERRORS_SCHEMA, OnInit } from '@angular/core';
22
import { RouterExtensions } from '@nativescript/angular';
33

44
@Component({
55
selector: 'ns-static-pager',
66
templateUrl: './static-pager.component.html',
7-
styleUrls: ["./static-pager.component.scss"],
7+
styleUrls: ['./static-pager.component.scss']
88
})
99
export class StaticPagerComponent implements OnInit {
1010
constructor(private router: RouterExtensions) {}

0 commit comments

Comments
 (0)