error handle
This commit is contained in:
@@ -78,7 +78,7 @@ class ApplicationComponent {
|
||||
function dynamicServiceExample(serviceId: string) {
|
||||
// 使用get方法动态获取服务
|
||||
try {
|
||||
const service = ServiceProvider.getServiceById(serviceId as any)
|
||||
const service = ServiceProvider.getService(serviceId as any)
|
||||
console.log(`动态获取服务[${serviceId}]:`, !!service)
|
||||
return service
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user