angulardart / angular

Fast and productive web framework provided by Dart
https://pub.dev/packages/angular
MIT License
1.83k stars 230 forks source link

type 'SpanElementImpl' is not a subtype of type 'Element' of 'value' #461

Closed zoechi closed 7 years ago

zoechi commented 7 years ago

I have a component with the following template

<span class="first">Hello</span> <span class="last">World</span>
<button (click)="search()">Search</button>

The code of the component

import 'package:angular2/angular2.dart';
import 'package:fhir_client_api/fhir_client_api.dart';
import 'package:fhir_webui/fhir.dart';
import 'package:fhir_webui/webui.dart';

@Component(
  selector: 'hello-world',
  providers: const <dynamic>[],
  directives: const <dynamic>[NgFor],
  pipes: const <dynamic>[JsonPipe],
  styleUrls: const <String>['hello_world_component.css'],
  templateUrl: 'hello_world_component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
)
class HelloWorldComponent {
  FhirDataConnection _dataConnection;
  final FormFhirDataSource _dataSource;
  List<SearchParamMetadata> _searchParam;
  HelloWorldComponent(this._dataSource, this._dataConnection) {
    _searchParam = _dataConnection.resourceFactory
        .getClassMetadataByName(Practitioner.fhirMetadata.resourceName)
        .rest
        .search
        .param;
  }

  search() async {
    final result = await _dataSource.mainDataSet.executeSearch(new Search(_searchParam));
    print(result.toJson());
  }
}

when I launch the app in Dartium it causes

EXCEPTION: Error in asset:dave_component/lib/hello_world/hello_world_component.html:0:0
STACKTRACE: 
package:angular2/src/debug/debug_app_view.dart 332:9                                  DebugAppView._rethrowWithContext
package:angular2/src/debug/debug_app_view.dart 75:7                                   DebugAppView.create
package:demo2/generated/components/form_practitioner_component.template.dart 238:17   ViewFormPractitionerComponent0.build
package:angular2/src/core/linker/app_view.dart 180:12                                 AppView.create
package:angular2/src/debug/debug_app_view.dart 73:26                                  DebugAppView.create
package:demo2/generated/components/form_practitioner_component.template.dart 1662:17  ViewFormPractitionerComponentHost0.build
package:angular2/src/core/linker/app_view.dart 188:12                                 AppView.createHostView
package:angular2/src/debug/debug_app_view.dart 86:34                                  DebugAppView.createHostView
package:angular2/src/core/linker/component_factory.dart 95:21                         ComponentFactory.create
package:angular2/src/core/linker/view_container.dart 97:26                            ViewContainer.createComponent
package:angular2/src/router/directives/router_outlet.dart 84:32                       RouterOutlet.activate.<fn>
dart:async                                                                            _ZoneDelegate.runUnary
package:angular2/src/core/zone/ng_zone.dart 184:21                                    NgZone._runUnary
dart:async                                                                            _Future._asyncComplete.<fn>
package:angular2/src/core/zone/ng_zone.dart 161:11                                    NgZone._scheduleMicrotask.<fn>
dart:async                                                                            _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21                                    NgZone._run

-----async gap-----
dart:async                                                       _Future.then
package:angular2/src/router/directives/router_outlet.dart 83:50  RouterOutlet.activate
package:angular2/src/router/router.dart 328:33                   Router.commit.<fn>
dart:async                                                       _ZoneDelegate.runUnary
package:angular2/src/core/zone/ng_zone.dart 184:21               NgZone._runUnary
dart:async                                                       _Future._asyncComplete.<fn>
package:angular2/src/core/zone/ng_zone.dart 161:11               NgZone._scheduleMicrotask.<fn>
dart:async                                                       _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21               NgZone._run

-----async gap-----
dart:async                                          _Future.then
package:angular2/src/router/router.dart 328:14      Router.commit
package:angular2/src/router/router.dart 484:31      RootRouter.commit
package:angular2/src/router/router.dart 238:16      Router._navigate.<fn>.<fn>
dart:async                                          _ZoneDelegate.runUnary
package:angular2/src/core/zone/ng_zone.dart 184:21  NgZone._runUnary
dart:async                                          _completeOnAsyncReturn
package:angular2/src/router/router.dart 311:7       Router._routerCanDeactivate.<fn>
dart:async                                          _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21  NgZone._run
dart:async                                          _CustomZone.bindCallback.<fn>
package:angular2/src/core/zone/ng_zone.dart 161:11  NgZone._scheduleMicrotask.<fn>
dart:async                                          _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21  NgZone._run

-----async gap-----
dart:async                                          _Future.then
package:angular2/src/router/router.dart 235:53      Router._navigate.<fn>
dart:async                                          _ZoneDelegate.runUnary
package:angular2/src/core/zone/ng_zone.dart 184:21  NgZone._runUnary
dart:async                                          _Future._asyncComplete.<fn>
package:angular2/src/core/zone/ng_zone.dart 161:11  NgZone._scheduleMicrotask.<fn>
dart:async                                          _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21  NgZone._run

-----async gap-----
dart:async                                              _Future.then
package:angular2/src/router/router.dart 231:10          Router._navigate
package:angular2/src/router/router.dart 190:21          Router.navigateByUrl.<fn>.<fn>
dart:async                                              _ZoneDelegate.runUnary
package:angular2/src/core/zone/ng_zone.dart 184:21      NgZone._runUnary
dart:async                                              _ZoneDelegate.runUnary
package:angular2/src/core/zone/ng_zone.dart 184:21      NgZone._runUnary
dart:async                                              _completeOnAsyncReturn
package:angular2/src/router/route_registry.dart 167:19  RouteRegistry._recognize.<fn>.<fn>
dart:async                                              _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21      NgZone._run
dart:async                                              _CustomZone.bindCallback.<fn>
package:angular2/src/core/zone/ng_zone.dart 161:11      NgZone._scheduleMicrotask.<fn>
dart:async                                              _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21      NgZone._run

-----async gap-----
dart:async                                          _Future.then
package:angular2/src/router/router.dart 186:31      Router.navigateByUrl.<fn>
dart:async                                          _ZoneDelegate.runUnary
package:angular2/src/core/zone/ng_zone.dart 184:21  NgZone._runUnary
dart:async                                          _Future._asyncComplete.<fn>
package:angular2/src/core/zone/ng_zone.dart 161:11  NgZone._scheduleMicrotask.<fn>
dart:async                                          _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21  NgZone._run

-----async gap-----
dart:async                                                                                _Future.then
package:angular2/src/router/router.dart 182:62                                            Router.navigateByUrl
package:angular2/src/router/router.dart 468:10                                            new RootRouter
package:angular2/src/router/router_providers_common.dart 25:24                            routerFactory
package:angular2/src/core/di/reflective_injector.dart 700:24                              ReflectiveInjectorImpl._instantiate
package:angular2/src/core/di/reflective_injector.dart 588:14                              ReflectiveInjectorImpl._instantiateProvider
package:angular2/src/core/di/reflective_injector.dart 575:12                              ReflectiveInjectorImpl._new
package:angular2/src/core/di/reflective_injector.dart 290:40                              ReflectiveInjectorDynamicStrategy.getObjByKeyId
package:angular2/src/core/di/reflective_injector.dart 811:32                              ReflectiveInjectorImpl._getByKeyDefault
package:angular2/src/core/di/reflective_injector.dart 782:14                              ReflectiveInjectorImpl._getByKey
package:angular2/src/core/di/reflective_injector.dart 529:17                              ReflectiveInjectorImpl.get
package:angular2/src/core/linker/app_view.dart 236:37                                     AppView.injectorGet
package:angular2/src/debug/debug_app_view.dart 98:31                                      DebugAppView.injectorGet
package:fhir_webui/src/webui_generated/main_menu/main_menu_component.template.dart 89:83  ViewMainMenuComponent0.build
package:angular2/src/core/linker/app_view.dart 180:12                                     AppView.create
package:angular2/src/debug/debug_app_view.dart 73:26                                      DebugAppView.create
package:demo2/generated/components/app_component.template.dart 243:18                     ViewAppComponent0.build
package:angular2/src/core/linker/app_view.dart 180:12                                     AppView.create
package:angular2/src/debug/debug_app_view.dart 73:26                                      DebugAppView.create
package:demo2/generated/components/app_component.template.dart 564:17                     ViewAppComponentHost0.build
package:angular2/src/core/linker/app_view.dart 188:12                                     AppView.createHostView
package:angular2/src/debug/debug_app_view.dart 86:34                                      DebugAppView.createHostView
package:angular2/src/core/linker/component_factory.dart 95:21                             ComponentFactory.create
package:angular2/src/core/application_ref.dart 349:38                                     ApplicationRefImpl.bootstrap.<fn>
package:angular2/src/core/application_ref.dart 320:26                                     ApplicationRefImpl.run.<fn>
dart:async                                                                                _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21                                        NgZone._run
dart:async                                                                                _CustomZone.run
package:angular2/src/core/zone/ng_zone.dart 304:23                                        NgZone.run
package:angular2/src/core/application_ref.dart 318:10                                     ApplicationRefImpl.run
package:angular2/src/core/application_ref.dart 347:12                                     ApplicationRefImpl.bootstrap
package:angular2/src/core/application_ref.dart 94:19                                      coreLoadAndBootstrap.<fn>

