Cannot read property 'query' of null error
<p>I have this Angular2 code:</p>

<pre><code>import 'babel-polyfill';
import 'zone.js/dist/zone';
import { bootstrap } from "@angular/platform-browser-dynamic";

import { Component, ViewChild } from '@angular/core';
import Other from "./Other";

@Component({
    selector: "app",
    templateUrl: "app.html",
//  directives: [Other]
})
export default class AppComponent {

//  @ViewChild(Other) other: Other;

    constructor() {
    }
}

bootstrap(AppComponent);
</code></pre>

<p>If I uncomment the commented lines I get this error:</p>

<pre><code>EXCEPTION: TypeError: Cannot read property 'query' of null (index):68
EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot read property 'query' of null (index):76
STACKTRACE:window.console.error @ (index):76
BrowserDomAdapter.logError @ browser_adapter.js:77
ExceptionHandler.call @ exception_handler.js:59
(anonymous function) @ application_ref.js:265
schedulerFn @ async.js:123
SafeSubscriber.__tryOrUnsub @ Subscriber.js:225
SafeSubscriber.next @ Subscriber.js:174
Subscriber._next @ Subscriber.js:124
Subscriber.next @ Subscriber.js:88
Subject._finalNext @ Subject.js:128
Subject._next @ Subject.js:120
Subject.next @ Subject.js:77
EventEmitter.emit @ async.js:112
NgZone._zoneImpl.ng_zone_impl_1.
NgZoneImpl.onError @ ng_zone.js:120
NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:66
ZoneDelegate.handleError @ zone.js:327
Zone.runGuarded @ zone.js:233
_loop_1 @ zone.js:487
drainMicroTaskQueue @ zone.js:494
ZoneTask.invoke @ zone.js:426 (index):76
Error: Uncaught (in promise): TypeError: Cannot read property 'query' of null
    at resolvePromise (zone.js:538)
    at PromiseCompleter.reject (zone.js:515)
    at application_ref.js:295
    at ZoneDelegate.invoke (zone.js:323)
    at Object.NgZoneImpl.inner.inner.fork.onInvoke (ng_zone_impl.js:45)
    at ZoneDelegate.invoke (zone.js:322)
    at Zone.run (zone.js:216)
    at zone.js:571
    at ZoneDelegate.invokeTask (zone.js:356)
    at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (ng_zone_impl.js:36)
window.console.error @ (index):76
BrowserDomAdapter.logError @ browser_adapter.js:77
ExceptionHandler.call @ exception_handler.js:60
(anonymous function) @ application_ref.js:265
schedulerFn @ async.js:123
SafeSubscriber.__tryOrUnsub @ Subscriber.js:225
SafeSubscriber.next @ Subscriber.js:174
Subscriber._next @ Subscriber.js:124
Subscriber.next @ Subscriber.js:88
Subject._finalNext @ Subject.js:128
Subject._next @ Subject.js:120
Subject.next @ Subject.js:77
EventEmitter.emit @ async.js:112
NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.js:120
NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:66
ZoneDelegate.handleError @ zone.js:327
Zone.runGuarded @ zone.js:233
_loop_1 @ zone.js:487
drainMicroTaskQueue @ zone.js:494
ZoneTask.invoke @ zone.js:426
(index):76
Unhandled Promise rejection:window.console.error @ (index):76
consoleError @ zone.js:461
_loop_1 @ zone.js:490
drainMicroTaskQueue @ zone.js:494
ZoneTask.invoke @ zone.js:426
(index):76
Error: Uncaught (in promise): TypeError: Cannot read property 'query' of null(…)window.console.error @ (index):76
consoleError @ zone.js:463
_loop_1 @ zone.js:490
drainMicroTaskQueue @ zone.js:494
ZoneTask.invoke @ zone.js:426
socket.io.js:5120 
Uncaught RangeError: Maximum call stack size exceeded
</code></pre>