Techtacious
Techtacious
  • Видео 3
  • Просмотров 49 787
Create Angular Component Library and Publish to NPM in 2022 - bonus - Nx
Take a dive into creating / generating an Angular Component Library, leveraging Nx (monorepo), publishing it to NPM, and using it in one or multiple Angular applications.
Watch it all in action, step by step.
Learn how to do this for Nx or non-Nx based projects, while exploring the powers and benefits of working with Nx.
Create an account / organization in NPM: docs.npmjs.com/creating-and-publishing-scoped-public-packages
Nx: nx.dev/
Please feel free to like, subscribe, and comment as needed if my content interests you.
Просмотров: 10 888

Видео

Angular State Management Using NgRx in 2021 : Login flow Tutorial (Redux / Rxjs)
Просмотров 19 тыс.2 года назад
This tutorial walks you through NgRx (Redux) concepts and demonstrates how to integrate NgRx in an Angular 13 webapp, thereby leveraging the state management to develop a User Login flow. State management is a powerful concept that allows Angular apps to be fast, and at the same time make it easier for the codebase to scale. Please like and share this video, and subscribe to my channel if you f...
Generate OpenApi (Swagger) Angular client API library & stop maintaining APIs in your Angular app!
Просмотров 20 тыс.2 года назад
Learn how to leverage the power of OpenApi Codegen to generate Angular client API library and how to use that library in your Angular app. Stop wasting hours in maintaining API code in the Angular app and dealing with object mappings and bug-prone development. This video focuses on Angular client but there are dozens of languages/frameworks that OpenApi Codegen supports. Please Like this video ...

