Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resolve template variables #151

Closed
michaeljota opened this issue Nov 15, 2016 · 2 comments
Closed

Can't resolve template variables #151

michaeljota opened this issue Nov 15, 2016 · 2 comments
Assignees

Comments

@michaeljota
Copy link

michaeljota commented Nov 15, 2016

I try to search for this, but I did not find anything, so sorry if this is duplicated. When using template variables, inside the template they are not recognized and throws cause they don't exist in the class component.

<form
    (ngSubmit)="addTodo(todoForm)"
    autocomplete="off"
    #todoForm="ngForm"
  >

    <input
      type="text"
      name="todo-text"
      placeholder="insert todo"
      [(ngModel)]="todoModel.text"
      required
      autofocus
    />
    <button type="submit" [disabled]="!todoForm.form.valid">Add Todo</button>
  </form>

throws: The property "todoForm" that you're trying to access does not exist in the class declaration.

Edit: It is related to #123

@michaeljota
Copy link
Author

Thanks!

@mgechev
Copy link
Owner

mgechev commented Nov 19, 2016

Thanks for pointing this out!

@mgechev mgechev self-assigned this Nov 23, 2016
@mgechev mgechev added this to the Beta 2 - Trichocolea mollissima milestone Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants