Skip to content

Commit 7ce5f8d

Browse files
Remove trailing whitespace in KO template
1 parent 00b5981 commit 7ce5f8d

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

templates/KnockoutSpa/ClientApp/components/app-root/app-root.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ const routes: Route[] = [
1212
class AppRootViewModel {
1313
public route: KnockoutObservable<Route>;
1414
private _router: Router;
15-
15+
1616
constructor(params: { history: HistoryModule.History }) {
1717
// Activate the client-side router
1818
this._router = new Router(params.history, routes)
1919
this.route = this._router.currentRoute;
20-
20+
2121
// Load and register all the KO components needed to handle the routes
2222
// The optional 'bundle?lazy!' prefix is a Webpack feature that causes the referenced modules
2323
// to be split into separate files that are then loaded on demand.
@@ -27,12 +27,12 @@ class AppRootViewModel {
2727
ko.components.register('counter-example', require('bundle?lazy!../counter-example/counter-example'));
2828
ko.components.register('fetch-data', require('bundle?lazy!../fetch-data/fetch-data'));
2929
}
30-
30+
3131
// To support hot module replacement, this method unregisters the router and KO components.
3232
// In production scenarios where hot module replacement is disabled, this would not be invoked.
3333
public dispose() {
3434
this._router.dispose();
35-
35+
3636
// TODO: Need a better API for this
3737
Object.getOwnPropertyNames((<any>ko).components._allRegisteredComponents).forEach(componentName => {
3838
ko.components.unregister(componentName);

templates/KnockoutSpa/ClientApp/components/counter-example/counter-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as ko from 'knockout';
22

33
class CounterExampleViewModel {
44
public currentCount = ko.observable(0);
5-
5+
66
public incrementCounter() {
77
let prevCount = this.currentCount();
88
this.currentCount(prevCount + 1);

templates/KnockoutSpa/ClientApp/components/fetch-data/fetch-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface WeatherForecast {
99

1010
class FetchDataViewModel {
1111
public forecasts = ko.observableArray<WeatherForecast>();
12-
12+
1313
constructor() {
1414
fetch('/api/SampleData/WeatherForecasts')
1515
.then(response => response.json())

templates/KnockoutSpa/ClientApp/components/nav-menu/nav-menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface NavMenuParams {
77

88
class NavMenuViewModel {
99
public route: KnockoutObservable<Route>;
10-
10+
1111
constructor(params: NavMenuParams) {
1212
// This viewmodel doesn't do anything except pass through the 'route' parameter to the view.
1313
// You could remove this viewmodel entirely, and define 'nav-menu' as a template-only component.

templates/KnockoutSpa/ClientApp/router.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class Router {
1313
public currentRoute = ko.observable<Route>({});
1414
private disposeHistory: () => void;
1515
private clickEventListener: EventListener;
16-
16+
1717
constructor(history: HistoryModule.History, routes: Route[]) {
1818
// Reset and configure Crossroads so it matches routes and updates this.currentRoute
1919
crossroads.removeAllRoutes();
@@ -25,7 +25,7 @@ export class Router {
2525
});
2626
});
2727

28-
// Make history.js watch for navigation and notify Crossroads
28+
// Make history.js watch for navigation and notify Crossroads
2929
this.disposeHistory = history.listen(location => crossroads.parse(location.pathname));
3030
this.clickEventListener = evt => {
3131
let target: any = evt.target;
@@ -37,10 +37,10 @@ export class Router {
3737
}
3838
}
3939
};
40-
40+
4141
document.addEventListener('click', this.clickEventListener);
4242
}
43-
43+
4444
public dispose() {
4545
this.disposeHistory();
4646
document.removeEventListener('click', this.clickEventListener);

templates/KnockoutSpa/ClientApp/webpack-component-loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ko.components.loaders.unshift({
99
if (typeof componentConfig === 'function') {
1010
// It's a lazy-loaded Webpack bundle
1111
(componentConfig as any)(loadedModule => {
12-
// Handle TypeScript-style default exports
12+
// Handle TypeScript-style default exports
1313
if (loadedModule.__esModule && loadedModule.default) {
1414
loadedModule = loadedModule.default;
1515
}
16-
16+
1717
// Pass the loaded module to KO's default loader
1818
ko.components.defaultLoader.loadComponent(name, loadedModule, callback);
1919
});

0 commit comments

Comments
 (0)