@@ -6,24 +6,6 @@ import {Module} from 'di/di';
66import { ProtoElementInjector , ElementInjector } from './element_injector' ;
77import { SetterFn } from 'change_detection/facade' ;
88
9- export class ProtoView {
10- @FIELD ( 'final _template:TemplateElement' )
11- @FIELD ( 'final _module:Module' )
12- @FIELD ( 'final _protoElementInjectors:List<ProtoElementInjector>' )
13- @FIELD ( 'final _protoWatchGroup:ProtoWatchGroup' )
14- constructor (
15- template :TemplateElement ,
16- module :Module ,
17- protoElementInjector :ProtoElementInjector ,
18- protoWatchGroup :ProtoWatchGroup )
19- {
20- this . _template = template ;
21- this . _module = module ;
22- this . _protoElementInjectors = protoElementInjector ;
23- this . _protoWatchGroup = protoWatchGroup ;
24- }
25- }
26-
279@IMPLEMENTS ( WatchGroupDispatcher )
2810export class View {
2911 @FIELD ( 'final _fragment:DocumentFragment' )
@@ -59,6 +41,28 @@ export class View {
5941 }
6042}
6143
44+ export class ProtoView {
45+ @FIELD ( 'final _template:TemplateElement' )
46+ @FIELD ( 'final _module:Module' )
47+ @FIELD ( 'final _protoElementInjectors:List<ProtoElementInjector>' )
48+ @FIELD ( 'final _protoWatchGroup:ProtoWatchGroup' )
49+ constructor (
50+ template :TemplateElement ,
51+ module :Module ,
52+ protoElementInjector :ProtoElementInjector ,
53+ protoWatchGroup :ProtoWatchGroup )
54+ {
55+ this . _template = template ;
56+ this . _module = module ;
57+ this . _protoElementInjectors = protoElementInjector ;
58+ this . _protoWatchGroup = protoWatchGroup ;
59+ }
60+
61+ instantiate ( ) :View {
62+ return new View ( DOM . clone ( this . _template . content ) ) ;
63+ }
64+ }
65+
6266
6367export class ElementInjectorTarget {
6468 @FIELD ( 'final _elementInjectorIndex:int' )
0 commit comments