Here, I am getting the undefined error. What I want to achieve is converting times given in UTC to the specific timezone of New York. Why is moment not a function there? In the documentation it says
If you wish to use moment() in your services, controllers, or directives, simply inject the moment variable into the constructor.
Which is what I did, or not?
Furthermore, I am struggling to understand if I have to do the configuration for moment-timezone like it is shown in the documentation:
Where does this go? In the app.js or in the controller? I am getting require is not defined in both cases. Do I actually need this for doing above conversion?
Hey,
I configured my app according to the documentation provided like such:
app.js
var app = angular.module('myApp', ['angularMoment']);
index.html
controller.js
Here, I am getting the undefined error. What I want to achieve is converting times given in UTC to the specific timezone of New York. Why is moment not a function there? In the documentation it says
Which is what I did, or not?
Furthermore, I am struggling to understand if I have to do the configuration for moment-timezone like it is shown in the documentation:
Where does this go? In the app.js or in the controller? I am getting
require is not defined
in both cases. Do I actually need this for doing above conversion?