Hello David,
                      You can use constant of angular in this case.
                       create a file with config.js name and include this
where you want like:
                       mySmApp.constant("globalConstants", {
    "gAuditLogHtmlPath": "",

});


Pushpendra


On 11 March 2014 08:35, Ziobudda <[email protected]> wrote:

> Hi all (and sorry for my bad english).
>
> I need to set some "value" that I need to use into my template file. Like
> this:
>
> app.value("foo","val1");
> app.value("bar","val2");
>
> Now, the only way that I know that permit me to use these "value()" into
> my template is to "import" theme into $scope/$rootScope, so I have a
> function like this:
>
> app.run(function ($cacheFactory, $rootScope, $http,$cookies,foo,bar) {
> /* ..... */
> $rootScope.foo = foo;
> $rootScope.bar = bar;
> }
>
> Question 1: is this the right way to do this ?
>
> Question 2: if the answer for the Question 1 is "yes", can I define an
> object into value() ?
> Something like this:
>
> app.value("foobar.foo","val1");
> app.value("foobar.bar","val2");
>
> then in .run() function a line like this:
>
> $rootScope.foobar = foobar;
>
>
> Thanks.
>
> --
> Davide Morelli
> [email protected]
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to