javascript - Call ng-submit after ng-include -


I want to apply a login window. So I found my start page, where I am including a template for the login window:

   

Submit form inside this template is a form ():

  & lt; Form ng-submit = "submitLogin ()" & gt; & Lt; Label = "email" & gt; E-mail address & lt; / Label & gt; & Lt; Br> & Lt; Input type = "email" name = "email" ng-model = "login email" & gt; & Lt; Label = "password" & gt; Passwort & lt; / Labels & gt; & Lt; Br> & Lt; Input type = "password" name = "password" ng-model = "login password" & gt; & Lt; P & gt; Passwort vergessen? & Lt; / P & gt; & Lt; Input type = "submit" value = "Anmelden" & gt; & Lt; / Form & gt;  

But when I submit the form, the submission log () function is not called

  $ scope.submitLogin = function () {console. Log ("function login"); // logUserIn ($ scope.login email, $ scope.loginPassword); };  

I think ng-involved is creating another opportunity, but how can I tie the ceremony at a function?

  & lt; Form ng-submit = "submitLogin ()" & gt; & Lt; Label = "email" & gt; E-mail address & lt; / Label & gt; & Lt; Br> & Lt; Input type = "email" name = "email" ng-model = "login email" & gt; & Lt; Label = "password" & gt; Passwort & lt; / Labels & gt; & Lt; Br> & Lt; Input type = "password" name = "password" ng-model = "login password" & gt; & Lt; P & gt; Passwort vergessen? & Lt; / P & gt; & Lt; Input type = "submit" value = "Anmelden" & gt; & Lt; / Form & gt;  

This code is working, I think you made a second mistake.


Comments