-
Notifications
You must be signed in to change notification settings - Fork 25.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(parser): allow users install custom AST transforms #5382
Conversation
constructor(private _exprParser: Parser, private _schemaRegistry: ElementSchemaRegistry, | ||
private _htmlParser: HtmlParser) {} | ||
private _htmlParser: HtmlParser, injector: Injector) { | ||
let transforms = isPresent(injector) ? injector.getOptional(TEMPLATE_TRANSFORMS) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vsavkin is this not the same as the following?
@Optional @Inject(TEMPLATE_TRANSFORMS) public transforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -13,7 +13,8 @@ import { | |||
assertionsEnabled, | |||
isBlank | |||
} from 'angular2/src/facade/lang'; | |||
import {Injectable} from 'angular2/src/core/di'; | |||
import {Injectable, Injector, OpaqueToken} from 'angular2/src/core/di'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import form angular2/core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
11f95d4
to
a1345e3
Compare
a1345e3
to
6abaf32
Compare
Merging PR #5382 on behalf of @alxhub to branch presubmit-alxhub-pr-5382. |
@@ -13,7 +13,8 @@ import { | |||
assertionsEnabled, | |||
isBlank | |||
} from 'angular2/src/facade/lang'; | |||
import {Injectable} from 'angular2/src/core/di'; | |||
import {Injectable, Inject, Injector, OpaqueToken, Optional} from 'angular2/core'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOC, is Injector
needed here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch: #5424
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.