Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • richard rowles 18 posts 118 karma points notactivated
    Jan 04, 2019 @ 18:00
    richard rowles
    0

    Hi,

    I'm just having a first go at creating a custom item on the context menu. So I have all the necessary stuff in place to add to the menu and have a "hello world" scenario working.

    Trying to build a function to delete all child nodes as an example.

    My question is this.... Why am I calling up a controller in angular? and not using a call to a controller in c# . I'm now having to write everything in JS which is a real ball ache, to be honest.

    I've written a series of helper function for my intended goal in C# already can I call them, if so how? By using Ajax? By referencing page calling and c# MVC controller in the AdditionalData.Add call?

    Any ideas would be very useful. Cheers Rich

  • Nathan Woulfe 332 posts 1209 karma points MVP c-trib
    Jan 06, 2019 @ 01:09
    Nathan Woulfe
    0

    I'd create a simple AngularJs service to post the current page ID to your code, then manage the deletion on the server.

    The backoffice is all AngularJs, so you'll have to write at least a little. A controller where you inject your new service, button to click in the view, bound to controller function to make the service call.

Please Sign in or register to post replies

Write your reply to:

Draft