Highlighted

CF11 Application.cfc with AngularJS

New Here ,
Apr 22, 2016

Copy link to clipboard

Copied

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?

Views

532

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CF11 Application.cfc with AngularJS

New Here ,
Apr 22, 2016

Copy link to clipboard

Copied

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?

Views

533

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 22, 2016 0
BKBK LATEST
Adobe Community Professional ,
Apr 22, 2016

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 22, 2016 1