本文整理汇总了TypeScript中angular2/change_detection.Parser.parseAction方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Parser.parseAction方法的具体用法?TypeScript Parser.parseAction怎么用?TypeScript Parser.parseAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/change_detection.Parser
的用法示例。
在下文中一共展示了Parser.parseAction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _bindEvent
_bindEvent(name, expression, current: CompileElement, newAttrs) {
current.bindElement().bindEvent(
dashCaseToCamelCase(name),
this._parser.parseAction(expression, current.elementDescription));
// Don't detect directives for event names for now,
// so don't add the event name to the CompileElement.attrs
}
示例2: _bindDirectiveEvent
_bindDirectiveEvent(eventName, action, compileElement, directiveBinderBuilder) {
var ast = this._parser.parseAction(action, compileElement.elementDescription);
if (StringWrapper.contains(eventName, EVENT_TARGET_SEPARATOR)) {
var parts = eventName.split(EVENT_TARGET_SEPARATOR);
directiveBinderBuilder.bindEvent(parts[1], ast, parts[0]);
} else {
directiveBinderBuilder.bindEvent(eventName, ast);
}
}
示例3: _bindHostAction
_bindHostAction(actionName, actionExpression, compileElement, directiveBinderBuilder) {
var ast = this._parser.parseAction(actionExpression, compileElement.elementDescription);
directiveBinderBuilder.bindHostAction(actionName, actionExpression, ast);
}