Комментарии

  • @community7757
    @community7757 17 часов назад

    This video is gold, it has made me see many things I didn't understand and I thank you very much. I have a question, how can I implement this on a microfrontend? In my case I work in a project which has a login/registration app and another main app that reads the cookie saved by the login project to access the user information. Could you give me some key to adapt your solution to my project? Thank you again and I hope you are well <3

  • @irahmany
    @irahmany 10 дней назад

    Awsome video. Can you do a video on how we can create an angular library from this and publis to npm including consuming it from npm packages.

  • @KiffinGish
    @KiffinGish Месяц назад

    Great stuff! An updated video based on Angular v18 would be nice.

  • @unimatrix20a
    @unimatrix20a 3 месяца назад

    thanks for the great video. any idea if this also works with angular standalone components (where we dont have app.module.ts). I am struggling about how to plug it in in this scenario.

  • @IhorKhomiak
    @IhorKhomiak 4 месяца назад

    Thanks for the useful video. There are not so many videos on RUclips about OpenAPI. So this is the brilliant one!

    • @techtacious
      @techtacious 4 месяца назад

      Glad I could help. Thanks for watching!

  • @thoaivu-y5k
    @thoaivu-y5k 6 месяцев назад

    thanks for your contribute very much

    • @techtacious
      @techtacious 6 месяцев назад

      No problem. Thanks for watching!

  • @mohamadnourbader1068
    @mohamadnourbader1068 7 месяцев назад

    the video is good. but i could not complete it because the font on the screen was so small, and I couldn't see the code well.

    • @techtacious
      @techtacious 6 месяцев назад

      Thanks for watching. It was my first video and I didn't have the best font size figured out yet.

  • @tumultex
    @tumultex 8 месяцев назад

    is it possible to sell an angular component library with this method? If yes any advice on how? Cheers

    • @techtacious
      @techtacious 6 месяцев назад

      Yes it is. One way to do that is to use npm authentication and provide access to only those who buy your library (from whatever platform you sell it at). Once a user purchases your library, you can provide them with an access token for npm.

    • @tumultex
      @tumultex 6 месяцев назад

      @@techtacious thanks for your reply!

  • @mostafavii
    @mostafavii 9 месяцев назад

    It was so helpful, thanks

    • @techtacious
      @techtacious 9 месяцев назад

      I'm glad I could help.

  • @manasipalkar9794
    @manasipalkar9794 9 месяцев назад

    I m trying to see if I can generate the angular code from swagger without dropping sonar cube analysis

    • @techtacious
      @techtacious 6 месяцев назад

      I'm not sure why you would need to drop sonarcube analysis. The analysis should work on any code.

  • @jacobokomo6077
    @jacobokomo6077 9 месяцев назад

    Thank you so much man, you explain this with a lot of passion & efforts. With 2 YOE in Angular, for the very first time you made me understand NgRX State management. I just finally wrapped my head around it. You earned my like & subscription as well. Kindly do continue making more of the same, your journey to your first 1K Subs is on the way.

    • @techtacious
      @techtacious 9 месяцев назад

      I'm glad I could help man. Thanks a ton for your kind words! I have been inactive with my content lately but comments like yours have motivated me to make more content. Please feel free to let me know if there's any particular topics you'd like me to make videos on.

  • @kenlnetherland
    @kenlnetherland 10 месяцев назад

    Was there a build step in between somewhere? I had a mental disconnect going from the coding part to the "libs" folder.

    • @sahajarora2162
      @sahajarora2162 9 месяцев назад

      Hi, I'm not quite sure what part of the video you're talking about but to summarize what's happening: I've created a libs folder where I intend to store my libraries, in this case the component library. The library can be a regular angular app / package that contains components. If you create a fresh angular project for the component library, you will get a "build" script out of the box which you can run using the command "npm run build" to build the project (in this case the component library). I hope that helps.

    • @kenlnetherland
      @kenlnetherland 9 месяцев назад

      @rora2162Sorry for not getting back to this. I figured it out. It was my first packaged component so I was unaware of the conventions at the time. Was used to 'src/app' -> 'dist' convention

  • @soberstudy160
    @soberstudy160 10 месяцев назад

    An older video but helpful to me to refresh ngrx state, thanks

    • @techtacious
      @techtacious 10 месяцев назад

      Glad I could help.

  • @TVishnuvardhanReddy
    @TVishnuvardhanReddy 10 месяцев назад

    Can you create a video on using the angular component library in React application inside nx worksapce ? or please reply me with any reference video links Thank you

    • @techtacious
      @techtacious 10 месяцев назад

      Hi there, you can't use Angular components in a React application.

  • @ShubhamKale-j9s
    @ShubhamKale-j9s 10 месяцев назад

    You are not publishing the library on npm, you are not installing it from the npm if i want to use my code in my single project then that is the sense to make that libraty

    • @techtacious
      @techtacious 10 месяцев назад

      Not sure what you mean but if you watch the video, you'll realize that I am publishing the library to the npm registry. It is installable by any project (or sub-project) that's interested in utilizing the library. Thanks for your comment.

  • @robertkameni5975
    @robertkameni5975 Год назад

    Great Video✌

    • @techtacious
      @techtacious Год назад

      Thank you and thanks for watching!

  • @mkmobilefanvideos6311
    @mkmobilefanvideos6311 Год назад

    What happens when you refresh the page? Are the token and user data still stored in the ngRx store?

    • @techtacious
      @techtacious Год назад

      When you refresh the page, the ngRx store is reset. That is because in this video, I do not show how to *persist* the store in local storage. If you want to retain the state, you can update your store implementation to "save" the state to local storage when it's changed.

    • @mkmobilefanvideos6311
      @mkmobilefanvideos6311 Год назад

      @@techtacious yep, got it, thanks!

  • @nvelchev
    @nvelchev Год назад

    Hi Sahaj, Great video! Thanks for sharing it. I have a question. What if I have more than one client? In a microservice project, we have different clients for the different microservices. I see that the instance of the ConfigurationParams is coming from a specific client that you built. How I can pass the same configuration to all clients instead of repeating the same code N times using the objects from each client?

  • @mahboubehmaleklou4083
    @mahboubehmaleklou4083 Год назад

    thank you for this video , i suscribed you for future tutorial ... good luck

  • @shahidullah2775
    @shahidullah2775 Год назад

    Error: 'java' is not recognized as an internal or external command

  • @ektasingh6635
    @ektasingh6635 Год назад

    just a question once you have published it the lib folder that you created can be removed now from your solution right?

    • @techtacious
      @techtacious Год назад

      I'm not sure if I understand your question correctly but I'll try to answer. The lib folder is the source code for the npm package (library) and if you want to keep maintaining / updating the library version in npm, you'd need the source code :) .

  • @fired_developer
    @fired_developer Год назад

    Please increase the Editor fonts size.. Thanks !

    • @techtacious
      @techtacious Год назад

      Thanks for the feedback. Yes the font-size has been fixed in my other videos.

  • @saiful_70
    @saiful_70 Год назад

    implementing ngrx for first time, this video helps me a lot.

    • @techtacious
      @techtacious Год назад

      Glad it helped! Thanks for watching! :)

  • @LarryBuntus
    @LarryBuntus Год назад

    Since this doesn't come with a git repo, does it mean you are paying for the organization account?

    • @techtacious
      @techtacious Год назад

      Are you referring to Nx ? If so, then the answer is No. I am not paying to use the basic (plenty) features of Nx.

    • @LarryBuntus
      @LarryBuntus Год назад

      @@techtacious no I mean Npm

  • @CrusaderMen
    @CrusaderMen Год назад

    Hi @Techtacious, Thank you for sharing your knowledge this is helpful!. I have a situation where I want to publish a library that depends on multiple libraries that not shared on npm. is it possible to do that without publishing every library? Thanks!

    • @techtacious
      @techtacious Год назад

      Hi, thanks for watching ! I believe you should still be able to publish the one library without needing to publish the non-npm libraries, as long as your npm library has access to the non-npm dependencies at build-time. The bundled package would have everything that it needs and wouldn't need to depend on NPM.

  • @MYM861
    @MYM861 Год назад

    Hi, great video. Thank you! I have one question. When i reload my page in "logged in" state. The Log in button is visible for a second. I understand this is due to the async taking time to complete but how can this be solved in a nice way? Thanks!

    • @techtacious
      @techtacious Год назад

      Hi Nattmackan, thanks for watching the video and thank you for your feedback! Ideally, when a user is logged in, the authentication state should be persisted in local storage. That way, if you log in once and reload the app, you wouldn't see the Log-in button. However, with a proper authentication system in place, you would want to validate the persisted auth token to make sure it's still valid. The implementation of that would depend on your auth system but ideally it would include communication with your backend auth service to make sure that the token is valid. If the token is deemed invalid / expired, you would dispatch the Logout redux action that would change the UI state and the Log-in button would appear again.

  • @dylanv.dmerwe5960
    @dylanv.dmerwe5960 Год назад

    Standalone components should also make this process much easier to understand :)

  • @dylanv.dmerwe5960
    @dylanv.dmerwe5960 Год назад

    Bit stuck on where to actually start. You're starting from having a monorepo already available - how would you start from blank for someone who wants to create a component lib?

    • @techtacious
      @techtacious Год назад

      Hi Dylan, You can create an directory for your component library and then run npm init to initialize it as an npm package. Npm would ask you a bunch of questions to know more about the package that you're creating. Once answered, you should have a package.json file ready in the directory. You can then start adding the required node dependencies (such as angular) and also your component code. Once you have that, you can follow the video to see how the library can be published to npm.

  • @MurshidAtassi
    @MurshidAtassi Год назад

    Thank you so much for this video. Just learning about Angular. This was the missing piece to wrap my head around authentication in a modern Angular application. Please continue with more such useful content! Much appreciated:)

    • @techtacious
      @techtacious Год назад

      Thank you for watching! Glad I could help. :)

  • @firecape8822
    @firecape8822 Год назад

    Thank you...really appreciate it. How would I have my .NET core api generate a yaml file from an API I already have?

    • @techtacious
      @techtacious Год назад

      No worries, thanks for watching! I have never worked with .NET but I'm sure there would be documentation regarding this on Openapi / Swagger's website.

  • @tijanimiracle90
    @tijanimiracle90 Год назад

    god will bless you this really help me alot today

    • @techtacious
      @techtacious Год назад

      I'm glad I was able to help. Happy coding! 🙂

  • @VinitNeogi
    @VinitNeogi Год назад

    Using this approach with Nx can we consume packaged version of lib1 from npm in lib2, where lib1 and lib2 are part of same monorepo

    • @techtacious
      @techtacious Год назад

      Hi Vinit, yes I don't see a problem with that. Once deployed to npm, a library is independent and can be consumed in any node project, regardless of that package being in the same monorepo as the library itself.

    • @VinitNeogi
      @VinitNeogi Год назад

      @@techtacious thanks

  • @matheusjordan6031
    @matheusjordan6031 Год назад

    Thank you !

  • @jae5577
    @jae5577 Год назад

    Awesome tutorial very clear and concise explanation. Please do more tutorials on Angular and React please <3

    • @techtacious
      @techtacious Год назад

      Thank you! I'll definitely be putting up more videos on Angular and React soon. Please stay tuned :).

  • @RenierVeiga-su4sd
    @RenierVeiga-su4sd Год назад

    Best video on this topic. Would benefit from timestamps to segment the video.

    • @techtacious
      @techtacious Год назад

      Thank you! I'll make sure to add timestamps. Thanks for the suggestion!

  • @armaandhir
    @armaandhir 2 года назад

    This is so useful, Thanks.

    • @techtacious
      @techtacious 2 года назад

      Glad you found it useful. Thanks for watching!

  • @gavarniwinter6045
    @gavarniwinter6045 2 года назад

    Hands down best video on this subject all these other videos of annoying nerds posting things we not interested in i dont wanna install 1000 other dependencies / tools for a code gen.

    • @techtacious
      @techtacious 2 года назад

      Thanks a lot! I'm glad you found it useful.

  • @sickboy1776
    @sickboy1776 2 года назад

    Great tutorial, thank you for your effort. I have a question about implementing micro services backend architecture, how do you implement and generate multiple swagger spec jsons when you a separate swagger for each of them?

    • @techtacious
      @techtacious 2 года назад

      Thank you! I recommend using Nx to maintain a monorepo. Every microservice can have its own swagger spec file. The file can either live somewhere in the microservice directory itself, or you can have a separate folder in the monorepo and call it swagger, and place all spec files there. You can then leverage Nx to have a command in your microservice's workspace.json, that would generate the swagger library using the respective microservice swagger spec file. The command would basically call a script that would find the associated swagger spec file for the microservice (have a naming convention) and run the respective codegen command to generate the client library for the microservice.

    • @sickboy1776
      @sickboy1776 2 года назад

      @@techtacious This was what i was looking for... Thanks!

  • @ellen9427
    @ellen9427 2 года назад

    hello, I want to use the open API, but my project is in QT, if I just use the .yaml file in my project without the settings you made in libs/openapi will it work? or it only works with settings made in libs/openapi??????? URGENT

    • @techtacious
      @techtacious 2 года назад

      Ideally it should work but you may need some configurational settings specific to QT. I havent really worked with QT so I can't be sure.

  • @roman-tp6sd
    @roman-tp6sd 2 года назад

    the size of font is small... great video

    • @techtacious
      @techtacious 2 года назад

      Hi, thanks for your comment! The fonts will be bigger and better in the other videos :).

    • @roman-tp6sd
      @roman-tp6sd 2 года назад

      @@techtacious my eyes will love you

    • @techtacious
      @techtacious 2 года назад

      @@roman-tp6sd I have a new video up on creating an Angular Library in 2022. I think you might like watching that. Definitely better fonts :) ruclips.net/video/Dji9lNHVj6k/видео.html

  • @Ellie-dx3hg
    @Ellie-dx3hg 2 года назад

    How do I launch the marketplace-server API?

    • @techtacious
      @techtacious 2 года назад

      It has not been linked with Nx properly in my project yet. You may navigate to the marketplace-server directory "cd apps/marketplace-server" and run "yarn run dev". Please note that you will need to connect to a Mongo server and set its URL with credentials in a .env file as MONGO_URL=<your mongodb connection url string>.

  • @dumidupramith3881
    @dumidupramith3881 2 года назад

    very hard to read the code bro

    • @techtacious
      @techtacious 2 года назад

      Hi, thanks for your comment! The fonts will be bigger and better in my other videos :).

  • @hadirahmani7943
    @hadirahmani7943 2 года назад

    please increase font size in your screen :(

    • @techtacious
      @techtacious 2 года назад

      Hi Hadi! Apologies for the small font size. I am aware of the problem and I will take care of it in my future videos. Thanks for your comment!

  • @bluetoothera9580
    @bluetoothera9580 2 года назад

    I see only two videos on your channel, Content is really good !! Please keep up with pace...

    • @techtacious
      @techtacious 2 года назад

      Thanks a lot! I have been caught up with some personal events lately but I'll be creating more content soon. Please stay tuned :).

    • @techtacious
      @techtacious 2 года назад

      Hi @Bluetooth Era, I have a new video up on creating an Angular Library in 2022. I think you might like watching that. ruclips.net/video/Dji9lNHVj6k/видео.html

  • @bluetoothera9580
    @bluetoothera9580 2 года назад

    Can you please create a video on how to manage the login state using ngrx for multi tenant user application with an Okta login integration.

    • @techtacious
      @techtacious 2 года назад

      Thanks for the comment! I haven't worked with Okta but I'll try my best to find time, check out Okta, and make a video on it.

  • @ebichu8126
    @ebichu8126 2 года назад

    Thanks a lot!

  • @arielunanue4354
    @arielunanue4354 2 года назад

    Great video. Do you have another one showing how to add "loading" indicators while the effect is being executed? To be able to show an indicator to the user, disable the button, etc.

    • @techtacious
      @techtacious 2 года назад

      Thank you! I have not been able to create much content lately but I will be happy to make a video on UI state management. Stay tuned :).

  • @khaledamirat7933
    @khaledamirat7933 2 года назад

    You explination was so amazing, it was so simple, as it's nothing, thank you verry much, for that, i'll use your tutroial as my reference, thanks again <3

    • @techtacious
      @techtacious 2 года назад

      Thank you! I'm glad I could help. Please feel free to let me know of any other topics you'd like tutorials on. Happy coding!

  • @trustingod0
    @trustingod0 2 года назад

    Great Video !!! I have a quick question. I noticed that you used a promise as the return value for the Login Method. I was wondering why did you use a promise as opposed to an observable? Thanks !!!

    • @techtacious
      @techtacious 2 года назад

      Thank you! I'm glad I could help. Since we are not returning anything from the login function in the component, we don't need a return type there. It is more like an async void function. We simply dispatch an action in there and don't return anything. A consumer of that function does not (and should not) need to wait for the login function to finish executing. Please feel free to let me know of any other topics you'd like tutorials on. Happy coding!

  • @kartikkanwar91
    @kartikkanwar91 2 года назад

    awesome!

    • @techtacious
      @techtacious 2 года назад

      I'm glad I could help. :) Please feel free to post suggestions for topics you'd like to see on this channel. Happy coding!