-----async gap-----
dart:async                                             _asyncThenWrapperHelper
package:angular2/src/core/application_ref.dart 89:36   coreLoadAndBootstrap.<fn>
package:angular2/src/core/application_ref.dart 320:26  ApplicationRefImpl.run.<fn>
dart:async                                             _ZoneDelegate.run
package:angular2/src/core/zone/ng_zone.dart 175:21     NgZone._run
dart:async                                             _CustomZone.run
package:angular2/src/core/zone/ng_zone.dart 304:23     NgZone.run
package:angular2/src/core/application_ref.dart 318:10  ApplicationRefImpl.run
package:angular2/src/core/application_ref.dart 89:23   coreLoadAndBootstrap

ORIGINAL EXCEPTION: type 'SpanElementImpl' is not a subtype of type 'Element' of 'value' where
  SpanElementImpl is from dart:html
  Element is from package:fhir_client_api/src/type/element.dart

ORIGINAL STACKTRACE:
#0      ViewHelloWorldComponent0._el_0= (package:dave_component/hello_world/hello_world_component.template.dart:40:11)
#1      ViewHelloWorldComponent0.build (package:dave_component/hello_world/hello_world_component.template.dart:53:5)
#2      AppView.create (package:angular2/src/core/linker/app_view.dart:180:12)
#3      DebugAppView.create (package:angular2/src/debug/debug_app_view.dart:73:26)
#4      ViewFormPractitionerComponent0.build (package:demo2/generated/components/form_practitioner_component.template.dart:238:17)
#5      AppView.create (package:angular2/src/core/linker/app_view.dart:180:12)
#6      DebugAppView.create (package:angular2/src/debug/debug_app_view.dart:73:26)
#7      ViewFormPractitionerComponentHost0.build (package:demo2/generated/components/form_practitioner_component.template.dart:1662:17)
#8      AppView.createHostView (package:angular2/src/core/linker/app_view.dart:188:12)
#9      DebugAppView.createHostView (package:angular2/src/debug/debug_app_view.dart:86:34)
#10     ComponentFactory.create (package:angular2/src/core/linker/component_factory.dart:95:21)
#11     ViewContainer.createComponent (package:angular2/src/core/linker/view_container.dart:97:26)
#12     RouterOutlet.activate.<anonymous closure> (package:angular2/src/router/directives/router_outlet.dart:84:32)
#13     StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:109:26)
#14     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:187:15)
#15     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:109:14)
#16     _rootRunUnary (dart:async/zone.dart:1128)
#17     _ZoneDelegate.runUnary (dart:async/zone.dart:685)
#18     NgZone._runUnary (package:angular2/src/core/zone/ng_zone.dart:184:21)
#19     _CustomZone.runUnary (dart:async/zone.dart:1012)
#20     _FutureListener.handleValue (dart:async/future_impl.dart:129)
#21     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:636)
#22     _Future._propagateToListeners (dart:async/future_impl.dart:665)
#23     _Future._completeWithValue (dart:async/future_impl.dart:478)
#24     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:510)
#25     NgZone._scheduleMicrotask.<anonymous closure> (package:angular2/src/core/zone/ng_zone.dart:161:11)
#26     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:187:15)
#27     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:99:48)
#28     _rootRun (dart:async/zone.dart:1120)
#29     _ZoneDelegate.run (dart:async/zone.dart:675)
#30     NgZone._run (package:angular2/src/core/zone/ng_zone.dart:175:21)
#31     _CustomZone.run (dart:async/zone.dart:1001)
#32     _CustomZone.runGuarded (dart:async/zone.dart:901)
#33     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:926)
#34     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#35     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#36     _ScheduleImmediateHelper._handleMutation (dart:html:53852)

