I'm developing a site using AngularJS ES6, and on this site I needed to perform a function and I was not getting it. I searched the internet for a similar function to understand how I could do it and found a function in jQuery.
In trying to pass this code in the controller of my page appeared some syntax errors and I discovered that I can not use jQuery with ES6 (correct me if I'm wrong). So what did I do? I went on the services screen, where I call WCF (.factory) services, I threw the code there, I inject the controller and it worked.
My question is this, although it worked, is that correct? Can I do this when I want to use jQuery or do I have to transform this jQuery code to JavaScript and use only the controller?