new

Stack Overflow for Teams

A private, secure home for your team's questions and answers.

Learn more
1
vote
1answer
19 views

I would like to add dropdown list for Product tab i am used

I would like to add dropdown list for Product tab. here is my code: angular.module('website', ['ui.bootstrap']); angular.module('website').controller('websiteTabsCtrl', function ($scope) { $scope....
-1
votes
2answers
29 views

How to access the updated below $scope value?

$scope.widgettype = ' '; $scope.getwidgettype().then(function (data) { $scope.widgettype = data; $scope.showdimaxis = data === 'bubble'; }); ...
0
votes
1answer
24 views

AngularJS dynamic scope variable not accepting white spaces

I have to create dynamic scope variables and AngularJS. when I tried the following code it works. var field = 'hand'; $scope[field] = 'value'; But when I tried the following it is not working. ...
0
votes
3answers
33 views

i have summ difficult to run $apply

i have list of element when i click in one of them, i fill the template then i copy it to the new DIV, i got an empty template, when i use $scope.$apply() i got an error. $scope.tache_list.forEach(...
0
votes
0answers
21 views

Angular js ng-Options adding extra option as default with dynamic model name inside ng-repeat [duplicate]

I have been troubling to fix this, i just wanted my dropdown to use my supplied value as selected. My HTML: <select ng-init="status[lot.mid]='{{lot.status}}'" ng-model="status[lot.mid]" ng-...
0
votes
0answers
29 views

TypeError: Cannot read property from sql database

I just started working in angularJS and kind of got a hand of it, but I can't seem to read from my database, when I return data with php files (the connection to the server is double checked and ...
0
votes
1answer
42 views

Angularjs 1.4 - Two ways binding - Input text changed but scope does not?

I have a very weird problem with AngularJS 1.4 (TypeScript). The problem is in the controller I have a variable and this value can be viewed in an input text box. However, when I edit the value in ...
0
votes
2answers
29 views

Not able to access angular directive's isolated scope

First Directive: app.directive("myDirectiveOne", function($rootScope){ return { templateUrl : "/custom-one-html.html", restrict: "AE", replace:true, scope: { ...
0
votes
0answers
18 views

Unable to bind controller $scope to directive modal [duplicate]

I have created a directive of bootstrap modal. I have binded $scope.reaso,$scope.modalHeader ,$scope.activity, $scope.myLeftButton from parent controll to the directive.I am changing the $scope.reason ...
0
votes
0answers
34 views

Angular JS application CPU usage is more when idle

I have noticed my angular js application is taking more CPU usage about 45% when it is idle mode. We have built much complex application using angular js V1.6.0, angular material V1.1.5 and d3js V4 as ...
0
votes
1answer
28 views

Save state of ng-change local scope in Datepicker

I have come across what seems like a very simple issue, but I cannot figure out how to fix it. I posted this question originally, but it seems the issue is with the scope. So basically, this is what ...
0
votes
0answers
38 views

AngularJS Controller resetting $scope variables after setting

I am trying to implement a simple datepicker using the akveo AngularJS project. When I change my date,I am setting a $scope variable from on-change function. When I debug, I can see that the correct ...
1
vote
0answers
21 views

How to iterate through multiple dropdowns in a grid in AngularJS for selected value

How to iterate through multiple dropdowns in a grid in AngularJS for selected value.Below is my code.Attached the sample grid UI .I wants to iterate through each of the row values and form a array ...
0
votes
0answers
61 views

Angularjs: view not updating when variable changes in success method of promise

I am calling a backend API using a factory method in angular. The factory method returns $http directly. In my controller, I am calling the factory method and fetching the data. The factory returned ...
0
votes
1answer
23 views

Both drop down auto selected using AngularJS when second DD is depend on first

I have data in table in that there are list of cities .when I click on update on same form data is fill-up into fields.I want that both my drop down,Country and Sate should be auto selected from ...
1
vote
1answer
33 views

Bootstrap multiselect is not working when i bind the data from response in Angularjs

Bootstrap multiselect is not working when i bind the data from response in Angularjs angular.module('ngvalueSelect', []) .controller('ExampleController', ['$scope','$http', function($scope,$...
0
votes
0answers
26 views

How to call angularJS variable from HTML

I am trying to use AngularJS to set variables on the App level and then call them throughout the files for a page. I can set hard coded numbers to pass to the functions in the scripts, so I know that ...
0
votes
0answers
44 views

How can i use checkbox to select the multiple values, inside Select box in AngularJS?

I'm using ng-options to lad my values inside the select box. At the same time, I want to select multiple values. How can I do that using checkbox? Note: multiple is not my option. I need it to be a ...
0
votes
1answer
26 views

How can i minimize my code to one api ? AngularJS

I'm having two api's which are doing same work. 1) By default, I'm getting the current date employee data. 2) I'm passing the parameters to get the selected date data. How can I minimize my code to ...
0
votes
0answers
29 views

How to call the function when api is called in AngularJs?

I want to minimalize my code, so how can I call the function by sending the date and time while api is called ? app.controller("attCtrl", ['$scope', '$filter', '$http', function ($scope, $filter, $...
0
votes
2answers
38 views

Cannot read property 'length' of undefined in Angularjs 1.6.6

I have to dropdown lists and want to populate the second list on the basis of selected value in the first list. I encountered a problem in populating the first list. I use getCurrentSessionCourses() ...
0
votes
1answer
31 views

Cannot create property 'subjects' on number '1' using AngularJs

I want to select multiple subjects across one course but can't do so I have two dropdown lists one for course selection and one for subjects selection. For multiple selection of the subjects I use ...
1
vote
2answers
37 views

Setup a attribute directive via another attribute directive is causing double bindings

Background: I want to to use ease up the usage of the <uib-tooltip> directive in my project to mainly have translated texts and to set further options for tooltips. For translation, I use ...
1
vote
0answers
34 views

How to manuplate path in JSON using AngularJS?

I want to create a new file inside a file. How can I achieve that? Below I'm getting the files and their paths and I can access them <div ng-repeat="t in main.path" style="padding:10px; float:...
1
vote
1answer
33 views

Refactor code to one function for momentjs

I have 2 functions prev() and next() which has almost the same code. Is there a way that I can combine the 2 functions into one function? <button id="prev-search-button" ng-click="prev()"><&...
0
votes
1answer
41 views

Angular 1.x - retrieve directive value from controller and assign it back to parent scope

I'm unable to get a variable value from directive to use that back in a controller. I do not have to bind the value to a view. All I need is to set 'cleanInputValue' from directive to $scope.keywords ...
0
votes
0answers
23 views

AngularJS data From Http resonse not binding to template

So, i was trying to bind data to Template, From HTTP response, data is received and is converted into a format that i assume should be what view requires, but there seems to be no no change in the ...
0
votes
1answer
42 views

AngularJS: $watch not called when changed in child scope

I have the following situation: In my parent scope, I define an object called rule, with an attribute called "keyword". On this keyword, I am setting a watcher: $scope.$watch("rule.keyword", function(...
0
votes
1answer
39 views

AngularJS infinite loop on scope function call

i am new in the AngularJS programming.So I call getDevice() scope function in my html and I seem to get in infinite loop.Console log: angular.js:14800 Error: [$rootScope:infdig] http://errors....
-1
votes
0answers
18 views

Showing Data only after reload

I've been using angularjs in my project. In that, I'm saving the user details including username in session storage once after login is finished, I want to show username in the homescreen navbar.I ...
0
votes
1answer
19 views

TypeError: $scope.weatherAPI.get is not a function

weatherApp.controller('forecastController', ['$scope', '$http','$resource', '$routeParams', 'cityService','$sce',function($scope, $http,$resource, $routeParams, cityService,$sce) { $scope.city = ...
1
vote
0answers
49 views

$scope of abstract state controller is not being destroyed upon leaving - AngularJS

I have an abstract state app, a child state app.dashboard, and a login state login in ionic1 application. Each state has its template and controller, except for app state; it only has a controller, ...
1
vote
1answer
68 views

What's the difference between < and @ scope isolation in angularJS?

My Rails app has different organization with their profile page with their own inventory stats table. Written below is the part of app/views/organization/show.html.erb <div ng-app="cc-app" class="...
0
votes
1answer
33 views

How can create validation for single control's value required from multiple control in angularjs(1.*.*)

i.e, I have four text boxes if I enter a value in any text box out of all text box, it should be allowed to submit otherwise throw an error,"Value is Required", It is possible using angularjs ...
0
votes
2answers
49 views

AngularJS ng-click only working on second click

Attempting to collapse a dropdown menu (language selection), within a mobile bootstrap navbar. On first click, the dropdown menu with the languages opens fine, after changing languages the dropdown ...
0
votes
0answers
34 views

angularjs - mdchips (md-enable-chip-edit and md-add-on-blur) Not working version - 1.5.11

I am using this (md-enable-chip-edit and md-add-on-blur) attribute in md-chips tag code, but not working properly. How can chips add to md-chips automatically when user type phrases and leave edit box ...
0
votes
0answers
19 views

Angularjs: how to set scope variable to null associatd with a block under ng-if gets removed from DOM

I have two radio button Yes and No in my angular view, when user clicks on Yes radio it renders(using ng-if) 3 text inputs ie. Input A, Input B and Input C. When user clicks No, it renders(again ...
-3
votes
1answer
21 views

How to send the path using Angularjs?

I'm getting the path of the files in ng-repeat. When I click on each file i should send the same path back to backend. so the new files should be updated by refreshing the div.How can i acheive that ? ...
0
votes
1answer
27 views

How can i provide a .config function to configure my library

I have made a little library of code for angular js. I have created a .config method in my library's main module that depends on my moduleConfigProvider. I expect the consumer of my library to call ....
0
votes
0answers
27 views

Angularjs: undefined isolated scope property when using controllerAs in custom directive [duplicate]

I am studying AngularJs for some legacy project. This seem to be a trivial example but I'm absolutely stuck. I tried to rewrite my custom directive code to use controllerAs and it does not work any ...
2
votes
1answer
41 views

how to store same data in multiple $scope variables in same controller using angularjs

I have to store same data in two different scope variables. I have saved as per below code. app.controller('ClientsCtrl', function ($scope, $http) { $scope.model = {}; $http.get(...
0
votes
2answers
42 views

Argument with 'controller' is not a function, got undefined

I have found similar question but not getting solution so i have post a question. I have been implementing and displaying data from database in angular js, below is mu code. index.php file: <...
0
votes
3answers
44 views

How to all data at once and apply to controllers in angularjs

i want to get all data at once through AJAX($http) request and apply to all controllers i picked this code from google it shows the i have to make requests for each controller were i can get data in ...
0
votes
1answer
22 views

Manipulating variable returned that is returned by promise AngularJS

So, I am stuck here most probably because of my limited understanding of promise Object. my function that fetch data from factory is $scope.getLogoFromService = function() { console.log('...
0
votes
2answers
40 views

how to add response data to $scope object to use in ng-repeat

Hello all i was trying to get response from $http.get method and append it to $scope object but it was stating undefined. After some research and referencing found the way to assign the data to object....
2
votes
2answers
31 views

AngularJS service/factory dynamically $compile HTML from $scope variable

Attempting to consolidate a function used across multiple controllers in an AngularJS project to a service/factory that I can call using $rootScope. The goal is to change the following function: $...
1
vote
0answers
77 views

AngularJS multi screen validation on last step

I have an angularJS application. I have implemented a generic workflow using $routeProvider, templateUrl & Controllers. Each step(screen) is verified when user click on next button and moves to ...
0
votes
1answer
19 views

How to send my data in headers in post request .?

I want to send my data in headers, so I converted my data into base64 and I'm getting the output in $http.defaults.headers.common['Authorization']. But how to post the basic auth data in headers in ...
2
votes
2answers
43 views

Angularjs 1.4.4: Uncaught ReferenceError: $rootScope is not defined

I want to use SockJs to receive all the events published by stomp from the server side. I have created WebSocketController. It is initiated in app.js as .controller('webSocketController', ...
0
votes
1answer
35 views

some params dont pass value when changing state angularjs

I have weird problem, I cant pass value of some params to other state in angular js. I tried to assign value to params for search params before doing http request .state('tab.box', { url: '/...