1 Reply Latest reply on Apr 22, 2016 10:38 PM by BKBK

    CF11 Application.cfc with AngularJS


      down votefavorite



      I am using ColdFusion as my backend for an AngularJS application. I need my Application.cfc to run in order for my authentication module to run. However, because I do not have any .cfm files, it does not run on request. The files in the root of my folder are all of the application folders (controllers/, styles/, views/, etc.). Also at the root is my index.html which kicks off the angular application as well as Application.cfc. I want Application.cfc to run as soon as the application is accessed. Is there any way to do this, or will I need to make an API call to Application.cfc from a controller/service to kick it off?

        • 1. Re: CF11 Application.cfc with AngularJS
          BKBK Adobe Community Professional & MVP

          Angular Javascript runs on the client (browser), whereas Coldfusion runs on the server. These are two separate environments. If you want Coldfusion to run the Application.cfc file, you should implement CFM and CFC pages. In fact, you could start by just renaming index.html to index.cfm. You could also make AJAX calls from AngularJS to Coldfusion, in particular to REST CFCs.