Use angularJS inside a PHP cPanel plugin
Hello,
I'm working on a cPanel plugin, it's a PHP web application. Inside that application, I need to list the domain that customer have.
After some research, I discovered the cPanel style guide and a few pages about that :
I think I missed something, I'm pretty sure I must load something else, from the CJT stuff for instance, where the "applicationListController" is defined. So, in summary, do you have an example of a working app, in PHP, using angularJS ? Just a page in PHP that load a dynamics tables for instance. Thank you in advance :)
- (you should put this somewhere in the documentation because I find this on github, from a 2016 cPanel conf, It's kind of difficult to find)
Error: [ng:areq] http://errors.angularjs.org/1.4.4/ng/areq?p0=applicationListController&p1=not%20a%20function%2C%20got%20undefined
I think I missed something, I'm pretty sure I must load something else, from the CJT stuff for instance, where the "applicationListController" is defined. So, in summary, do you have an example of a working app, in PHP, using angularJS ? Just a page in PHP that load a dynamics tables for instance. Thank you in advance :)
-
Hello @alexis_, We don't offer a specific example of an application using AngularJS in our documentation. Could you let us know the step-by-step instructions of how we can reproduce the issue? You can post examples of the actual code you are using in CODE tags. Thank you. 0 -
Hello, Thank for your answer, I tested a lot differents things but I will post the 2 things I tested and appear to be almost functionnal. * First version, based on those two pages : - cPanel Style Guide [PHP] header("Test App", 'app-key'); ?> Static Content{{tab.content}}Alert!I've got an HTML heading, and a select callback. Shiny!footer(); [/PHP] With this version, I know that angular is loaded because the console.log(angular) return something but I have an error because 3 angular controllers seems to be missing. 52127 The raw version of the console log : pastebin.com/raw/eY9muUFB I tried a second version after looking at the code of the cPanel TODO plugin : -github.com/squareplanetdesign/cpanel_todo_plugin I noticed this plugin add some dependencies and load stuff related to CJT too, so tried this : [PHP] [/PHP] I tried a lot of differents versions, loading random stuff from CJT, sometime I manage to get rid of the sidebarController error but the "applicationController" error is always blocking for me. Thanks a lot. Alexis0 -
I tried a lot of differents versions, loading random stuff from CJT, sometime I manage to get rid of the sidebarController error but the "applicationController" error is always blocking for me.
Hi Alexis, While we won't be able to help you with the development of the custom code itself, we can take a closer look at the system to check for anything obvious that could be leading to the error message you have reported. Could you open a support ticket using the link in my signature so we can take a closer look? Thank you.0
Please sign in to leave a comment.
Comments
3 comments