有没有一种方法可以使用Angular i18n AOT转换子组件中的自定义属性值?
我知道我们可以如下转换HTML元素属性。
<input i18n-placeholder="search criteria date @@criteriaDate"
placeholder="Date"
formControlName="date" required>
Run Code Online (Sandbox Code Playgroud)
但是我想对我的组件属性做同样的事情。在此示例中,我想传递标题属性转换后的值。
<custom-spinner
formControlName="nights"
[title]="'Nights'"
i18n-title="search criteria nights@@criteriaNights">
</custom-spinner>
Run Code Online (Sandbox Code Playgroud)
当我尝试此操作时,它不会在messages.xlf文件上生成条目。我找不到任何例子。
在我的grails应用程序中,我发送有关例外的电子邮件.在我的UrlMappings.groovy.
"500"(controller: "error", action: "internalError")
Run Code Online (Sandbox Code Playgroud)
在我的internalError()方法中,ErrorController.groovy我使用MailService.groovy并发送异常细节.
现在我想发送类似的电子邮件,用于插件/框架中发生的异常,例如:hibernate,GORM,grails等
但问题是他们中的大多数已经通过try catch块处理并记录在插件中.例如 :
catch(Exception e){
log.error("Error creating workbook", e)
}
Run Code Online (Sandbox Code Playgroud)
无论如何,我可以通过电子邮件发送此类例外吗?
这是我的log4j配置.
log4j.main = {
error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'
}
Run Code Online (Sandbox Code Playgroud)