Estou recebendo o seguinte erro no console assim que entro na pagina do formulario, antes mesmo de submeter:
ERROR TypeError: Cannot read property 'login' of undefined
at Object.eval [as updateDirectives] (CadastroUsuarioComponent.html:18)
at Object.debugUpdateDirectives [as updateDirectives] (core.es5.js:13056)
at checkAndUpdateView (core.es5.js:12236)
at callViewAction (core.es5.js:12601)
at execComponentViewsAction (core.es5.js:12533)
at checkAndUpdateView (core.es5.js:12242)
at callViewAction (core.es5.js:12601)
at execEmbeddedViewsAction (core.es5.js:12559)
at checkAndUpdateView (core.es5.js:12237)
at callViewAction (core.es5.js:12601)
at execComponentViewsAction (core.es5.js:12533)
at checkAndUpdateView (core.es5.js:12242)
at callWithDebugContext (core.es5.js:13456)
at Object.debugCheckAndUpdateView [as checkAndUpdateView] (core.es5.js:12996)
at ViewRef_.webpackJsonp.../../../core/@angular/core.es5.js.ViewRef_.detectChanges (core.es5.js:10167)
La no meu HTML do componente esta assim:
<form novalidate #meuForm="ngForm" (submit)="cadastrar($event)">
<div class="row">
<div class="col-md-6">
<div class="form-group form-black label-floating is-empty">
<label class="control-label">Login de Usuário</label>
<input id="login" name="login" class="form-control"
[(ngModel)]="usuario.login" #login="ngModel" >
</div>
</div>
<button [disabled]="meuForm.form.invalid" type="submit" class="btn btn-danger pull-right">Realizar Cadastro</button>
<div class="clearfix"></div>
</form>
Qual pode ser o problema?