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 dont know anything about Javascript and AngularJS but I'm learning. If I understood correctly, I must use the RequireJS thing to load what I need : angularJS and Jquery for instance.
I understood that I must use the cPanel header and footer, otherwise I don't have access to requireJS and the other stuff.
So, I tried the example from the styleguide but I can't get it working. I think I got angularJS loaded and Jquery too.
One of the problem is that I don't really understand how to use the JS example from the cPanel StyleGuide in combinaison with the RequireJS thing.
When I'm getting close to figure this thing out, I'm blocked with this error (from the JS console) :
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
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 :
- cPanel Style Guide (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)
- Guide to cPanel Interface Customization - jQuery - Developer Documentation - cPanel Documentation
- cPanel plugin create form
- squareplanetdesign/cpanel_todo_plugin
I dont know anything about Javascript and AngularJS but I'm learning. If I understood correctly, I must use the RequireJS thing to load what I need : angularJS and Jquery for instance.
I understood that I must use the cPanel header and footer, otherwise I don't have access to requireJS and the other stuff.
So, I tried the example from the styleguide but I can't get it working. I think I got angularJS loaded and Jquery too.
One of the problem is that I don't really understand how to use the JS example from the cPanel StyleGuide in combinaison with the RequireJS thing.
When I'm getting close to figure this thing out, I'm blocked with this error (from the JS console) :
Code:
Error: [ng:areq] http://errors.angularjs.org/1.4.4/ng/areq?p0=applicationListController&p1=not%20a%20function%2C%20got%20undefined
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