Skip to content

Commit b0e4f88

Browse files
committed
chore: re-enable the editor config, remove unused code
1 parent 31ba34f commit b0e4f88

File tree

3 files changed

+4
-114
lines changed

3 files changed

+4
-114
lines changed

apps/nativescript-demo-ng/src/app/home/home.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { EventData, Page, TabView } from '@nativescript/core';
77
selector: 'demo-home',
88
templateUrl: './home.component.html',
99
imports: [NativeScriptCommonModule],
10-
schemas: [NO_ERRORS_SCHEMA]
10+
schemas: [NO_ERRORS_SCHEMA],
1111
})
1212
export class HomeComponent implements OnInit {
1313
private _ngZone = inject(NgZone);
@@ -35,10 +35,6 @@ export class HomeComponent implements OnInit {
3535
}
3636
}
3737

38-
loadedTabView() {
39-
40-
}
41-
4238
private _viewTab(index: number) {
4339
let route;
4440
switch (index) {

apps/nativescript-demo-ng/tsconfig.editor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.app.json",
2+
"extends": "./tsconfig.json",
33
"include": ["**/*.ts"],
44
"compilerOptions": {
55
"types": ["jest", "node"]

packages/angular/src/lib/router/router.module.ts

Lines changed: 2 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
11
import {
22
APP_BASE_HREF,
3-
CommonModule,
43
HashLocationStrategy,
5-
Location,
6-
LocationStrategy,
74
LOCATION_INITIALIZED,
5+
LocationStrategy,
86
PathLocationStrategy,
97
PlatformLocation,
108
} from '@angular/common';
119
import {
1210
ApplicationRef,
13-
APP_BOOTSTRAP_LISTENER,
1411
ComponentRef,
1512
Inject,
1613
Injectable,
1714
Injector,
1815
ModuleWithProviders,
1916
NgModule,
20-
NgProbeToken,
2117
NO_ERRORS_SCHEMA,
2218
Optional,
23-
inject,
24-
provideAppInitializer,
2519
} from '@angular/core';
2620
import {
2721
ExtraOptions,
28-
NoPreloading,
29-
PreloadingStrategy,
3022
provideRoutes,
3123
Router,
24+
ROUTER_CONFIGURATION,
3225
RouterModule,
3326
RouterPreloader,
34-
ROUTER_CONFIGURATION,
35-
ROUTER_INITIALIZER,
3627
Routes,
3728
ɵROUTER_PROVIDERS,
3829
} from '@angular/router';
@@ -145,10 +136,6 @@ export class RouterInitializer {
145136
}
146137
}
147138

148-
export function routerNgProbeToken() {
149-
return new NgProbeToken('Router', Router);
150-
}
151-
152139
export function provideLocationStrategy(
153140
platformLocationStrategy: PlatformLocation,
154141
baseHref: string,
@@ -195,65 +182,6 @@ export class NativeScriptRouterModule {
195182
{ provide: START_PATH, useValue: '' },
196183
],
197184
};
198-
return {
199-
ngModule: NativeScriptRouterModule,
200-
providers: [
201-
...ɵROUTER_PROVIDERS,
202-
provideRoutes(routes),
203-
{ provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },
204-
{
205-
provide: LocationStrategy,
206-
useFactory: provideLocationStrategy,
207-
deps: [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION],
208-
},
209-
// {
210-
// provide: RouterScroller,
211-
// useFactory: createRouterScroller,
212-
// deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]
213-
// },
214-
{
215-
provide: PreloadingStrategy,
216-
useExisting: config && config.preloadingStrategy ? config.preloadingStrategy : NoPreloading,
217-
},
218-
{ provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },
219-
// {
220-
// provide: NSLocationStrategy,
221-
// useFactory: provideLocationStrategy,
222-
// deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService],
223-
// },
224-
// { provide: LocationStrategy, useExisting: NSLocationStrategy },
225-
NativescriptPlatformLocation,
226-
// { provide: NativescriptPlatformLocation, useClass: NativescriptPlatformLocation, deps: [[START_PATH, new Optional()]]},
227-
{
228-
provide: PlatformLocation,
229-
useExisting: NativescriptPlatformLocation,
230-
},
231-
{
232-
provide: LOCATION_INITIALIZED,
233-
useFactory: provideLocationInitialized,
234-
deps: [[START_PATH, new Optional()]],
235-
},
236-
{ provide: START_PATH, useValue: 'home2' },
237-
RouterInitializer,
238-
provideAppInitializer(() => {
239-
const initializerFn = getAppInitializer(inject(RouterInitializer));
240-
return initializerFn();
241-
}),
242-
{
243-
provide: ROUTER_INITIALIZER,
244-
useFactory: getBootstrapListener,
245-
deps: [RouterInitializer],
246-
},
247-
{
248-
provide: APP_BOOTSTRAP_LISTENER,
249-
multi: true,
250-
useExisting: ROUTER_INITIALIZER,
251-
},
252-
// RouterExtensions,
253-
// NSRouteReuseStrategy,
254-
// { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },
255-
],
256-
};
257185
}
258186

259187
static forModal(routes: Routes, config?: ExtraOptions): ModuleWithProviders<NativeScriptRouterModule> {
@@ -284,40 +212,6 @@ export class NativeScriptRouterModule {
284212
ModalRouterInitializer,
285213
],
286214
};
287-
return {
288-
ngModule: NativeScriptRouterModule,
289-
providers: [
290-
...ɵROUTER_PROVIDERS,
291-
provideRoutes(routes),
292-
{ provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },
293-
{
294-
provide: LocationStrategy,
295-
useFactory: provideLocationStrategy,
296-
deps: [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION],
297-
},
298-
{
299-
provide: PreloadingStrategy,
300-
useExisting: config && config.preloadingStrategy ? config.preloadingStrategy : NoPreloading,
301-
},
302-
{ provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },
303-
// {
304-
// provide: NSLocationStrategy,
305-
// useFactory: provideLocationStrategy,
306-
// deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService],
307-
// },
308-
// { provide: LocationStrategy, useExisting: NSLocationStrategy },
309-
NativescriptPlatformLocation,
310-
{
311-
provide: PlatformLocation,
312-
useExisting: NativescriptPlatformLocation,
313-
},
314-
{ provide: START_PATH, useValue: 'home3' },
315-
// { provide: Location, useClass: Location},
316-
// RouterExtensions,
317-
// NSRouteReuseStrategy,
318-
// { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },
319-
],
320-
};
321215
}
322216

323217
static forChild(routes: Routes): ModuleWithProviders<NativeScriptRouterModule> {

0 commit comments

Comments
 (0)