title: angular2 forms - cannot read property replace of undefined
body: <p>I am following the form examples provided at <a href="http://angularjs.blogspot.com/2015/03/forms-in-angular-2.html" rel="nofollow noreferrer">Forms in Angular 2</a> and when I load the page I get this error</p>
  
  <pre><code>TypeError: Error loading "angualr2/forms" at &lt;unknown&gt; Error loading
  "angualr2/forms" from "app" at http://localhost:8080/js/app.es6 Cannot
  read property 'replace' of undefined
  </code></pre>
  
  <p>Here is the code. This is for the first data driven forms example from the blog</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;my-form&gt;&lt;/my-form&gt;
  
  &lt;script&gt;
      System.paths = {
          'angular2/*' : '/quickstart/angular2/*.js',
          'rtts_assert/*' : '/quickstart/rtts_assert/*.js',
          'app' : 'js/app.es6'
      };
  
      //start app
      System.import('app');
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>app.es6</strong></p>
  
  <pre><code>class Address {
  street: string;
  city: string;
  state: string;
  zip: string;
  residential: boolean;
  }
  
  @Component({
      selector: 'my-form'
  })
  @Template({
      inline: '&lt;form [form-structure]="form"&gt;&lt;/form&gt;',
      directives: [forms] 
  })
  class FormExample {
      constructor(fb: FormBuilder) {
          this.address = new Address();
  
          this.form = fb.fromModel(address, 
              [
               {field: 'street', label: 'Street', validator: 'required'},
               {field: 'city', label: 'City', validator: 'required'},
               {field: 'state', label: 'State', size: 2, validator: 'required'},
               {field: 'zip', label: 'Zip Code', size: 5, validator: 'required'},
               {field: 'residential', label: 'Residential', type: 'checkbox'}
               ], {
              saveOnUpdate: true,
              layoutStrategy: materialDesign
      });
  }
  }
  
  bootstrap(FormExample);
  </code></pre>
  
  <p>Any help would be appreciated</p>