Skip to content

Commit 951909a

Browse files
authored
docs: update quick-setup link (#2179)
1 parent 221e404 commit 951909a

File tree

5 files changed

+72
-72
lines changed

5 files changed

+72
-72
lines changed

DevelopmentWorkflow.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
Install your native toolchain and NativeScript as described in the docs:
2222

23-
https://docs.nativescript.org/setup/quick-setup
23+
https://docs.nativescript.org/angular/start/quick-setup
2424

2525
### Clone repository
2626

nativescript-angular/directives/templated-items-comp.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ import {
1919
ViewContainerRef,
2020
ɵisListLikeIterable as isListLikeIterable
2121
} from "@angular/core";
22+
// tslint:disable: max-line-length
2223
// TODO: refactor core module imports to allow this to work properly
2324
// import { View, LayoutBase, KeyedTemplate, ItemEventData, TemplatedItemsView, ObservableArray } from "@nativescript/core";
2425
// Ivy entry points get out of order and will cause issues like this:
2526
// node_modules/@nativescript/core/ui/html-view/html-view-common.js:26:0: JS ERROR TypeError: undefined is not an object (evaluating 'color_1.Color.equals') if not using deep imports like the following for the moment
27+
// tslint:enable: max-line-length
2628
import { ItemEventData, TemplatedItemsView } from "@nativescript/core/ui/list-view";
2729
import { View, KeyedTemplate } from "@nativescript/core/ui/core/view";
2830
import { LayoutBase } from "@nativescript/core/ui/layouts/layout-base";

nativescript-angular/platform-common.ts

+68-66
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import "nativescript-intl";
1313
import { TextView } from "@nativescript/core/ui/text-view";
1414
import { Color, View } from "@nativescript/core/ui/core/view";
1515
import { Frame } from "@nativescript/core/ui/frame";
16-
import { GridLayout } from '@nativescript/core/ui/layouts/grid-layout';
16+
import { GridLayout } from "@nativescript/core/ui/layouts/grid-layout";
1717

1818
import {
1919
Type,
@@ -76,8 +76,8 @@ export interface HmrOptions {
7676
// tslint:enable:max-line-length
7777

7878
export interface AppLaunchView extends View {
79-
startAnimation?: () => void;
80-
cleanup?: () => void;
79+
startAnimation?: () => void;
80+
cleanup?: () => void;
8181
}
8282

8383
export interface AppOptions {
@@ -209,50 +209,52 @@ export class NativeScriptPlatformRef extends PlatformRef {
209209
}
210210

211211
if (this.appOptions && this.appOptions.launchView) {
212-
launchView = this.appOptions.launchView;
213-
if (this.appOptions.launchView.startAnimation) {
214-
setTimeout(() => {
215-
// ensure launch animation is executed after launchView added to view stack
216-
this.appOptions.launchView.startAnimation();
217-
});
218-
}
212+
launchView = this.appOptions.launchView;
213+
if (this.appOptions.launchView.startAnimation) {
214+
setTimeout(() => {
215+
// ensure launch animation is executed after launchView added to view stack
216+
this.appOptions.launchView.startAnimation();
217+
});
218+
}
219219
} else {
220-
launchView = new GridLayout();
221-
// Custom launch view color (useful when doing async app intializers where you don't want a flash of undesirable color)
222-
launchView.backgroundColor = new Color(this.appOptions && this.appOptions.backgroundColor ? this.appOptions.backgroundColor : '#fff');
220+
launchView = new GridLayout();
221+
// Custom launch view color (useful when doing async app intializers
222+
// where you don't want a flash of undesirable color).
223+
const bgCol = this.appOptions && this.appOptions.backgroundColor ? this.appOptions.backgroundColor : "#fff";
224+
launchView.backgroundColor = new Color(bgCol);
223225
}
224226
args.root = launchView;
225227
setRootPage(<any>launchView);
226228

227229
// Launch Angular app
228230
this._bootstrapper().then(
229-
moduleRef => {
230-
231-
if (isLogEnabled()) {
232-
bootstrapLog(`Angular bootstrap bootstrap done. uptime: ${uptime()}`);
233-
}
234-
235-
rootContent = launchView;
236-
if (launchView && launchView.cleanup) {
237-
// cleanup any custom launch views
238-
launchView.cleanup();
239-
}
240-
241-
lastBootstrappedModule = new WeakRef(moduleRef);
242-
},
243-
err => {
244-
245-
const errorMessage = err.message + "\n\n" + err.stack;
246-
if (isLogEnabled()) {
247-
bootstrapLogError("ERROR BOOTSTRAPPING ANGULAR");
248-
}
249-
if (isLogEnabled()) {
250-
bootstrapLogError(errorMessage);
251-
}
252-
253-
rootContent = this.createErrorUI(errorMessage);
254-
}
255-
);
231+
moduleRef => {
232+
233+
if (isLogEnabled()) {
234+
bootstrapLog(`Angular bootstrap bootstrap done. uptime: ${uptime()}`);
235+
}
236+
237+
rootContent = launchView;
238+
if (launchView && launchView.cleanup) {
239+
// cleanup any custom launch views
240+
launchView.cleanup();
241+
}
242+
243+
lastBootstrappedModule = new WeakRef(moduleRef);
244+
},
245+
err => {
246+
247+
const errorMessage = err.message + "\n\n" + err.stack;
248+
if (isLogEnabled()) {
249+
bootstrapLogError("ERROR BOOTSTRAPPING ANGULAR");
250+
}
251+
if (isLogEnabled()) {
252+
bootstrapLogError(errorMessage);
253+
}
254+
255+
rootContent = this.createErrorUI(errorMessage);
256+
}
257+
);
256258
}
257259
);
258260
const exitCallback = profile(
@@ -293,32 +295,32 @@ export class NativeScriptPlatformRef extends PlatformRef {
293295
}
294296

295297
this._bootstrapper().then(
296-
moduleRef => {
297-
if (isLogEnabled()) {
298-
bootstrapLog("Angular livesync done.");
299-
}
300-
onAfterLivesync.next({ moduleRef });
301-
302-
lastBootstrappedModule = new WeakRef(moduleRef);
303-
applicationRerun({
304-
create: () => getRootPage(),
305-
});
306-
},
307-
error => {
308-
if (isLogEnabled()) {
309-
bootstrapLogError("ERROR LIVESYNC BOOTSTRAPPING ANGULAR");
310-
}
311-
const errorMessage = error.message + "\n\n" + error.stack;
312-
if (isLogEnabled()) {
313-
bootstrapLogError(errorMessage);
314-
}
315-
316-
applicationRerun({
317-
create: () => this.createErrorUI(errorMessage),
318-
});
319-
onAfterLivesync.next({ error });
320-
}
321-
);
298+
moduleRef => {
299+
if (isLogEnabled()) {
300+
bootstrapLog("Angular livesync done.");
301+
}
302+
onAfterLivesync.next({ moduleRef });
303+
304+
lastBootstrappedModule = new WeakRef(moduleRef);
305+
applicationRerun({
306+
create: () => getRootPage(),
307+
});
308+
},
309+
error => {
310+
if (isLogEnabled()) {
311+
bootstrapLogError("ERROR LIVESYNC BOOTSTRAPPING ANGULAR");
312+
}
313+
const errorMessage = error.message + "\n\n" + error.stack;
314+
if (isLogEnabled()) {
315+
bootstrapLogError(errorMessage);
316+
}
317+
318+
applicationRerun({
319+
create: () => this.createErrorUI(errorMessage),
320+
});
321+
onAfterLivesync.next({ error });
322+
}
323+
);
322324
}
323325