ERROR CONTEXT:
Instance of 'DebugContext'

  (anonymous function)  

When I remove the first line, the error goes away.

In Chrome I get

html_dart2js.dart:3558 EXCEPTION: Error in asset:dave_component/lib/hello_world/hello_world_component.html:0:0
STACKTRACE: 
EXCEPTION: Error in asset:dave_component/lib/hello_world/hello_world_component.html:0:0
ORIGINAL EXCEPTION: NoSuchMethodError: method not found: 'append$1' (C.JSNull_methods.append$1 is not a function)
ORIGINAL STACKTRACE:
TypeError: C.JSNull_methods.append$1 is not a function
    at ViewHelloWorldComponent0.build$0 (http://localhost:63342/demo2/web/index.dart.js:60497:26)
    at ViewHelloWorldComponent0.dart.AppView.create$2 (http://localhost:63342/demo2/web/index.dart.js:26990:21)
    at ViewHelloWorldComponent0.create$2 (http://localhost:63342/demo2/web/index.dart.js:28739:21)
    at ViewFormPractitionerComponent0.build$0 (http://localhost:63342/demo2/web/index.dart.js:61659:64)
    at ViewFormPractitionerComponent0.dart.AppView.create$2 (http://localhost:63342/demo2/web/index.dart.js:26990:21)
    at ViewFormPractitionerComponent0.create$2 (http://localhost:63342/demo2/web/index.dart.js:28739:21)
    at ViewFormPractitionerComponentHost0.build$0 (http://localhost:63342/demo2/web/index.dart.js:63330:64)
    at ViewFormPractitionerComponentHost0.dart.AppView.createHostView$2 (http://localhost:63342/demo2/web/index.dart.js:26995:21)
    at ViewFormPractitionerComponentHost0.createHostView$2 (http://localhost:63342/demo2/web/index.dart.js:28752:21)
    at ComponentFactory.create$2 (http://localhost:63342/demo2/web/index.dart.js:27714:72)
ERROR CONTEXT:
Instance of 'DebugContext'

    at Object.wrapException (http://localhost:63342/demo2/web/index.dart.js:3988:17)
    at ViewHelloWorldComponent0._rethrowWithContext$3$stopChangeDetection (http://localhost:63342/demo2/web/index.dart.js:28893:21)
    at ViewHelloWorldComponent0._rethrowWithContext$2 (http://localhost:63342/demo2/web/index.dart.js:28897:21)
    at ViewHelloWorldComponent0.create$2 (http://localhost:63342/demo2/web/index.dart.js:28744:16)
    at ViewFormPractitionerComponent0.build$0 (http://localhost:63342/demo2/web/index.dart.js:61659:64)
    at ViewFormPractitionerComponent0.dart.AppView.create$2 (http://localhost:63342/demo2/web/index.dart.js:26990:21)
    at ViewFormPractitionerComponent0.create$2 (http://localhost:63342/demo2/web/index.dart.js:28739:21)
    at ViewFormPractitionerComponentHost0.build$0 (http://localhost:63342/demo2/web/index.dart.js:63330:64)
    at ViewFormPractitionerComponentHost0.dart.AppView.createHostView$2 (http://localhost:63342/demo2/web/index.dart.js:26995:21)
    at ViewFormPractitionerComponentHost0.createHostView$2 (http://localhost:63342/demo2/web/index.dart.js:28752:21)
ORIGINAL EXCEPTION: NoSuchMethodError: method not found: 'append$1' (C.JSNull_methods.append$1 is not a function)
ORIGINAL STACKTRACE:
TypeError: C.JSNull_methods.append$1 is not a function
    at ViewHelloWorldComponent0.build$0 (http://localhost:63342/demo2/web/index.dart.js:60497:26)
    at ViewHelloWorldComponent0.dart.AppView.create$2 (http://localhost:63342/demo2/web/index.dart.js:26990:21)
    at ViewHelloWorldComponent0.create$2 (http://localhost:63342/demo2/web/index.dart.js:28739:21)
    at ViewFormPractitionerComponent0.build$0 (http://localhost:63342/demo2/web/index.dart.js:61659:64)
    at ViewFormPractitionerComponent0.dart.AppView.create$2 (http://localhost:63342/demo2/web/index.dart.js:26990:21)
    at ViewFormPractitionerComponent0.create$2 (http://localhost:63342/demo2/web/index.dart.js:28739:21)
    at ViewFormPractitionerComponentHost0.build$0 (http://localhost:63342/demo2/web/index.dart.js:63330:64)
    at ViewFormPractitionerComponentHost0.dart.AppView.createHostView$2 (http://localhost:63342/demo2/web/index.dart.js:26995:21)
    at ViewFormPractitionerComponentHost0.createHostView$2 (http://localhost:63342/demo2/web/index.dart.js:28752:21)
    at ComponentFactory.create$2 (http://localhost:63342/demo2/web/index.dart.js:27714:72)
ERROR CONTEXT:
Instance of 'DebugContext'
(anonymous) @   html_dart2js.dart:3558
dart.BrowserExceptionHandler.call$3 @   index.dart.js:29246
dart.ApplicationRefImpl_closure1.call$1 @   application_ref.dart:274
dart._rootRunUnary.func @   zone.dart:1132
runUnaryGuarded$2   @   zone.dart:1309
_sendData$1 @   stream_impl.dart:330
dart._BufferingStreamSubscription._async$_add$1 @   stream_impl.dart:257
_sendData$1 @   broadcast_stream_controller.dart:379
dart.NgZone._onErrorWithoutLongStackTrace$5 @   broadcast_stream_controller.dart:254
(anonymous) @   VM1921:2
handleUncaughtError$2   @   zone.dart:981
_Future__propagateToListeners   @   future_impl.dart:551
_completeWithValue$1    @   future_impl.dart:478
dart._Future__asyncComplete_closure.call$0  @   future_impl.dart:510
dart.NgZone__scheduleMicrotask_closure.call$0   @   ng_zone.dart:161
dart._rootRun.func  @   zone.dart:1120
dart.NgZone._run$4  @   zone.dart:675
(anonymous) @   VM1923:2
run$1   @   zone.dart:1001
runGuarded$1    @   zone.dart:901
dart._CustomZone_bindCallback_closure.call$0    @   zone.dart:926
_microtaskLoop  @   schedule_microtask.dart:41
dart._startMicrotaskLoop    @   schedule_microtask.dart:50
dart._AsyncRun__initializeScheduleImmediate_internalCallback.call$1 @   async_patch.dart:51
call$0  @   js_helper.dart:2460
eval$1  @   isolate_helper.dart:474
_callInIsolate  @   isolate_helper.dart:59
dart.invokeClosure  @   js_helper.dart:2460
(anonymous) @   js_helper.dart:2480

Angular 3.1.0 Dart VM version: 1.25.0-dev.1.0 (Wed Jun 14 08:05:56 2017) on "macos_x64"

leonsenft commented 7 years ago

When I remove the first line, the error goes away.

First line of what?

ORIGINAL EXCEPTION: type 'SpanElementImpl' is not a subtype of type 'Element' of 'value' where SpanElementImpl is from dart:html Element is from package:fhir_client_api/src/type/element.dart

It looks like somehow this package is shadowing the Element from dart:html?

zoechi commented 7 years ago

@leonsenft sorry the first line from HTML (<span...)

I added the other parts only after I wrote that text :-/

leonsenft commented 7 years ago

Would you be able to share the .template.dart file generated for the component (with the original spans)?

zoechi commented 7 years ago
// @ignoreProblemForFile annotate_overrides
// @ignoreProblemForFile cancel_subscriptions
// @ignoreProblemForFile constant_identifier_names
// @ignoreProblemForFile non_constant_identifier_names
// @ignoreProblemForFile implementation_imports
// @ignoreProblemForFile library_prefixes
// @ignoreProblemForFile type_annotate_public_apis
// @ignoreProblemForFile STRONG_MODE_DOWN_CAST_COMPOSITE
// @ignoreProblemForFile UNUSED_IMPORT
// @ignoreProblemForFile UNUSED_SHOWN_NAME
// @ignoreProblemForFile UNUSED_LOCAL_VARIABLE
import 'hello_world_component.dart';
import 'package:angular2/src/core/reflection/reflection.dart' as _ngRef;
import 'package:fhir_client_api/fhir_client_api.dart';
import 'package:fhir_webui/fhir.dart';
import 'package:fhir_webui/webui.dart';
import 'package:angular2/angular2.template.dart' as i0;
import 'package:fhir_webui/fhir.template.dart' as i1;
import 'package:fhir_webui/webui.template.dart' as i2;
export 'hello_world_component.dart';
import 'hello_world_component.css.shim.dart' as import0;
import 'package:angular2/src/debug/debug_context.dart';
import 'package:angular2/src/debug/debug_app_view.dart';
import 'hello_world_component.dart' as import3;
import 'dart:html';
import 'package:angular2/src/core/render/api.dart';
import 'package:angular2/src/core/linker/app_view.dart';
import 'package:angular2/src/core/linker/view_type.dart' as import7;
import 'package:angular2/src/core/change_detection/change_detection.dart';
import 'package:angular2/src/core/linker/app_view_utils.dart' as import9;
import 'package:angular2/angular2.dart';
import 'package:fhir_webui/src/webui_generated/form/data_source.dart' as import11;
import 'package:fhir_webui/src/fhir/fhir_data_source.dart' as import12;
const List<dynamic> styles_HelloWorldComponent = const [import0.styles];
List<StaticNodeDebugInfo> nodeDebugInfos_HelloWorldComponent0 = [
  null,null,null,null,null,null,null,null,null,null,null
]
;
class ViewHelloWorldComponent0 extends DebugAppView<import3.HelloWorldComponent> {
  Element _el_0;
  Element _el_3;
  ButtonElement _el_6;
  static RenderComponentType renderType;
  ViewHelloWorldComponent0(AppView<dynamic> parentView,num parentIndex): super(import7.ViewType.COMPONENT,{},parentView,parentIndex,ChangeDetectionStrategy.CheckOnce,nodeDebugInfos_HelloWorldComponent0) {
    rootEl = document.createElement('hello-world');
    renderType ??= import9.appViewUtils.createRenderType('asset:dave_component/lib/hello_world/hello_world_component.html',ViewEncapsulation.Emulated,styles_HelloWorldComponent);
    setupComponentType(renderType);
  }
  ComponentRef build() {
    final import3.HelloWorldComponent _ctx = ctx;
    final HtmlElement parentRenderNode = initViewRoot(rootEl);
    var doc = document;
    _el_0 = createAndAppendDbg(this,doc,'span',parentRenderNode,0,0,0);
    _el_0.className = 'first';
    addShimE(_el_0);
    Text _text_1 = new Text('Hello');
    _el_0.append(_text_1);
    dbgElm(this,_text_1,1,0,20);
    Text _text_2 = new Text(' ');
    parentRenderNode.append(_text_2);
    dbgElm(this,_text_2,2,0,32);
    _el_3 = createAndAppendDbg(this,doc,'span',parentRenderNode,3,0,33);
    _el_3.className = 'last';
    addShimE(_el_3);
    Text _text_4 = new Text('World');
    _el_3.append(_text_4);
    dbgElm(this,_text_4,4,0,52);
    Text _text_5 = new Text('\n');
    parentRenderNode.append(_text_5);
    dbgElm(this,_text_5,5,0,64);
    _el_6 = createAndAppendDbg(this,doc,'button',parentRenderNode,6,1,0);
    addShimC(_el_6);
    Text _text_7 = new Text('Search');
    _el_6.append(_text_7);
    dbgElm(this,_text_7,7,1,27);
    Text _text_8 = new Text('\n\n');
    parentRenderNode.append(_text_8);
    dbgElm(this,_text_8,8,1,42);
    Text _text_9 = new Text('\n');
    parentRenderNode.append(_text_9);
    dbgElm(this,_text_9,9,3,76);
    Text _text_10 = new Text('\n');
    parentRenderNode.append(_text_10);
    dbgElm(this,_text_10,10,4,112);
    _el_6.addEventListener('click',eventHandler0(ctx.search));
    init(const [],const [],[
      _el_0,_text_1,_text_2,_el_3,_text_4,_text_5,_el_6,_text_7,_text_8,_text_9,_text_10
    ]
    );
    return null;
  }
}
AppView<import3.HelloWorldComponent> viewFactory_HelloWorldComponent0(AppView<dynamic> parentView,num parentIndex) {
  return new ViewHelloWorldComponent0(parentView,parentIndex);
}
const List<dynamic> styles_HelloWorldComponentHost = const [];
List<StaticNodeDebugInfo> nodeDebugInfos_HelloWorldComponentHost0 = [new StaticNodeDebugInfo([import3.HelloWorldComponent],import3.HelloWorldComponent,<String, dynamic>{})];
class ViewHelloWorldComponentHost0 extends DebugAppView<dynamic> {
  ViewHelloWorldComponent0 _compView_0;
  import3.HelloWorldComponent _HelloWorldComponent_0_2;
  static RenderComponentType renderType;
  ViewHelloWorldComponentHost0(AppView<dynamic> parentView,num parentIndex): super(import7.ViewType.HOST,{},parentView,parentIndex,ChangeDetectionStrategy.CheckAlways,nodeDebugInfos_HelloWorldComponentHost0) {
    renderType ??= import9.appViewUtils.createRenderType('',ViewEncapsulation.Emulated,styles_HelloWorldComponentHost);
    setupComponentType(renderType);
  }
  ComponentRef build() {
    final _ctx = ctx;
    _compView_0 = new ViewHelloWorldComponent0(this,0);
    rootEl = _compView_0.rootEl;
    dbgIdx(rootEl,0);
    _HelloWorldComponent_0_2 = new import3.HelloWorldComponent(this.injectorGet(import11.FormFhirDataSource,parentIndex),this.injectorGet(import12.FhirDataConnection,parentIndex));
    _compView_0.create(_HelloWorldComponent_0_2,projectableNodes);
    init([rootEl],const [],[rootEl]);
    return new ComponentRef(0,this,rootEl,_HelloWorldComponent_0_2);
  }
  dynamic injectorGetInternal(dynamic token,int nodeIndex,dynamic notFoundResult) {
    if ((identical(token, import3.HelloWorldComponent) && (0 == nodeIndex))) { return _HelloWorldComponent_0_2; }
    return notFoundResult;
  }
  void detectChangesInternal() {
    final _ctx = ctx;
    _compView_0.detectChanges();
  }
  void destroyInternal() {
    _compView_0.destroy();
  }
}
AppView viewFactory_HelloWorldComponentHost0(AppView<dynamic> parentView,num parentIndex) {
  return new ViewHelloWorldComponentHost0(parentView,parentIndex);
}
const ComponentFactory HelloWorldComponentNgFactory = const ComponentFactory('hello-world',viewFactory_HelloWorldComponentHost0,import3.HelloWorldComponent,_METADATA);
const _METADATA = const <dynamic>[HelloWorldComponent, const <dynamic>[]];
var _visited = false;
void initReflector() {
if (_visited) return; _visited = true;
_ngRef.reflector
..registerType(HelloWorldComponent, new _ngRef.ReflectionInfo(
const <dynamic>[HelloWorldComponentNgFactory],
const [const <dynamic>[FormFhirDataSource], const <dynamic>[FhirDataConnection]],
(FormFhirDataSource _dataSource, FhirDataConnection _dataConnection) => new HelloWorldComponent(_dataSource, _dataConnection))
)
;
i0.initReflector();
i1.initReflector();
i2.initReflector();
}
leonsenft commented 7 years ago

Sorry, one of the imports in your component shadows Element from dart:html. This is a known issue you can follow at #153. Until this is fixed, we recommend you prefix the problematic import in your component.

import 'package:fhir_client_api/src/type/element.dart' as fhir;
zoechi commented 7 years ago

Uh right. I'm aware of the issue. It confused me that adding HTML with no Angular binding or directive caused it. Thanks for investigating.

alekline commented 5 years ago

Hi zoechi,

I am working on a Dart project and need to talk to a SMART-on-FHIR server.

Is this fhir_client_api.dart library open source? I haven't been able to find a Dart FHIR client and will appreciate if you can point me in the right direction.

Thank you!