Hi Thanks for your reply. Im a little new to AngularJs and I was wondering if you knew what i was doing wrong?
In my external Project whcih Im creating the DLL I do the following:
using System.Web;
using Umbraco.Web.WebApi;
namespace Twitterpost
{
[Umbraco.Web.Mvc.PluginController("TwitterPost")]
public class postTwitterController : UmbracoApiController
{
public Boolean postToTwitter(string message)
{ .....
My Twitterpost.dll is in the main project BIN folder.
And in my Package Controller (angularjs) I have the following:
I have sorted it -
I had to change the "get" to "post", then lower case Umbraco to umbraco, lower case PluginController name to "twitterpost" and then lower case the controller name and remove the word "controller" so it just says posttwitter. So it looks like this now: (I added a success and error to it too to work out the exact error):
Submit data to dll from AngularJS
Hi, Is it possible to create a package which has a bespoke DLL and then in the AngularJS post to a method in the DLL?
For example I want to call a Twitter Authentication bit of code that is in my own bespoke dll within AngularJS.
I hope you can help
Comment author was deleted
You'll need to look into api controllers https://our.umbraco.org/documentation/reference/routing/webapi/
Hi Thanks for your reply. Im a little new to AngularJs and I was wondering if you knew what i was doing wrong?
In my external Project whcih Im creating the DLL I do the following:
My Twitterpost.dll is in the main project BIN folder.
And in my Package Controller (angularjs) I have the following:
But Im getting a 404 error
Can you see where im going wrong? Thanks for your help, Jon
I have sorted it - I had to change the "get" to "post", then lower case Umbraco to umbraco, lower case PluginController name to "twitterpost" and then lower case the controller name and remove the word "controller" so it just says posttwitter. So it looks like this now: (I added a success and error to it too to work out the exact error):
Hope this helps someone else in the future - Thanks again Tim
is working on a reply...