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

162
Views
Visualización de fecha de AngularJS usando moment js

Estoy tratando de mostrar la fecha actual en mi aplicación usando la biblioteca JavaScript de momento, recibo un mensaje de error de referencia.

Tengo el archivo moment.js en mi carpeta de scripts y mi archivo Bookshow.js en la carpeta de recursos.

También me referí a este enlace pero sigo enfrentando el problema de referencia: AngularJs y moment.js no funcionan

Error de detalles

 ReferenceError: moment is not defined at new <anonymous> (Bookshow.js:2) at Object.instantiate (angular.js:3501) at Object.canonymous> (angular.js: 3526) at Object.invoke (angular.js:3492) at Object.$get (angular.js:3112) at Object.invoke (angular.js:3492) at angular.js:3827 at d (angular.js:3193) at e (angular.js:3223) at Object.invoke (angular.js:3231)

Código

 Bookshow.js book.service('ApplDate', ['$scope', '$http', '$filter', function($scope, $http, $filter) { $scope.today = moment(); console.log("today date " + today.format('MM/DD/YYYY')); $scope.applDate = today.format('MM/DD/YYYY'); }]);
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!