Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

444
Views
How to access a javascript function from inside an angular module?

I use a piece of code in angularjs (coded by an ex-member of the company). I know nothing about angularjs, but I would like to access a javascript variable or a function, so that I can use it within the angular module. Below, is an example of what my problem is...

Angularjs part:

(function(){
    var app = angular.module('project', [],
        function($locationProvider){$locationProvider.html5Mode(true);}
    );

... other angularjs functions ...

})();

Javascript part:

var price = 10000;

function getPrice(){
     return price;
}

I think this question seems very simple to answer, but I have been stuck for hours and I feel kind of "desperate" not to be able to resolve it. Thanks in advance for your suggestions

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!