Base solution for your next web application
Open Closed

Load data at app startup with Abp #2785


User avatar
0
bilalhaidar created

Hi, I need to load some data arrays at app startup on angular.

What's the recommended way given Abp?

I thought of writing a .Factory() that returns an object where inside that object/function I just call the server to load data into local arrays that I can access later on inside the controllers.

Thanks


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Actually we don't have a suggested way :). If that data is not changing veru often, you can do it like that. If it is changing, you can use cache.

    Thanks.

  • User Avatar
    0
    bilalhaidar created

    Thanks :)

  • User Avatar
    0
    tteoh created

    <cite>ismcagdas: </cite> Hi,

    Actually we don't have a suggested way :). If that data is not changing veru often, you can do it like that. If it is changing, you can use cache.

    Thanks.

    I m still very new to abp framework. Is there a built-in cache and where can I find more to understand this?

    Thanks. /Tommy

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes, there is built in cache mechanism, you can check this document <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Caching">http://aspnetboilerplate.com/Pages/Documents/Caching</a>. It contains explanations and examples.

    Thanks.