javascript - AngularJS specifying multiple values for attribute of custom directive -
I have a directive in AngularJS & lt; Chart & gt; I'm creating a
x-series
and y-series
in this one
One requirement is that these attributes Several criteria should be taken, such as x-series = "xData1 xdata2 xdata3"
and y-series = "ydata1 ydata2 ydata3"
.
How do I resolve different values of X-series and Y-Series features? I can do this by dividing it by the location of scope.xSeries
and scope.ySeries
but I should know that if angular is a better way of specifying the attribute with multiple values Offers.
For example, you can pass an array.
& lt; Chart Wi-Series = "Mayer" & gt; & Lt; / Chart & gt; // $ scope.myArray = ['ydata1', 'ydata2'] in the controller; // In the Director field: {'y-series': '=' // This will force left-directional data for array}
Comments
Post a Comment