All Angular2's template syntax is broken when I open the page through my hashed router : <p>I have a hashed router that is routing from my main page just fine. The problem comes when a new page opens, all the template syntax is broken. That is all data bindings, ngFors, and even [routerLink]. So the pages open without the angular logic but if I refresh the browser while on these hashed pages they work just fine.</p>

<p><code>app bootstrap file</code></p>

<pre><code>import { enableProdMode } from '@angular/core';
import { disableDeprecatedForms, provideForms } from '@angular/forms';
import { HTTP_PROVIDERS } from '@angular/http';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { APP_ROUTER_PROVIDERS }  from './path-to-the-router-file';
import { ServerGetService } from './path-to-a-service';
import { AppComponent } from './app/app.component';

// depending on the env mode, enable prod mode or add debugging modules
if (process.env.ENV === 'build') {
  enableProdMode();
}

bootstrap(AppComponent, [
  HTTP_PROVIDERS,
  APP_ROUTER_PROVIDERS,
  {
    provide: LocationStrategy,
    useClass: HashLocationStrategy
  },
  ServerGetService,
  disableDeprecatedForms(),
  provideForms()
]).catch((err: any) =&gt; console.error(err));
</code></pre>

<p><code>routes file</code></p>

<pre><code>import {provideRouter, RouterConfig} from '@angular/router';
import {SecondPopUpComponent} from './path-to-the-file';
import {firstPopUpComponent} from './path-to-the-file';
import {Component} from '@angular/core';

@Component({
  selector: 'mx-empty',
  template: '&lt;div&gt;&lt;/div&gt;'
})
class EmptyComponent {}

export const routes: RouterConfig =
  &lt;RouterConfig&gt;[
    {
      path: 'second-popup',
      component: SecondPopUpComponent
    }, {
      path: 'first-popup',
      component: FirstPopUpComponent
    }, {
      path: '',
      component: EmptyComponent
    }
  ];

export const APP_ROUTER_PROVIDERS = [
  provideRouter(routes)
];
</code></pre>

<p><code>one of my popup screens (with the problem)</code></p>

<pre><code>import {Component} from '@angular/core';
import {TradePurposeProperty} from './trade-purpose.objects';
import {Router, ROUTER_DIRECTIVES} from '@angular/router';
import {GlobalSettingsData} from '../../services/global-settings-data.service';

@Component({
  selector: 'my-popup',
  templateUrl: './popup.page.html',
  directives: [ROUTER_DIRECTIVES]
})

export class TradePurposePageComponent {
  localData: customData[] = [];

  constructor(private router: Router, private data: GlobalData) {
    if (data.myData) {
      this.localData= data.myData;
    }
  }

  onSubmit() {
    this.data.myData= this.localData;
    this.router.navigate(['']);
  }
}
</code></pre>

<p><code>popup.page.html</code></p>

<pre><code>&lt;div class="form-popup"&gt;
  &lt;div class="form-popup__overlay"&gt;&lt;/div&gt;
  &lt;div class="form-popup__content"&gt;
    &lt;form #dataForm="ngForm" (ngSubmit)="onSubmit()"&gt;
      &lt;fieldset&gt;
        &lt;legend&gt;Properties&lt;/legend&gt;
        &lt;table&gt;
          &lt;thead&gt;
          &lt;tr&gt;
            &lt;th&gt;first column&lt;/th&gt;
            &lt;th&gt;secondcolumn&lt;/th&gt;
            &lt;th&gt;third column&lt;/th&gt;
          &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
          &lt;tr *ngFor='let data of localData'&gt;
            &lt;td&gt;{{data.attr1}}&lt;/td&gt;
            &lt;td&gt;{{data.attr2}}&lt;/td&gt;
            &lt;td&gt;
              &lt;label&gt;
                &lt;input type='checkbox' [(ngModel)]='localData.isSet' [ngModelOptions]="{standalone: true}"&gt;
              &lt;/label&gt;
            &lt;/td&gt;
          &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
        &lt;div&gt;
          &lt;button type="submit"&gt;OK&lt;/button&gt;
          &lt;a [routerLink]="['']" &gt;Cancel&lt;/a&gt;
        &lt;/div&gt;
      &lt;/fieldset&gt;
    &lt;/form&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>the only thing that works in the popup file is the onSubmit(), and it even routes but the rest of the bindings do not, and when I click on the <code>cancel</code> so the <code>[routerLink]="['']"</code> should be executed, I get that error 
<code>VM55939:84 ORIGINAL EXCEPTION: TypeError: Cannot read property 'startsWith' of undefined</code></p>

<p>any ideas what to do?</p>
