Storing application configuration settings

You can use the constant() provider!

app.constant('myAppConfig', {ver: '1.2.2', bananas: 6, hammocks: 3, bananaHammocks: true});

This is not a whole lot different from Terry’s solution, but constants don’t change so they are applied before the other providers. Also, this module can be injected into your config function.

app.config(function(myAppConfig){
    console.log(myAppConfig.bananaHammocks);
});

have fun

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)