Ember Tutorial - Working with Components

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 พ.ย. 2024

ความคิดเห็น • 24

  • @AlexDiLiberto
    @AlexDiLiberto 8 ปีที่แล้ว +7

    You have an excellent teaching style. Thank you for providing these videos to the greater Ember community!

  • @ZhengCheng
    @ZhengCheng 6 ปีที่แล้ว +7

    01:25 ember -v
    02:32 ember g route tutorial
    03:18 ember g controller tutorial
    04:31 [write data for controller]
    05:14 [write tutorials.hbs]
    06:01 ember g component user-filter
    08:22 tagName: ‘section’
    10:58 classNames: [‘tutorial’]
    13:00 how component {{yield}} work
    14:18 how {{#if hasBlock}} work
    16:02 LifeCycle: init() didReceiveAttrs() willRender() didInsertElement() didRender()
    18:54 this._super(…arguments)
    22:00 Ember.get()

  • @PeterParker-sy9bp
    @PeterParker-sy9bp 8 ปีที่แล้ว +7

    Thank you so much Scott.This helped me incredibly well.Not only i understood passing actions on components, i have made use of your filtering algorithm.Thanks a ton. ^.^

    • @ScottBatson
      @ScottBatson  8 ปีที่แล้ว +3

      Thank you for watching! The nice words are greatly appreciated!

  • @cameronsmith3060
    @cameronsmith3060 7 ปีที่แล้ว +2

    Another amazing video! You are making my life so much easier for learning ember.js. These are the only videos i've found that are really good. I'm going through all of them and it's making my work projects make more sense! I'm a PHP dev with an interest in learning something new. Thanks again for the videos.

  • @kirank3368
    @kirank3368 2 ปีที่แล้ว +1

    This tutorial is awesome 👍🏽

  • @ZhengCheng
    @ZhengCheng 6 ปีที่แล้ว +3

    great tutorial, love it!

  • @saranguru6100
    @saranguru6100 5 ปีที่แล้ว +1

    hello sir..can you please explain how to use the data available in one component in another components?..

  • @Rpgreat
    @Rpgreat 7 ปีที่แล้ว +4

    Some pointers: When you do stuff like going into a file in the controller folder and say "lets do some users"without explaining why you go to that file, or any logic behind it, it is objectively very bad if you are hoping to teach people. If you explain your thought process in more than zero words like "because in the controller we want to sort out the logic that helps decide what we see in the template" or whatever it helps alot. If you do not do that part, it is equally educational for a beginner to just look at a complex webpage, because the text is all there. I understand that this is geared more towards experienced programmers and all, but I don't think some small explanaitions here and there would make your video worse for anyone, regarding the whole "MVC" and Ember.js structure and logic of things.

    • @jonathanfoster746
      @jonathanfoster746 5 ปีที่แล้ว

      This video is part of a series and he covers that stuff in other videos. He can't do all of it in all the videos or each one would be 10 hours long. There is a certain responsibility on the part of the person hoping to learn the material to dive deeper if they need to.

    • @jonathanfoster746
      @jonathanfoster746 5 ปีที่แล้ว

      Also if you click around all the various videos in this series you'll find that yours seems to be the only negative comment, so it stands to reason that most of the students don't find this style "objectively very bad"

  • @pragatidugar
    @pragatidugar 6 ปีที่แล้ว +1

    nice.which component hook to use, when we are leaving thae component,and we want to confirm before leaving?

    • @ScottBatson
      @ScottBatson  6 ปีที่แล้ว

      Thanks for watching!
      What do you mean by "leaving?" Do you mean the component will be removed from the page? If so, you would want to use "willDestroyElement". guides.emberjs.com/v2.6.0/components/the-component-lifecycle/#toc_detaching-and-tearing-down-component-elements-with-code-willdestroyelement-code
      Or is your component an input that has focus and you want to hook into when focus leaves it? If so, you would want to use the focusout or blur events.

    • @pragatidugar
      @pragatidugar 6 ปีที่แล้ว +1

      Ya I was meaning the same, thanks for 'asyncronous' help :P

  • @saranguru6100
    @saranguru6100 5 ปีที่แล้ว

    Hi Sir...Is there a way to focus on an component when we click on that? And when we click outside to that component it should lose focus.....is there any way?...please help it will be very much useful..

    • @ScottBatson
      @ScottBatson  5 ปีที่แล้ว

      There isn't really an "out of the box" way to do that in Ember. I would just use plain JS event listeners and call them on the "didInsertElement" hooks.

    • @saranguru6100
      @saranguru6100 5 ปีที่แล้ว

      @@ScottBatson can I listen to events like 'focus ' and 'blur' on the component?

    • @ScottBatson
      @ScottBatson  5 ปีที่แล้ว

      @@saranguru6100 Yes, if the component `tagName` is an element type that supports those events.

    • @saranguru6100
      @saranguru6100 5 ปีที่แล้ว

      @@ScottBatson Thank you very much for your help.

  • @saranguru6100
    @saranguru6100 5 ปีที่แล้ว

    can you please make an video on query params in ember.....?..it will be helpful

    • @ScottBatson
      @ScottBatson  5 ปีที่แล้ว

      I have thought about it before but honestly, I don't like the way Ember handles query params, so I've been avoiding it haha

  • @saranguru6100
    @saranguru6100 5 ปีที่แล้ว

    user-filter.js:47 Uncaught TypeError: Cannot read property 'findBy' of null....please help me out sir!!

    • @ScottBatson
      @ScottBatson  5 ปีที่แล้ว +1

      My guess would be that `users` is not passed into the component and is therefore null

    • @saranguru6100
      @saranguru6100 5 ปีที่แล้ว +1

      @@ScottBatson yep.. got it sir..thanks for the help .......your videos are really helping me a lot.....!!!you are really great for allocating your time for making videos to help others....