• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF11 Application.cfc with AngularJS

New Here ,
Apr 22, 2016 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

634

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
community guidelines
Community Expert ,
Apr 22, 2016 Apr 22, 2016

Copy link to clipboard

Copied

LATEST

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.

Votes

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
community guidelines
Resources
Documentation