In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.

learn more… | top users | synonyms

0
votes
4answers
30 views

Cant access scope variable in view

I'm new in angular.I cant access the scope variable in view. Controller $scope.getData = function (val) { alert(val) $scope.value= val; } view <pre>{{value}}</pre&...
0
votes
0answers
26 views

Inline edit function not working using angularjs

I really hope that you can help me. I have problem where i want to make CRUD operation. I successfully create add and delete operation but I can't create for edit function. My vision is to have a ...
0
votes
3answers
33 views

how to store Specific Column in scope variable Angularjs

I have $scope.Profile variable, in this variable below image data are store but i don't want yellow highlighted column , how to remove these columns from $scope.Profile variable, i want only full_name,...
0
votes
4answers
35 views

how to call controller function on button click when my button is placed in different controller in angularjs

I am new to AngularJS and making a single page application. Please see the attached screen shot I have a dropdown in which there is an apply button and on click of this button I want to call functions ...
0
votes
3answers
52 views

unable to access scope value

I have a code like this in html: <div ng-if="item.shareText"> <textarea></textarea> <div> <select ng-model="shareOptions"> <option value="PUBLIC" ...
0
votes
4answers
30 views

Not able to delete in repeat method in AngularJS

'Remove Choice' is not working. Here are two functions addNewChoice and removeChoice. The addNewChoice is working however removeChoice is not working. I don't know how to solve it. Here my code is ...
0
votes
1answer
26 views

Angular ng-repeat with form fields

I want to create a simple form with some nested data. When i click the addSite() function i want to create a new Site item and append it to my $scope.info. I cannot create more than one form and the $...
0
votes
0answers
8 views

Angular Material datepicker filter specific date

Can someone please explain how to apply a custom date as a filter using Angular Material without causing everyweek on that day to be selectable? I've followed the documentation and can get it to work ...
-2
votes
0answers
21 views

How to get columns values from scope variable for update

I have following code I want update textbox value. I don't want others values in this $scope variable. How do I do this? Please help me. There is some other data I don't want to update. $scope....
-1
votes
1answer
43 views

How to show Li tags dynamically using angular [on hold]

<html> <head> <script type="text/javascript" src="angushow.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/...
1
vote
1answer
18 views

$scope variable access in ng-option filter angularjs

how to access $scope variable in filter option please help me. $scope.Profile = Auth.getCurrentUserSync(); HTML <select class="form-control" name="customer" id="customer" ng-model="...
-1
votes
0answers
19 views

AngularJS custom service method doesn't work on server but it works on local

I am newbie with angularjs so I hopping to get proper guidance of working with angualar. I have written custom service with $http call and snippet of business logic and I am accessing that method into ...
0
votes
3answers
23 views

AngularJS fill $scope.selected with object from <select>

I have a problem with filling a scope with the correct data an keeping the correct attribute. I've a small PHP script which returns an id, a name and a time as json array. { "times": [ { ...
0
votes
1answer
29 views

Using scope which can be shared between all components in Angular

I have simple controller with one method: app.controller('MyApp', function($scope) { $scope.myMethod() {...} } I have also many components for input fields (for example for text input, number ...
0
votes
1answer
27 views

Ng-include losing scope

I need to show different forms depending on user clicking different buttons. The user should be able to switch different forms and read previous data inserted. Unfortunately it seems like ng-include ...
0
votes
3answers
29 views

AngularJs: How to initialize the value for function Which is returning NaN?

I had a problem on my code in angularJs function which is return NaN instead of 0 during initialization. Sample Code is Here var app = angular.module('myApp', []); app.controller('personCtrl', ...
0
votes
4answers
32 views

AngularJS, calculation addition (+) is not working

I tried to calculate $scope values through angular controller. For instance: the below code works in order to multiply values inside brackets. However, addition(+) is working like 400+200 = 400200. ...
0
votes
0answers
21 views

$scope variable doesnot bind with view after getting updated

I have a $scope variable isAuth that is a boolean which will be true when user signs in. And I use this variable to show a footer using ng-hide. I have a route definition with $routeProvider service ...
1
vote
0answers
18 views

function on $scope vs function on $window

We can create functions at scope level. If i have a controller todoCtrl then if i define a function inside the controller scope that method will reside inside the controller scope. For example, $...
0
votes
1answer
20 views

View No Longer Updating Immediately in Efforts to Clean Up Scope Soup

I've fallen victim to self-imposed $scope soup and am taking steps to correct this. I'm adopting some of the methods written about by Josh Carroll in his article here: http://www.technofattie.com/2014/...
0
votes
1answer
18 views

I wrote an if condition inside angularjs controller, not working properly

I wrote this if statement by myself to differentiate USD and LKR, the values are not coming properly. Is this if condition correct? $scope.$watch('currencyVal', function () { ...
1
vote
2answers
33 views

Angular JS - NG-Repeat with filters and groupBy

I am building a dashboard to display ogoing and closed issues. I got everything working with angular's ng-repeat with filters and grouped by date. Here is a quick sample of what I got so far: <div ...
0
votes
1answer
41 views

How to capture the error code in $q deferred promises

I have planned to create a custom alert message according to the error codes. So I have to get the error codes while sending the request to the server and getting an response from the server. 500 - ...
0
votes
0answers
42 views

not getting textbox value using ng-click

I am getting an undefined when getting the value of the textbox which i weird because i have done this perfectly in my other controller. I am missing something or what app.controller('expandCtrl', ...
0
votes
0answers
24 views

Update part of model from scope selected object

Ok, I have model with one property(provider) as object. It can change at all. There is example, where I change provider. There can be any parametrs, image can has dpi, json can has another parametr. ...
0
votes
2answers
28 views

AngularJS function in controller and factory not working when separated

angular.module('myFirstApp')// //begin controller .controller('myController',function($scope,$http,personFactory){ //hi im controller i need to call the http service from the factory //...
0
votes
0answers
13 views

Response for preflight has invalid HTTP status code 403- ionic app error

Hey getting error mentioned above. It is running fine on mobile but not on browser.preflight has invalid HTTP status code 403. Backend developer says he has coded everything perfectly at the backend. ...
2
votes
2answers
36 views

ngModel undefined when using directive - Angularjs controller

My ngModel is undefined when using the ngPattern directive. If I remove ngPattern, the ngModel works as expected. See plnkr. Note how vm.condition does not show when typing a value in the text box, ...
0
votes
0answers
20 views

Cannot modify variable out of scope [duplicate]

No matter where I place the variable. The changes do not reflect outside the loop. $scope.getSubsByEmail = function(email) { var userNotFound = 0; var arr = [] SITES.forEach(function(site)...
0
votes
0answers
22 views

Global Exception handling in angular js using promises : Exception handling: $q promises not catching Error code

I have plan to implemented the Err handling service globally for my existing application. I am not send the error code from server. so i have plan to implement the Error code in angular by using ...
0
votes
0answers
35 views

How to find a substring count with Javascript and then pass into AngularJS

Essentially what I want are numbers that I can pass into HTML based on a the number of times substring is matched from a response body. I understand the best way to get that number is through regex. ...
0
votes
2answers
33 views

Implement a single method or use $scope.on and $scope.emit in AngularJs that will call the same method in multiple controllers without a service

I know similar questions has been asked in the past, but I hope to get a better understanding to my specific issue. I have multiple controllers managing the view of a single page. The main reason ...
0
votes
0answers
12 views

angularjs datatable is not working while using datatable='ng' searching and pagination

My Controller .controller('BankaccountViewController', function($scope, $uibModal, $log, $location, $routeParams, $timeout, DTOptionsBuilder, BankaccountService) { $scope.dtOptions = ...
-2
votes
1answer
28 views

How to use Ng-repeat within controller not in view

According to the below json. If I call this scope in controller, I am getting output : [{"code":"USD","value":"0.00670000"}]. I want to get only value but within controller I want to do. Does ...
0
votes
1answer
32 views

how to get multiple object value in angularjs

i have following code i have more then one object in return how to get these please help check below code and image file .then(response => { this.jobCategories = response.data; ...
1
vote
1answer
25 views

Project structure for large Angular application?

I am new to angular js I want to create my project structure like this - APPLICATION -index.html -app.js -modules -core -controllers -directive -views -core....
1
vote
1answer
32 views

Changing $scope.variable in $scope.$on function does not update view

I want to listen for route changes and update a $scope variable to reflect the current route in my menu (md-nav-bar): $scope.$on('$routeChangeSuccess', function(event, current) { $scope....
0
votes
1answer
42 views

Controller and directive variable's scopes

I'm new to AngularJS. I've started learning it from basics and began doing the simplest examples and the custom ones. Recently I've found some strange behavior of AngularJS. I have the following code ...
0
votes
1answer
19 views

$http POST angular-Submit constant public key at the time of login

I need to submit public key with constant key value, along with username and password at the time of login.And also to redirect it some other page in ionic app- href="#/tab/abc", if login is ...
1
vote
1answer
34 views

angular js redirect to view

I have below code code to render /result content whenever the defaultview function is called using the $route service angular.module('myapp').controller ('ResultController',['$route',function (...
0
votes
2answers
35 views

How can i toggle directive without using scope declaration

I need to watch an attribute from a directive, and have that toggle a function whenever the value is true, this works the first time you click it, but i then need to reset the value of the ATTRIBUTE/...
1
vote
0answers
40 views

AngularJS ng-class doesn't update

I've got a problem with ng-class. This is a piece of my controller export class UIController { public static $inject = []; public commands: Array<string> = ['showMap', 'showGantry', '...
0
votes
1answer
25 views

Work with ng-disable when required field is empty

I'm having some problems to put ng-disable to work, so, I have this div: <div> <p>{{ message }}</p> <div > <input type="number" id="field1" placeholder="field 1" ...
0
votes
1answer
35 views

Why does ng-show=“true” not reference $scope.true?

If I set $scope.true = false;, I would expect an Angular expression that references true to evaluate as false. Similarly, I'd expect $scope.false = true and $scope.undefined = true to yield similar ...
0
votes
2answers
51 views

How to add the values which is present inside the array (or) Json?

I been wondering if someone fixed my issue. my code looks like this. var app = angular.module('myApp', []); app.controller('myCtrl',function($scope){ //Adding New Check# and Check amount Text ...
1
vote
2answers
43 views

Why ng-repeate object not getting updated?

This is the function which load listings from server. Initially listings are displayed but when gets null response on applying filter, it still shows previous result and not clearing previous listings....
0
votes
3answers
29 views

View form surroundet with ng-if is clearing model

I'm trying to send some data from a form to my controller. Surrounded in the template file with an if. So my working example (without ng-if) is: View <form ng-submit="activate()"> <div ...
0
votes
1answer
32 views

User input not binding from $scope.$watch

Just getting started with Angular and I've spent the last 2 days trying to figure out how to bind data from a new search through a service. I had the search working before with the following code ...
-1
votes
1answer
32 views

Insert all data from front end to database using angularjs [closed]

Im very new to angularjs. I have some sort of data in in my html file. I need to insert all data from front end to database. Does anyone provide me some coding for that?
1
vote
2answers
35 views

IONIC APP- get device id for post service($http.post)

I'm trying to get the device id getUUID at the time of app login along with username and password. Is the right way to get device id and post it to the server for login. controller.js ....