mattlaver/angular-justgage

Not interpreting template tags?

Closed this issue · 2 comments

Hi!

I'm trying to use the directive, but it doesn't seem to be taking the angular template parameters.

It seems to croak without even iterating on the ng-repeat (probably because if identical id tags?)

Instead of interpreting the variables, it's just copying them:

<just-gage id="gage_new_{{sys_stat_id}}" min=0 max=100 value={{sys_stat_count}} title="{{sys_stat_id}}" class="gauge"></just-gage>

It's displaying the "{{sys_stat_id}}" etc inline while other hardcoded "gages" work fine.

I see that there are scope.watches on the max and value, but for some reason it's not doing the trick. Angular doesn't seem to be correctly operating.

Suggestions?

Thanks!

Sounds like a bug. Can you can provide some code that demonstrates the issue and I'll look into it.

Cheers.

Matt, here's what I ended up having to do to get it to display as I wanted. I couldn't get the ID to work without doing an ng-init first. But at least the gauges are displaying.

 <div ng-repeat="(sys_stat_id, sys_stat_count) in value" ng-init="$gid =  'g_'+sys_stat_id">
  <just-gage id=$gid min=0 max=main_data.converter[sys_stat_id].max value=sys_stat_count title="Lead" class="gauge"></just-gage>
</div>

So I guess it's just the way angular works with attributes inside tags.

Probably this is closable eh?