Ember.js: Tutorial — Part 2: Provider Components

Lessons

  1. Use
    Ember
    1's
    built-in <Input> component
  2. Provider component pattern
  3. Use block parameter when invoking a component
  4. Yield data to a caller component

1. Use Ember's built-in <Input> component

1.1. Generate rentals component

1.2. Edit rentals component class

1.3. Edit rentals component

NOTE

  • <Input> is just a wrapper around <input> tag
  • this.query is kept in sync with @value's value

1.4. Edit index template

1.5. Edit rentals component test

1.6. Run rentals component test


2-4. The Provider component pattern

IMPORTANT

This section include lessons for:

  • 3. Use block parameter when invoking a component
  • 4. Yield data to a caller component

2-4.1. Generate filters namespaced component

2-4.2. Edit filters namespaced component class

2-4.3. Edit filters namespaced component

2-4.4. Edit rentals component

NOTE

The provider component pattern provides data up to its caller.

2-4.5. Edit rentals component test

2-4.6. Run rentals component test


References

Show Comments