Це відео не доступне.
Перепрошуємо.

Angular Service Worker | Progressive Web Apps Development

Поділитися
Вставка
  • Опубліковано 25 кві 2020
  • A service worker is a script that browser runs in the background, separate from a web page. With the help of the service worker, we can also implement push notification and background sync. Service workers can store files or responses in cache storage so it allows developers to create an offline experience for the user.
    Service Worker in angular can be achieved by adding @angular/pwa package, this will going to handle lots of boilerplate code for us like registering a service worker, installing a service worker, and activating the service worker and lots more.
    GitHub: github.com/fun...
    #ServiceWorkers #AngularPwa
    Progressive Web Apps Development: bit.ly/359BXpK
    Angular Tutorial: bit.ly/2Tnwk1t
    Dashboard with chart.js: bit.ly/3c9Jd85
    All about Observable: bit.ly/2wVVnBl
    All about Http call: bit.ly/2I3Zcqo
    Angular Interview: bit.ly/2T67jZN
    Application Development: bit.ly/398w7Gf
    Upload File to server: bit.ly/3ccsjWd
    Data Structure and algo: bit.ly/3c8b7Bh
    Slack: bit.ly/2RXPcEK
    You can support me on Patreon: / funofheuristic
    Thanks for watching...

КОМЕНТАРІ • 62

  • @gahyunlee4324
    @gahyunlee4324 3 роки тому

    Thank you! I didn't skip the ad in case it helps you haha...

  • @marcobaccaro
    @marcobaccaro 3 роки тому +1

    Get the data from the “CAS” “GUESS”instead of server? I’m wondering if you were trying to say Cache...

  • @yogeshlandge7832
    @yogeshlandge7832 10 місяців тому

    Nice info...bro

  • @karunakarreddym6717
    @karunakarreddym6717 Рік тому

    Thanks a lot for wonderful explanation..

  • @muthiulhaqhaq3835
    @muthiulhaqhaq3835 Рік тому

    Thank you so much, very clear and well explained.

  • @sajeed.k.shaikh
    @sajeed.k.shaikh 2 роки тому +1

    thanks for such a good explaination

  • @devrockzz6831
    @devrockzz6831 Рік тому

    beautiful info and its very good

  • @revasek
    @revasek 2 роки тому

    I get errors(ERR_INTERNET_DISCONNECTED) for all service calls fetch even after adding url in config when I choose offline in service worker. Same error for ngsw-cache-bust also.. could you pls help?

  •  3 роки тому +1

    Great video.. but it's hard to watch in mobile.
    Tnx for sharing!

  • @niralishah9493
    @niralishah9493 3 роки тому

    I got error - Gateway timeout (504 error) how to resolve? Please give me answer

  • @theeverleinhour9616
    @theeverleinhour9616 Місяць тому

    Hello sir, each time we make changes to the project do we need to build it again and run http-server?

    • @FunOfHeuristic
      @FunOfHeuristic  Місяць тому +1

      Yes if you want to rest the pwa features, for normal application change ng serve will work

  • @akash.shaw.20
    @akash.shaw.20 3 роки тому

    What if we want to cache all apis except 1 how can we do that?

  • @janakaedirisinghe9549
    @janakaedirisinghe9549 4 роки тому

  • @4444-c4s
    @4444-c4s 4 місяці тому

    why you are explaining while standing?

  • @sharathsinganamala7411
    @sharathsinganamala7411 4 роки тому

    Hi, can we use service worker in cordova

  • @varunvirjaiswal890
    @varunvirjaiswal890 3 роки тому

    Any idea how to check wifi signal strength

  • @streetballer4lyf
    @streetballer4lyf 4 роки тому

    hi, noob question here:
    what is the difference between @angular & @angular/pwa? Also, is it possible to update old angular projects from normal angular to PWA?

    • @FunOfHeuristic
      @FunOfHeuristic  4 роки тому +2

      Hello, angular is framework and @angular/pwa is bundel which handel your service worker and enable pwa for your project.
      You can add the @angulat/pwa to your project like I have did in the video.

  • @bhavanamulani
    @bhavanamulani 2 роки тому

    Hey, I did the same added angular/pwa in my existing angular app but I can't see manifest and service worker in local host .. can you please help

    • @FunOfHeuristic
      @FunOfHeuristic  2 роки тому +1

      Please build the application and run from dist folder, use http-service

    • @bhavnamulani8782
      @bhavnamulani8782 2 роки тому

      @@FunOfHeuristic Thanks a lot it worked but as I clicked on offline I am continuously getting "net::ERR_INTERNET_DISCONNECTED", please help

  • @makewayforak5432
    @makewayforak5432 3 роки тому

    How an we implement, Service worker in existing angular projects?

  • @MrNigam1992
    @MrNigam1992 4 роки тому

    If the project is big and there we are using a lot of Api call then we need to add all the api details in the cache?
    In this scaneraio, it's very difficult to add all the Api is there any other method for doing the same?

    • @FunOfHeuristic
      @FunOfHeuristic  4 роки тому +2

      You can use baseUrl/* to cache all the call under that url.

  • @ritavishwakarma6335
    @ritavishwakarma6335 4 роки тому

    Hi thank you for the explanation it worked alot for me. Could you please make a video combining both SW and SSR in angular please?

  • @bhavnamulani8782
    @bhavnamulani8782 2 роки тому

    Hi, can we create a single PWA for websites having a different pages

    • @FunOfHeuristic
      @FunOfHeuristic  2 роки тому

      Yes, your whole application will become a pwa

  • @24TEABREAKTV
    @24TEABREAKTV 3 роки тому

    Great

  • @rootbabu4633
    @rootbabu4633 3 роки тому

    In JavaScript we need to write code for sw lifecycle (like register,install event etc.) But in angular , provide ngsw-config.json file for this. We do not need to write code for sw lifecycle, am I right?

    • @FunOfHeuristic
      @FunOfHeuristic  3 роки тому

      Yes, angular service workers handle all the lifecycle.

    • @rootbabu4633
      @rootbabu4633 3 роки тому

      @@FunOfHeuristic thank you for quick reply

  • @MrRorypam
    @MrRorypam 4 роки тому

    Why have not covered the Push Notification?

    • @FunOfHeuristic
      @FunOfHeuristic  4 роки тому

      Push notifications and background sync will be a dedicated video for each topics.

  • @shahalam4403
    @shahalam4403 4 роки тому

    Hi, can you make a video on file download using angular and nodejs

  • @manjunathamj3452
    @manjunathamj3452 2 роки тому

    Starturl not registered error I am getting and thank you in advance it will be great help if you share the code

    • @FunOfHeuristic
      @FunOfHeuristic  2 роки тому

      Code is in GitHub and the link is present in the description.

    • @manjunathamj3452
      @manjunathamj3452 2 роки тому

      @@FunOfHeuristicI am getting start url not registered error

  • @asdfg00000100
    @asdfg00000100 Рік тому

    Hi
    I am using
    if (!this.update.isEnabled) {
    console.log('Not Enabled');
    return;
    }
    After changes in app its always shows Not Enabled then what was an issue ?

    • @FunOfHeuristic
      @FunOfHeuristic  Рік тому

      You can check in your application tab in your dev tools that service worker is registered or not, it need https in prod, and in local your should run your application from dist/project name

  • @marutikesarkar7187
    @marutikesarkar7187 4 роки тому

    I am facing error when hit http-server -p 8080
    Please help me, I tried twice in two different project

    • @FunOfHeuristic
      @FunOfHeuristic  4 роки тому

      What is the error?

    • @marutikesarkar7187
      @marutikesarkar7187 4 роки тому

      @@FunOfHeuristic 'http-server' is not recognized as an internal or external command, operable program or batch file.

    • @FunOfHeuristic
      @FunOfHeuristic  4 роки тому

      Please run npm install -g http-server

    • @marutikesarkar7187
      @marutikesarkar7187 4 роки тому

      @@FunOfHeuristic ok Thank you. I'll try

    • @sindhurasastry1204
      @sindhurasastry1204 3 роки тому

      @@FunOfHeuristic After running this, website lists as a directory structure instead of website

  • @karishmajain7717
    @karishmajain7717 4 роки тому

    after http-server the webpage is not opening and service worker is also not running

    • @FunOfHeuristic
      @FunOfHeuristic  4 роки тому

      Run the http-server inside your dist/applicationName so that it can run your index.html and then it will going to work.

    • @jigneshmahadik7777
      @jigneshmahadik7777 3 роки тому +1

      @@FunOfHeuristic it's not working ,on the browser it showing list of files inside of dist/appName. Pls suggest ahead !

    • @sindhurasastry1204
      @sindhurasastry1204 3 роки тому

      @@jigneshmahadik7777 Hi did you figure a way to fix this?

    • @FunOfHeuristic
      @FunOfHeuristic  3 роки тому

      If index.html present in your directory it should show that one in your startup.

    • @sindhurasastry1204
      @sindhurasastry1204 3 роки тому

      @@FunOfHeuristic @jignesh mahadik For some reason port 8080 didn't work for me, when I continued to follow your video with port 8000 it worked. Not sure why but at least this working. Thanks :)

  • @theotherme9965
    @theotherme9965 2 роки тому

    22:25 I think you said it wrong. It's reverse.

    • @FunOfHeuristic
      @FunOfHeuristic  2 роки тому

      Did you saying about download of application from server to service worker

    • @theotherme9965
      @theotherme9965 2 роки тому

      @@FunOfHeuristic Here at that point, as per my understanding, the data is coming from service not from service worker. Correct me if I am wrong.

    • @FunOfHeuristic
      @FunOfHeuristic  2 роки тому +1

      If we are caching some api call or file then initially the response will come from server to the cache of the browser that we can say service worker, but when the user will request again the browser will fast fetch the data from the service worker and render it but the service worker will have a look up to the server to update the data in the cache.

    • @theotherme9965
      @theotherme9965 2 роки тому

      @@FunOfHeuristic ok. I will give it a try . Thanks

  • @shayanpaul3430
    @shayanpaul3430 3 роки тому

    Your content is good but work on your english and pronunciation

  • @StijnHommes
    @StijnHommes 2 роки тому

    Make up your mind! You say you're making an app and instead you're creating a website. Learn how to make a real native app instead of trying to make a website with way too much code look like one.