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
2answers
15 views

scope.$destroy is not triggered

I have created a plunkr demo of the problem. The problem I'm facing here is fairly simple: calling $destroy manually or removing the element doesn't fire the $destroy event. function link(scope, ...
0
votes
1answer
19 views

Two way data binding in isolated child directive

I have a form which contains a fieldset, Form can have varying number of this fieldset, so I have a add more button in the form. There can be a situation where form has no fieldset. To fulfill these ...
1
vote
1answer
11 views

Angular: using $rootScope.$on vs $scope.$on to catch a $rootScope.$broadcast in a component – what is better in terms of performance?

Hi I’m wondering what is better in terms of performance. Let’s say I have this factory that broadcasts stuff: angular.module('core.foo') .factory('Foo', ['$rootScope', function ...
2
votes
1answer
35 views

AngularJS Directive doesn't update scope for callback

I am using directives to create a component library in AngularJS 1.5. Hence, my directives need to have isolate scopes. Some of my directives have callbacks so you can pass in a function to get ...
1
vote
1answer
14 views

How can I know from which directive is called a function that is defined on the $rootScope?

I have multiple directives and in every directive I call a function which is defined on the $rootScope. I want to find a way to tell from which directive the function was called without sending the ...
0
votes
1answer
23 views

pass value from angularjs directive link function to templateurl

I am trying to build a angular directive as shown below <!DOCTYPE html> <html lang="en" ng-app="directiveModule"> <head> <meta charset="UTF-8"> <title> Angular ...
0
votes
3answers
18 views

How to add a progress bar in ionic app

I really need your help, I am new to ionic project. Currently working on a project. This app pulls blog post from wordpress using $http. How can I add a progress bar to tell the users that the page is ...
0
votes
2answers
19 views

Pass Angular $scope object to PHP to Hubspot Form

I'm trying to pass Angular $scope values to a Hubspot form by calling an AJAX function. I'm making calculations in the controller and then I would like that data to be input to a corresponding ...
0
votes
2answers
28 views

Bootstrap tabs not hiding with ng-show

I have a requirement where I have two buttons: A and B A has 3 tabs associated with it- a,aa and aaa B has 3 tabs associated with it- b,bb and bbb The page should initially load with A active(css ...
0
votes
1answer
29 views

angularjs dirty checking rate

I was reading some article to understand a little bit more how angular.js works. I understood what is 'dirty checking($digest)'. But on what rate the watchers are listening for dirty fields? And ...
0
votes
2answers
13 views

scope resolution operator angularjs

Is there a way to use a scope resolution operator, like in c++, to use a parent $scope variable instead of the one in the current $scope. I have two controllers, a Root ctrl and a Settings Ctrl. The ...
0
votes
0answers
28 views

Angularjs ng-click doesn't work inside scope (Firefox only)

I just play around with angularjs and its functions. I simply try to click a button and return a string in console.log. When I click the button, nothing happens even no error message is visible. What ...
1
vote
3answers
23 views

What should I do before removing a DOM element in AngularJS?

I remember hearing about needing to destroy the scope on an element before removing it from the DOM. But I'm not exactly sure how that is done. So, it just so happens that I have a directive that ...
0
votes
1answer
35 views

AngularJS Controllers

Recently faced angularjs controller behaviour. Someone accidently from team did structured DOM like this : - <div ng-controller="firstController"> <div ng-controller="secondController"> ...
2
votes
3answers
58 views

Can't save http result to scope

I have a json-file defined and I am trying to load in one of my controllers. I am using a factory to fetch the data: .factory('myService', function($http) { var all_data = []; return { ...
0
votes
2answers
24 views

Access Angular2 app through window loses scope of “this”

I have an Angular2 app that I have exposed certain methods to code running outside of ng2. The problem is that this is not the same when called outside of ng2 vs inside. https://plnkr.co/edit/...
1
vote
1answer
33 views

How to Pass the Angular Variable to Another Angular Google Chart Function(Angular Directive)

Can someone help me in approach for passing Angular Variable to Google Chart Function which is present in the same Java Script with Angular Directive And Also I wanted to load Google Charts to load ...
0
votes
1answer
30 views

IONIC APP- [$injector:unpr] Unknown provider:

I'm getting this error and have been looking for it on the google but still couldn't solve this issue. ionic.bundle.js:26799 Error: [$injector:unpr] Unknown provider: $cordovaCameraProvider <- $...
0
votes
0answers
17 views

Unwrapping Restangular service promise / view not getting updated

I'm trying to unwrap a promise so that my view gets updated when I click a submit button. In the controller, I first call getProfileDetails() that returns an object of details. Here is the controller: ...
0
votes
0answers
24 views

Table displaying count of data with conditions AngluarJS

I am trying to create a table like below: Number of days Count Over 3 days 3 Over 20 days 4 Over 30 days 5 So I get back a total count of things open over 3 days etc. Problem 1: ...
0
votes
1answer
38 views

How to change all directive scope value from any one of directive?

I have a directive which was repeatedly n times. I have click event action in every directive. Whenever I click, on click function, It change some scope variable names which defined in directive. But ...
0
votes
1answer
48 views

angularjs submit button not working

I'm validating & submitting a simple form using angularjs, the form seems to do some initial validation but the submit button does not log or executes the angular function defined to it. What am I ...
0
votes
1answer
46 views

Not seeing scope in directive

I have a controller that passes two variables to my view via $scope. I can display those variables in the view. In my view I have a directive, where I pass in the two variables to the directive scope....
-2
votes
0answers
21 views

aangularjs scope binding shows “?” string after bind

angularjs cordova other language charecter shows '?'(the charecter changes while binding at $scope) please helpenter image description here
1
vote
2answers
29 views

How to get second value variable in an array from dropdown selection in controller?

I'm looking to get the variable of the second value in an array list that a user selects via dropdown in my controller to do some math functions. $scope.dropdown = [ {name:'Name', value:'123'}] So ...
0
votes
1answer
16 views

$Scope.$Apply() returns a circular error after loading data into an Angular-Ui-Grid

An example: The code is triggered by this HTML: <div google-chart chart = "chartObject" style = "height:600px; width:100%;" agc-on-select="selectHandler(selectedItem)" ng-if="chartvisible"></...
0
votes
1answer
8 views

How to dynamically load temple in angularjs diretive without ng-include?

I want to dynamically load templateUrl in angularjs directive without ng-include.
0
votes
2answers
25 views

Comparing objects from two scopes to provide a value

I'll try to simplify the problem as much as I can. Let's say I have 2 scopes $scope.section1 = [ {label: 'label1'}, {label: 'label2'} ]; $scope.section2 = [ {value: 'one'}, {value: 'two} ];...
0
votes
1answer
26 views

Unable to see scope variable in angular

i am trying to use django with angular js here is the controller myHeader.js var myHeader = angular.module('myHeader', []); myHeader.controller('HeaderController' , ['$scope', function($scope){ ...
0
votes
2answers
37 views

Loose Scope in angular JS

I have a multiple tab Html page . On one tab i have add 3 input box and an add button. Whenever the add button is clicked the data to be added into a grid below. But scope is not accessing these ...
0
votes
1answer
15 views

Force update of html5 video source in angular js project

I have a project where I've embedded an html5 video on a view. I populate the source dynamically using $scope. The initial video I populate the player with works fine. At the end of the video, I ...
0
votes
1answer
20 views

How to access an isolated scope within a directive that is not using a template

When I set a controller on an element, that element and its children have access to that controller's scope. This makes sense. However, when I add a directive with an isolated scope to an element (as ...
0
votes
1answer
27 views

How The Object Scope Get That update available and get it ready to be exposed on the view AngularJs

In AngularJS the data-binding work to expose immediate data to our View !! this stuff's due of the object scope which is the glue between the Logic Code AND The View. Also all we know that AngularJs ...
0
votes
1answer
20 views

How to watch object on unknown scope parent?

I'm writing an element directive which can be used inside other directives. The structure of the parents containing the directive element is unknown. My directive needs to watch an object called '...
0
votes
2answers
20 views

How to make an angular js function to change button content more than one time

html : <p> <a class="btn btn-lg btn-success" href="#"ng-click="splendido()">{{salute}}</a></p> main.js $scope.splendido=function() { var calls=1; $scope....
-2
votes
1answer
30 views

How to stop ordering of keys when ng-repeat is used

I have a bunch of fields mapped as below, $scope.mapfields = { ABC: 'Same', CBA: 'Cent', CLSN: 'Abcde' }; And then on front end i have the below code, <div ng-repeat="(key, val) in ...
0
votes
1answer
23 views

Using Isolate scope in AngularJS

Is it possible use isolate scope for marked Controllers? I don't want that html code inner ng-controller="" looks for parent $scope values, just want if current Controller scope contains some values -...
0
votes
2answers
28 views

Unknown provider: $elementProvider <- $element <- DragListController

Here is my code. I got and error Unknown provider: $elementProvider <- $element <- DragListController. I'm still new with anuglar js angular .module('taskManager') ...
1
vote
1answer
31 views

How to connect database for this angular login code

**I have code for the login. I hard code username and password. Now I have to connect database using php. Where I have to create that GET or POST method. I need to create this get or post method ...
0
votes
5answers
71 views

Why are $scope and var variables undefined within my angular controller , as success seems to just hide values

I make a few different $http calls and I want to set either variable (var blah) or $scope to be set to an object value and persist at least down a few lines so that it can be sent to a 2nd $http ...
2
votes
0answers
23 views

Submitted form state preventing

How can I avoid submitted state (and ng-submitted class & submitted scope property as true boolean) in a form when it is submitted?
1
vote
1answer
21 views

Issue in binding service response with html component

I am using a slider component to represent my saved date ranges, I am facing the issue of the slider running before my service returns the HTTP response from backend, therefore I am facing the issue ...
-2
votes
1answer
50 views

Cannot bind to rootscope in Angular 1.5 component

I'm in the process of eliminating the "scope soup" architecture of a legacy Angular 1.5 app following this guide: http://teropa.info/blog/2015/10/18/refactoring-angular-apps-to-components.html#replace-...
0
votes
2answers
25 views

auto generate download link with angularjs

i generate my download link from this script https://github.com/joshpangell/single-use for example: download url generated like this: http://cloud.joshpangell.com/singleuse/download.php?key=...
0
votes
0answers
41 views

AngularJS - data between two controllers

I'm more or less new in AngularJS. My question is simple but I'm not sure which is the best way. Let's say I have a list of persons (name, surname, dob, ...) in a controller (array) and view (html ...
0
votes
2answers
31 views

Dynamically update directive data

Sorry, maybe it's stupid question but i'm still learning. I'm trying to make one simple line chart using D3.js in angularJS. everything working fine and in that i am using a custom directive to plot ...
-1
votes
0answers
109 views

Object not mapping correctly in the object in Angular directive

I am trying to map an array in an angular controller to the right key but I am not able to. Please look it over and see how to do it correctly. Let me explain it from the beginning. I am getting a ...
0
votes
2answers
78 views

Transferring data between non-nested components

Basically , What I desire is to transfer data b/w components. I have one angular2 component on master page for partial view of login - <loginpartial></loginpartial> This is initially ...
0
votes
5answers
51 views

$scope methods not recognized from table AngularJS

I'm binding an array through a form using ng-repeat. Here is the code. HTML: <form> <table> <tr data-ng-repeat="x in names"> <td><textarea placeholder="...
2
votes
1answer
33 views

Nested Accordion in Angularjs with same Scope variable in child

I'm using v-accordion, a nested accordion written in angularjs to display some data. Here is my HTML Markup: <v-accordion class="vAccordion--default" id="subCommodityAccordion" ...