Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8353237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:11:54+00:00 2026-06-09T09:11:54+00:00

In my AngularJS node.js app based on angular-express-blog and express-coffee I have an issue

  • 0

In my AngularJS node.js app based on angular-express-blog and express-coffee I have an issue with defenition angular.module before controllers pic:

Uncaught ReferenceError: IndexCtrl is not defined

The order of including modules the same as in angular-seed:

// JS
!= js('lib/jquery-1.7.2.min.js')
!= js('lib/bootstrap.min.js')
!= js('lib/angular.min.js')

!= js('app')
!= js('controllers')
!= js('directives')
!= js('filters')
!= js('services')

After change order to this:

!= js('controllers')
!= js('app')
!= js('directives')
!= js('filters')
!= js('services')

Error the same. It works only when I replace controllers to app.coffee before angular.module("myApp"... defenition. I restarted server of course.

Update: app file, controller file and layout

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:11:56+00:00Added an answer on June 9, 2026 at 9:11 am

    In Coffeescript, compiled things are wrapped in a closure:

    //controllers.js:
    (function() { function MyController($scope) {} })();
    

    Now index.html can’t find the MyController variable because it’s in a closure!

    Use the module.controller syntax instead.

    angular.module('myApp').controller 'MyController', ($scope) ->
    

    This will cause your controller to be visible everywhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an AngularJS app that returns a list of json objects and I
In my app I need to use body parser to request params (Node.js AngularJS
Okay, first off, I am build a web app using AngularJS and node.js. I
I have an AngularJS page with several form inputs. When the some of the
Using the AngularJS framework, how do I have the Submit button both update the
I'm trying to create my first app with AngularJS. It looks neat, but there's
I have several TextBoxes, which display angular values. I format these using different custom
I'm new to angularjs and python and I have this problem. I've been trying
I'm building a simple Contact Management app with Crud using AngularJS 1.0.0rc8. Getting a
I have a rotating a wheel image based on WHEEL OF FORTUNE game. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.