Trying to update our custom theme component to the new standard after the deprecation notice and I can’t figure out how to show different stuff for mobile users in this setting.
The theme guide doesn’t mention anything about this, the only relevant post I found is api.renderInOutlet not rendering? - #3 by NateDhaliwal which uses this.site.mobileView so I assumed something like the following should work:
لا. المُزخرف @service متاح فقط في فئات Ember مثل المكونات أو الخدمات. إذا تمت إعادة هيكلة <template>...</template> كمكون منفصل، فيمكنك استخدام المُزخرف. نظرًا لأن apiInitializer() هو مجرد دالة، فيجب الوصول إلى الخدمة مثل JavaScript العادي.
شكرا، هذا يعمل!
ومن المضحك أيضًا كيف أن (على الأقل هذه النكهة من) جافاسكريبت الحديثة تبدو بشكل متزايد مثل جافا الخاصة بالشركات عندما كنت أعمل في هذا العالم (أوائل عام 2010)