0

I have a angularjs code about 300 lines. I want to convert this code to jquery or Ajax.

The angularjs code is about weather report.

There is controllers, directives and filters.

I do not know How to cenvert or where to start to convert them to jquery/ajax

simple code, I have as an example:

module.directive("weatheroverview",function(){ return{ restrict:"E", scope:{ datatime:"=", temp:"=", wind:"=" }, templateUrl:"view/weatherReport.html" } }) 

and so on.

how can I deal with that to convert them to ajax or jquery ? should I build the directive elements with html ? any resources for that?

thanks

4
  • There is no direct equivalent of this in JS/jQuery. Angular is an MVC framework. To replicate directives in Angular you'd need to recreate all the functionality in that part of the framework.CommentedFeb 1, 2022 at 10:26
  • is there any resources to learn from them. I know can code with js, but do not know where to start here. do you mean that I need to understand the whole angularjs code and recreate it from the beginning with ajax or jquery?
    – Alex
    CommentedFeb 1, 2022 at 10:31
  • Why go to all that trouble? Its going to be messy and at the end of the day, you're trying to reinvent a wheel. Otherwise, you'll need to approach this thinking about how you'd do it without ever seeing the angular part
    – Kinglish
    CommentedFeb 1, 2022 at 17:17
  • ok, I understand. I will then create the app from zero.
    – Alex
    CommentedFeb 3, 2022 at 5:29

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.