Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dxvladislavvolkov committed Jan 27, 2017
1 parent e87d85f commit 0da47aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/component.tst
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ import { WatcherHelper } from '../core/watcher-helper';

<#? it.isEditor #>

const CUSTOM_VALUE_ACCESSOR = {
const CUSTOM_VALUE_ACCESSOR_PROVIDER = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => <#= it.className #>Component),
multi: true
};<#?#>

@Component({
selector: '<#= it.selector #><#? it.isEditor #>, <#= it.selector #>[formControlName],<#= it.selector #>[formControl],<#= it.selector #>[ngModel]<#?#>',
selector: '<#= it.selector #>',
template: '<#? it.isTranscludedContent #><ng-content></ng-content><#?#>',<#? it.isViz #>
styles: [ ' :host { display: block; }'],<#?#>
providers: [
DxTemplateHost,
WatcherHelper,<#? it.isEditor #>
CUSTOM_VALUE_ACCESSOR,<#?#>
CUSTOM_VALUE_ACCESSOR_PROVIDER,<#?#>
NestedOptionHost<#? collectionProperties.length #>,
IterableDifferHelper<#?#>
]
Expand Down

0 comments on commit 0da47aa

Please sign in to comment.