Pavlo, really interesting, I'll digg into during the week-end, thank for
share


On Thu, Jan 23, 2014 at 10:10 AM, Pavlo Yuriychuk <[email protected]> wrote:

> I am solving the same problem. So I have created provider that applies
> default settings during config and also has load method that uses $http.get
> to load and apply data on the run. This is not a true bootstrapping but at
> least I do not rely on jQuery, self-made vehicles and done it with minimal
> efforts.
>
> 'use strict';
>
> angular.module('billing')
>   .provider('Sample', ['Default', function (Default) {
>     var data = {};
>
>     function configure (config) {
>       config = config || {};
>       config.data = config.data || Default;
>       data = angular.copy(config.data);
>     };
>
>     return {
>       configure: configure,
>       $get: ['$http', function ($http) {
>         return {
>           doStuff: function () {
>
>           },
>           load: load () {
>              $http.get(URL).success(function (result) {
>                 configure(result);
>             });
>           }
>         };
>       }]
>     };
>   }]);
>
>
> Пʼятниця, 17 травня 2013 р. 20:35:26 UTC+3 користувач Alessandro Arnodo
> написав:
>
>> Hello
>> I'm developing a mobile app and i need to load a json file before the
>> angular bootstrap being executed.
>> This file contains app config and similar stuff.
>>
>> How can i handle this?
>>
>> Thank you so much
>> Alessandro
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/QQcKjcG18z0/unsubscribe.
>
> To unsubscribe from this group and all its topics, 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/groups/opt_out.
>



-- 
alessandro arnodo
http://alessandro.arnodo.net

-- 
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/groups/opt_out.

Reply via email to