# Category: angular1.6

## Is it possible to interpolate a value to a class name with ng-class?

Is it possible to interpolate a value to a class name with ng-class ?? I’m not even sure whether it’s possible in angular1.6 ? So for example… <section id=“section-1”> <p class=“myclass-1”>help</p> </section> <section id=“section-2”> <p class=“myclass-2”>help</p> </section> <section id=“section-2”> <p class=“myclass-2”>help</p> </section> I tried the following which obviously doesn’t work.. <div ng-repeat=“item in $ctrl.somethings”> <section id=“section-{{$index}}”> <p ng-class=“{ ‘my class-{{index}}’: $ctrl.name===‘examplething’ &&$index==={{index}} }”>help</p> </section> </div> Any help REALLY appreciated : ) Source: AngularJS

## How to check for URL parameters with angular1.6?

I had a scenario where i need to add the params to the URL. If i add as below url is messed up if there are params already included to the URL /stackoverflow?add=true; But how to check if there are any params and add the new params to it /stackoverflow?alreadyThere=true&add=true Thanks Source: AngularJS

## angular 1.6 protractor e2e test cases are failed for me but same is running for others

I have tried to run the protractor e2e test cases in angularjs 1.6 but those are failing. But, if i check the same test cases in some others machine those are working fine. May i know the reasons for this. Source: AngularJS

## Is there a config option to lower the amount of AngularJS 1.x digest cycles?

I was contemplating a means to increase performance in an app while meeting client demands. Right now it seems that the digest runs 5x per second where we only really need it to run perhaps twice per second. Is there a way to lower the amount of times the digest runs? Source: AngularJS

## ng-option is replacing my default option

I am having a select tag as <select ng-model=”vm.fooModel” ng-options=”item.id as item.name for item in vm.fooOptions” > <option value=”none”>Select</option> </select> The issue is that when this is getting rendered angular 1.6 is removing my default option and adding an empty option <option value=”?” selected=”selected”></option> My initial model value for “vm.fooModel” is “none” . ̶T̶h̶i̶s̶ ̶w̶a̶s̶ ̶w̶o̶r̶k̶i̶n̶g̶ ̶f̶i̶n̶e̶ ̶i̶n̶ ̶a̶n̶g̶u̶l̶a̶r̶ ̶1̶.̶5̶ Source: AngularJS

## How to initiate websocket connection when user logged in and unsubscribe them when logged out in Angularjs 1.x web app [on hold]

Currently, I am using Angularjs 1.5. I need to subscribe to websocket topics when user logged in and unsubscribe them when user logged out in angularjs.. And need to handle page refresh, subscribe to topics when user is already logged in. Not sure where to write this logic.. app.run(()=>{}) ? Source: AngularJS

## Angular 1.x – How to display table with dynamic rows and columns

Aim – Display a dynamic table for both rows and columns as below – Dynamic Header – The fund codes are values for “name” from the json object array. Dynamic rows with values for Application, Redemption and Net JSON object : [ { name: ‘VBIF’, application: 1000, redemption: -200, netAppRed: 800 }, { name: ‘VCIF’, application: 1500, redemption: -200, netAppRed: 800 }, { name: ‘VMPF’, application: 2000, redemption: 0, netAppRed: 2000 }, { name: ‘VBIF-A’, […]

## Ng-repeat one-time binding and "track by" change

Our web app uses ngRepeat to display a list of items. The array and its objects are never changed, but values of the objects inside can be modified by the user. We generate a unique trackId’s for each item. This trackId is updated every time the item’s values change. We are also using the one-time binding syntax to reduce the number of watchers on the page (as it can quickly climb to the thousands). However, […]