0

I'm learning to make my first angularJS app, and am having trouble getting the data to bind. The code is at https://github.com/findjashua/angular

In views/index.jade, {{understand}} is not getting the value of $scope.understand from public/javascripts/maincontroller.js

Any ideas what the problem is?

1 Answer 1

1

Your problem is not with AngularJS: when specifying the static folder on Express, you don't need to put "public" in your assets URL. Your javascript files would look like this:

script(src='/javascripts/app.js', type='text/javascript')
script(src='/javascripts/maincontroller.js', type='text/javascript')

You could had figured it using Chrome Dev Tools.

Sign up to request clarification or add additional context in comments.

2 Comments

Also, as an extra tip, most of the cases you don't need to register your node_modules folder into Github. Add them to a .gitignore file and use npm install to manage your dependencies.
That worked, thanks! This is my first time doing client side development, so I'd appreciate any pointers to other tools I should be using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.