324326
private createErrorUI(message: string): View {

nativescript-angular/router/router.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class NativeScriptRouterModule {
3939
return {
4040
ngModule: NativeScriptRouterModule,
4141
providers: [
42-
...RouterModule.forRoot(routes, config).providers,
42+
...RouterModule.forRoot(routes, config).providers,
4343
{
4444
provide: NSLocationStrategy,
4545
useFactory: provideLocationStrategy,

nativescript-angular/tslint.json

-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
"rules":{
66
"directive-selector": [true, "attribute", "ns", "camelCase"],
77
"component-selector": [true, "element", "", "camelCase"],
8-
"use-input-property-decorator": true,
9-
"use-output-property-decorator": true,
108
"no-input-rename": true,
119
"no-output-rename": true,
1210
"use-pipe-transform-interface": true,
13-
"pipe-naming": [true, "camelCase", "ns"],
1411
"component-class-suffix": true,
1512
"directive-class-suffix": true,
1613
"member-access": false,
@@ -60,7 +57,6 @@
6057
"no-string-literal": false,
6158
"no-switch-case-fall-through": true,
6259
"no-unused-expression": true,
63-
"no-unused-variable": true,
6460
"no-var-keyword": true,
6561
"radix": false,
6662
"switch-default": true,

0 commit comments

Comments
 (0)