()
| 115 | constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) {} |
| 116 | |
| 117 | load() { |
| 118 | const $q = services.$q; |
| 119 | const context = new ResolveContext(this.path); |
| 120 | const params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {}); |
| 121 | |
| 122 | const promises: any = { |
| 123 | template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)), |
| 124 | controller: $q.when(this.getController(context)), |
| 125 | }; |
| 126 | |
| 127 | return $q.all(promises).then((results) => { |
| 128 | trace.traceViewServiceEvent('Loaded', this); |
| 129 | this.controller = results.controller; |
| 130 | extend(this, results.template); // Either { template: "tpl" } or { component: "cmpName" } |
| 131 | return this; |
| 132 | }); |
| 133 | } |
| 134 | |
| 135 | getTemplate = (uiView, context: ResolveContext) => |
| 136 | this.component |
no test coverage detected