Overview
Dependency injection refers to the method that the davinci platform uses to call any of the component lifecycle methods. When a component exposes a lifecycle method, that method will be declared with a set of parameters. As an example, consider:
this.$html = function($id){
return '<div id="'+$id(this.config.id)+'"></div></div>'
}
this.$html = function($page, $id){
return '<div id="'+$id(this.config.id)+'"></div></div>'
}
Note that the exact parameters passed will be dependent on the context. For instance, depending on where the component exists in the page (that is, if it is a child component of some other component) may dictate the implementation of the paraemeter that is passed to the function.
Component Services
There are a number of services that are provided by the framework that can be requested as a parameter to any lifecycle method. see davinci api services