javascript - How to submit new entity as well as clear $anchor.task? -


Using the framework, how do I get the " Submit " button well anchor ID Obviously - I basically want to add fast entry entries, but it always changes my ad form in an addtion form.

This is my current div that is not working, it looks as if $ anchor.task = null ...

note that " Add new " button works fine!

  & lt; Div & gt; Details: & lt; Input name = "task.desc" ng-required & gt; & Lt; Br> & Lt; A href = "#" ng-action = "Task. $ Save (); $ anchor.task = null" & gt; Save & lt; / A & gt; & Lt; Input type = "button" value = "add new" ng-action = "$ anchor.task = null" & gt; & Lt; / Div & gt;  

If you want to add fast, then you need to change it

I think you have: ng-entity = "task = Task" in your code. You need a ng-unit to change it = "Work" changes this announcement so that it does not belong to anchor. See for more information. This also means that you have to manually modify the work frequency in the NG-Init.

Then in Anchor Save you will need to instantiate the task document with the default of task object: task (task)

With this you need to save it: Tasks. $ Save ()

Finally you want to clear the form so that you need to clear the task object. This can only be done after saving the object so that you need to include the callback in the $ save () method. Work (work). $ Save ({: $ root.task = {};})

$ refers to the root route area because the scope of the callback is not an area where the work has been declared.

ng-entity = "task" ng-init = "function = {}" & gt; Details: & lt; Input name = "task.desc" ng-required & gt; & Lt; Br> & Lt; A href = "#" ng-action = "task (.) $ Save ({: $ root.task = {}})" & gt; Save & lt; / A & gt; & Lt; / Div & gt;

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -