search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to access constants in Angulajs Template

Asked by Hariprasad
6 years ago.

Hi,
How can I access constants defined in common js file into a template of a different module?

if I defined a constant like this in my MainModule.js which is included in the beginning of the main HTML file

> var myApp = angular.module('AC' .....);
> myApp.constant('timeoutValue',5);

I was able to access my constant in my controller.js by passing "timeoutValue" to it. But I am unable to access it in my template.html/partial.

How can I access "timeoutValue" in my template.html/partial file

Thank You
Kosmiktechnologies.com

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.