Im having issues with angular in the backend while making a custom section, so far ive got a controller and whenever i submit a form on the page it double posts?
So my question is if i cant define the controller inside html anymore how will i go about routing this, or maybe there is another way, anyone tried anything like this?
And yes i use a regular button with an ng-submit tag going to create case, this was working before i needed a custom module for sorting..
Have you got any other buttons in the form other than submit? Such as a "clear" button or "back" etc.
I've used custom sections before and had two buttons in a form, one of which didn't specify the type of button. I had to add the type="button" attribute to my delete button so that it didn't post when my submit button did.
I did have an extra i removed all the buttons extra as per the article i sent, it would do the same thing so with no extra buttons its still double posting hence why i was thinking it might be posted double, i also tried to stop the event from going through a second time with a bool and still went through which indicates there is 2 controllers.
Angular submit in custom section posts twice
Hello guys/gals
Im having issues with angular in the backend while making a custom section, so far ive got a controller and whenever i submit a form on the page it double posts?
i am suspecting i am having multiple controllers spawned after reading this post about double submits: http://www.saintsatplay.com/blog/2015/06/resolving-angularjs-executing-controller-twice-issue#.Wjp2dN-nFaQ
my controller looks like this (i do this to get my custommodules since i cant define them regularly in module("umbraco",['ui.sortable'])
and my html:
So my question is if i cant define the controller inside html anymore how will i go about routing this, or maybe there is another way, anyone tried anything like this?
And yes i use a regular button with an ng-submit tag going to create case, this was working before i needed a custom module for sorting..
Have you got any other buttons in the form other than submit? Such as a "clear" button or "back" etc.
I've used custom sections before and had two buttons in a form, one of which didn't specify the type of button. I had to add the type="button" attribute to my delete button so that it didn't post when my submit button did.
I did have an extra i removed all the buttons extra as per the article i sent, it would do the same thing so with no extra buttons its still double posting hence why i was thinking it might be posted double, i also tried to stop the event from going through a second time with a bool and still went through which indicates there is 2 controllers.
So apparantly this wasnt angular but an issue in my controller that would retry, so no extra controllers added :)
is working on a reply...