Access model settings in Loopback 4 #7190
Replies: 3 comments
-
LB4 model classes are bound the const settings = app.getSync('models.MyModel#.definition.settings');
Or
@inject('models.MyModel#definition.settings')
private settings: object; |
Beta Was this translation helpful? Give feedback.
-
Would |
Beta Was this translation helpful? Give feedback.
-
Not exactly. The difference between From performance perspective, |
Beta Was this translation helpful? Give feedback.
-
In Loopback 3 i could access the models and their settings by using app.models['Logs'].settings.
How can i do this in Loopback 4?
Beta Was this translation helpful? Give feedback.
All reactions