Merging an Angular SPA with Telerik RadControls

65 views Asked by At

Our company is beginning to migrate a LARGE legacy codebase from the Microsoft MVC mindset (where everything happens on the server) to more of a Web 2.0 approach, where the communications are mostly data instead of a bunch of post-backs.

I prototyped the first tool to integrate into the legacy system, and have it working just fine, but now that I am integrating the code with the legacy system, I am finding there are a LOT of unexpected behaviors.

I am using Angular to manage the SPA aspects (including browser-side routing).

Two particular issues I am having:

  • When I click a button that was created in a custom directive, a post-back is triggered. The script behind this button sets an internal data value and does not have any reason to trigger a post-back.
  • Something is interfering with my data bound controls so that they do not render correctly.

I expect these issues are related, and I have tried searching for the last 2 or 3 days, but I cannot find ANYTHING to help me figure this out.

Our legacy system is (of course) ASP, with Master Pages and Telerik controls.

Please help - even just tips or clues about what might be going on will be greatly appreciated!

1

There are 1 answers

1
theGleep On

It turns out there was an underlying form with an event (I can't remember whether it was an onChange or an onSubmit event) that was being triggered.

To fix the issue, I just had to clear the event. I couldn't really find where the event was being embedded into the code (somewhere deep in Telerik base controls, I suspect), but I was able to add "post-load" code that removed the event handler.