Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Angular2 forms error when using JavaScriptServices/Universal #646

Closed

Description

@bencameron00

The problem that I am having is that I get a runtime error if I have a form in a component.

I am importing both FormsModule and ReactiveFormsModule.

My form looks like this...

<form (ngSubmit)="onSubmit()" #loginForm="ngForm" >
...
</form>

The error I am getting is...

Exception: Call to Node module failed with error: Prerendering failed because of error: TypeError: _angular_core.InjectionToken is not a constructor at C:\XXX\ClientApp\dist\main-server.js:35055:42

What have I missed? My form setup worked perfectly when I was not using the JavaScriptServices starter for server side rendering.

Activity

  1. bencameron00 commented on Feb 6, 2017

    @bencameron00
    Author

    I found the solution here... angular/angular#13432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions