Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Directive looks wierd #1

Open
fuqcool opened this issue Sep 30, 2013 · 2 comments
Open

Directive looks wierd #1

fuqcool opened this issue Sep 30, 2013 · 2 comments

Comments

@fuqcool
Copy link

fuqcool commented Sep 30, 2013

<ui-chart="data" chart-options="chartOptions"></ui-chart>
ui-chart is both tagname and attribute, which looks confusing.

How about
<ui-chart chart-data="data" chart-options="chartOptions"></ui-chart>

@gburnett
Copy link

gburnett commented Oct 1, 2013

Perhaps you would like to declare it this way:
<div ui-chart="data" chart-options="chartOptions"></div>

This is what I'm doing at the moment.

@xor-xor
Copy link

xor-xor commented Feb 1, 2014

I've been wrestling with this all day, so here's my comment in case someone would fall into similar situation.
It seems that using ui-chart both as a tagname and attribute is not only confusing, but also it doesn't work at all (at least w/ AngularJS 1.2.11, jqPlot 1.0.8 and jQuery 2.1.0).
Changing attrs.uiChart to attrs.chartData in directive's definition and using it as @fuqcool suggested does the trick (@gburnett's answer works w/o such modifications, though).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants