Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

442
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda