Ember component - Explicit declaration of parameters in the component

Ember component - Explicit declaration of parameters in the component

Im kinda new in Ember world.

Im kinda new in Ember world.

When working with a large library of unknown components, Im having difficulties tracking what params they accept.

Let's put an fake example:

Template ViewA


Template ViewB


As we see, two templates are using my component-article component.

My issue comes when I want to use this component. How do i know the properties my **component-article is exposing?**

If Im Im new to the project, I have never seen nor use component-article, I have no idea what properties is accepting. In fact, I need to dig into the template, do a find in the project and see how others templates are calling it or what not.

Is there any way to explicitly set in the component-article.js file what properties Im allowing to come in?

The positionalParams property seems to almost serve this purpose but it does not.

Is there any property in the component that would allow me to set explicitly what params are accepted by the component? Any convention on this?


export default Component.extend({
  acceptProperties: ['title', 'content', 'preview', 'image']

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Ember.js vs Vue.js - Which is JavaScript Framework Works Better for You

In this article we will discuss full details and comparison of both Ember.js and Vue.js

Top Vue.js Developers in USA

Vue.js is an extensively popular JavaScript framework with which you can create powerful as well as interactive interfaces. Vue.js is the best framework when it comes to building a single web and mobile apps.