Search Posts

Author: Henry Blue

Pass Angular Expression into Javascript

Below I have an Angular expression {{USA_Visits.maximum.value |number:0 }} which I would like to use within JavaScript in order to generate a chart. This is my current code: <!– Angular expression –> {{USA_Visits.maximum.value |number:0 }} <!– Chart code –> <script> var chart = AmCharts.makeChart(“chartdiv”, { “theme”: “light”, “type”: “serial”, “startDuration”: 2, “dataProvider”: [{ “country”: “USA”, “visits”: {{USA_Visits.maximum.value |number:0 }}, “color”: “#FF0F00” }, { “country”: “Taiwan”, “visits”: 500, “color”: “#333333” }], “valueAxes”: [{ “position”: “left”, “axisAlpha”:0, […]

AngularJS Select Tab from Button Click

Using the AngularJS tabs directive, is there a way to select a tab from a button. Effectively what I would like to do is click the button ‘Select Tab 3’ and the third tab will be selected. <md-button id=”button” class=”md-raised”>Select Tab Three</md-button> <div ng-cloak> <md-content> <md-tabs md-dynamic-height md-border-bottom> <md-tab label=”one”> <md-content class=”md-padding”> <h1 class=”md-display-2″>Tab One</h1> </md-content> </md-tab> <md-tab label=”two”> <md-content class=”md-padding”> <h1 class=”md-display-2″>Tab Two</h1> </md-tab> <md-tab label=”three” id=”three”> <md-content class=”md-padding”> <h1 class=”md-display-2″>Tab Three</h1> </md-content> </md-tab> […]