NativeScript : Getting Template parse errors: Only void and foreign elements can be self closed
<p>I'm creating a sample application in NativeScript. I'm getting template parse errors while running the application in my android device.</p>

<p>My code in template is just :</p>

<pre><code>&lt;Page xmlns="http://schemas.nativescript.org/tns.xsd"&gt;
  &lt;Page.actionBar&gt;
      &lt;ActionBar title="My ActionBar"/&gt;
  &lt;/Page.actionBar&gt;
&lt;/Page&gt;
</code></pre>

<p>I'm getting the following error : </p>

<pre><code>Template parse errors:
Only void and foreign elements can be self closed "ActionBar" ("&lt;Page xmlns="http://schemas.nativescript.org/tns.xsd"&gt;
  &lt;Page.actionBar&gt;
      [ERROR -&gt;]&lt;ActionBar title="My ActionBar"/&gt;
  &lt;/Page.actionBar&gt;
&lt;/Page&gt;"): AppComponent@2:6

Error: Template parse errors:
Only void and foreign elements can be self closed "ActionBar" ("&lt;Page xmlns="http://schemas.nativescript.org/tns.xsd"&gt;
  &lt;Page.actionBar&gt;
      [ERROR -&gt;]&lt;ActionBar title="My ActionBar"/&gt;
  &lt;/Page.actionBar&gt;
&lt;/Page&gt;"): AppComponent@2:6
    at DirectiveNormalizer.normalizeLoadedTemplate (/data/data/org.nativescript.neurix/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js:13506:21)
    at /data/data/org.nativescript.neurix/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js:13499:53
    at ZoneDelegate.invoke (/data/data/org.nativescript.neurix/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:190:28)
    at Zone.run (/data/data/org.nativescript.neurix/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:83:43)
    at /data/data/org.nativescript.neurix/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:449:57
    at ZoneDelegate.invokeTask (/data/data/org.nativescript.neurix/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:223:37)
    at Zone.runTask (/data/data/org.nativescript.neurix/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:123:47)
    at drainMicroTaskQueue (/data/data/org.nativescript.neurix/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:355:35)
</code></pre>

<p>When I add the closing tags, another error is showing : </p>

<pre><code>Error in app.component.html:0:0 caused by: this.page.frame._getNavBarVisible is not a function

    TypeError: this.page.frame._getNavBarVisible is not a function
        at ActionBar.update (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/action-bar/action-bar.js:146:50)
        at ActionBar.onLoaded (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/action-bar/action-bar.js:140:14)
        at eachChild (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/core/view-common.js:616:23)
        at Page._eachChildView (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/page/page-common.js:266:9)
        at Page.View._loadEachChildView (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/core/view-common.js:619:18)
        at Page.View.onLoaded (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/core/view-common.js:609:14)
        at Page.View.onLoaded (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/core/view.js:82:35)
        at Page.onLoaded (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/page/page-common.js:45:35)
        at Page.View._addViewCore (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/core/view-common.js:962:18)
        at Page.View._addViewCore (/data/data/org.nativescript.neurix/files/app/tns_modules/ui/core/view.js:127:39)
</code></pre>