map icon indicating copy to clipboard operation
map copied to clipboard

Circle directive breaks circle svg tag, need to NS your directives

Open InsOpDe opened this issue 7 years ago • 3 comments

IMPORTANT

ERROR Error: StaticInjectorError(AppModule)[Circle -> NguiMapComponent]: StaticInjectorError(Platform: core)[Circle -> NguiMapComponent]: NullInjectorError: No provider for NguiMapComponent!

Steps to reproduce and a minimal demo demo

  • just add a circle-svg element somewhere (even used namespacing i.e. svg:circle)

Current behavior

  • the map doesnt get rendered because the circle-element throws an error

Expected/desired behavior

  • no error whatsoever

Other information

  • #243

InsOpDe avatar Jun 14 '18 05:06 InsOpDe

Any workaround for this issue? Mine was using NgNonBindable directive in the svg element, but it won't allow you to bind data to any child element.

cemarte avatar Jun 20 '18 14:06 cemarte

It also happens with polygon tag

t-zander avatar Sep 05 '18 10:09 t-zander

Please use ngNonBindable

<ngui-map zoom="5" center="24.886, -70.268" scrollwheel="false">
      <map-polygon [editable]="true"
        [paths]="paths"
        [strokeColor]="'#FFC107'"
        [strokeOpacity]="0.8"
        [strokeWeight]="2"
        [fillColor]="'#FFC107'"
        [fillOpacity]="0.35"></map-polygon>
</ngui-map>
<svg ngNonBindable viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <circle cx="50" cy="50" r="10"/>
</svg>

allenhwkim avatar Sep 06 '18 02:09 allenhwkim