0
votes
2answers
22 views

How to access a global scope object inside an Angular function?

In the following controller, I have defined $scope.dataSourceFactory. I initially had var dataSourceFactory = ..., (not using $scope in defining or using it later in ...
0
votes
0answers
10 views

AngularJS - ngrepeat form input elements dynamically filled with default values to post

http://jsfiddle.net/9sCnC/12/# I'm going through a json file and parsing it through ng-repeat, a button on each item opening a modal window. In this window a form is generated with data I would like ...
0
votes
1answer
12 views

AngularJS transclude but keep the directive's scope

Is possible to do this in Angular? If <div ng-controller="MainCtrl" ng-init="name='World'"> <test name="Matei">Hello {{name}}!</test> // I expect "Hello Matei" <test ...
0
votes
0answers
12 views

angularjs data inconsistency

I am trying to use a value from a parent scope in a directive but it looks like I'm dealing in quantum physics territory: If I look at the content I want from the scope it seems to vanish ...
0
votes
2answers
15 views

Scope not shared across directives

I have 2 directives on the same tag, <settings> and <modal>. settings provides a template, while modal creates an isolated scope: jsfiddle var app = angular.module('app', []); ...
2
votes
3answers
42 views

Why is using if(!$scope.$$phase) $scope.$apply() an anti-pattern?

Sometimes I need to use $scope.$apply in my code and sometimes it throws a "digest already in progress" error. So I started to find a way around this and found this question: Prevent error $digest ...
1
vote
1answer
20 views

AngularJS: Objects inside nested directives getting undefined?

So, I have two directives, one that has a template file, which contains another directive of the same type. The first directive looks like: .directive('billInfo', function () { return { ...
0
votes
2answers
19 views

AngularJS which scope does an ng-model point to?

Still training myself to think In angularian... I think that it would it be correct if I think of the ng-model attribute as a reference to some data element in some parent scope... [would it?] I am ...
0
votes
2answers
20 views

Angular directive doesn't work for elements added to the DOM by jquery plugin

I'm creating a fall back image directive that looks like this http://plnkr.co/edit/wxy4Sp2K02iXoQNsvkah angular.module('directives').directive('myDirective', function() { return { restrict: ...
0
votes
2answers
23 views

AnuglarJS - Parsing multiple .then in controller from factory data

I have a controller calling to any set of specified methods in a factory to retrieve information on a given date. Some of the methods iterate through a JSON file to return promise. See factory below ...
0
votes
0answers
20 views

AngularJS custom directives not working when using ng-include “Object #<Scope> has no method”

So I decided after much debate, to split my webpage into two parts, one for ie7 and another for ie8+. I have many <!-- if lte ie7---> scattered around, and I just want to separate the html ...
2
votes
1answer
28 views

Accessing $rootscope from a Google Map callback

I am having much difficulty accessing the $rootscope of my Angular app from within a 'load' callback for GoogleMap API. my index.html looks like this: <html> <body ng-app="myApp"> .... ...
0
votes
0answers
16 views

detect which directive calling a method in the controller

is there any way to detect which directive calling a function in the controller without passing any arguments from the directive itself. simple example to demonstrate what i need: controller: ...
0
votes
1answer
27 views

How to find a watch in scope.$$watchers

I'm using angularjs and need to find the watch of the ng-repeat, because I need ng-repeat to stop working from a specific point. this my code: <ul> <li ng-repeat="item in items"> ...
0
votes
0answers
36 views

Angularjs app scope variable not available to the view

In my angularjs code below why is the IsLoggedIn and Username not available to the view. Not sure what's wrong, any help will be highly appreciated: 'use strict'; ...
0
votes
1answer
8 views

Angularjs Bind variables into external css file

i'm trying to figure out how to bind angularjs scope vars into external css file the problem i think is the curly braces here is what i'm basically trying to do: .css_class {background:{{ ...
0
votes
1answer
27 views

AngularJS Directive Nested Models

I have the following code <my-template title="Client Profile"> <my-section name="personalInfo" title="Personal Informations"> <p>Please enter your personal ...
1
vote
1answer
27 views

$emit from child controller works, but $broadcast from parent scope doesn't

When I call $scope.$broadcast none of the events my children are listening to are getting triggered. A simplified example is below: HTML Below is a simplified example of what I'm trying to ...
0
votes
1answer
23 views

$Scope in a nested Accoridon

I am using UI-Bootstrap with AngularJS and there is this simple Accordion Menu. I tryed to nest them. This works so far, but I can't get the scope of the nested. ng-click also won't work, guess ...
2
votes
1answer
25 views

Scope refuses to update

for some reason unknown to me, I can't get the controller scope to update the view, even though apply is running and the scope itself has been updated. I know that because when I console.log(data) I ...
0
votes
1answer
30 views

Directives, Isolated scopes, Inheritance

I totally confused by these topics and really need a hand to survive. Huge thanks in advance. <xxx:layout style="height: 100px; width: 100%" xxx-horizontal> <xxx:layout style="width: ...
0
votes
1answer
29 views

How can I download a file instead of opening it in the browser (Firefox)?

I am working with AngularJS. I want to list the files as <a> tag in a page. When I click it, the corresponding file should be downloaded. I am trying withe following code, <div ...
1
vote
1answer
22 views

How to call function in ng-click which is defined in factory service

How can I call the function in ng-click which is defined inside a factory service, app.factory('MyFactory', [function () { return { setTest: function(test) { alert(test); ...
-1
votes
1answer
15 views

what is the difference of having ['$scope' next to function($scope) to doesn't have ['$scope'

Can you help me explaining this to me? Please i can't figure out of whats the difference of this code: var myApp = angular.module('myApp', []); myApp.controller('GreetingCtrl', function($scope) { ...
1
vote
1answer
17 views

AngularJS access scope parameterized values

I have a form with parameterized names like <div id="form-group"> <label>City</label> <input class="form-control" id="localityGoogle" disabled="true" ...
0
votes
3answers
28 views

How do you propagate scope values from directives to the controller?

I have a complex data structure that requires lots of inline editing. To make the code easier, much of the breaking down of components over this data structure has been placed into nested directives. ...
1
vote
1answer
32 views

Directives with Isolated scope versions conflict

In my Angular app, i have a directive "editable". It written on Angular version 1.2.0-rc.2 and worked well, but when I upgraded framework to version 1.2.13 - directive broke. I checked capability with ...
0
votes
1answer
37 views

Angular JS custom table directive

In the project I am working on I have a lot of serial true/false data that needs to be displayed in different ways. I have been working on a directive that will allow me to pass in the model, the ...
0
votes
3answers
40 views

AngularJS: access directive data from controller

Lets assume I have a AngularJS directive looking like this: app.directive('psDIR', [ function() { return { template: "<div style='padding: 5px; border: 1px solid red; ...
0
votes
1answer
15 views

Angular using callbacks vs using broadcast/emit/on paradigm

My question is regarding best practices between using a more direct callback structure vs. event broadcasting and listening. I had not been using the broadcast/emit and on event propagation ...
0
votes
1answer
21 views

Directive's isolated scope variables are undefined if it is wrapped in a directive which has in its template ng-if and tranclusion enabled

I am facing is an issue which is demonstrated in the following example: http://jsfiddle.net/nanmark/xM92P/ <div ng-controller="DemoCtrl"> Hello, {{name}}! <div ...
2
votes
2answers
61 views

Angularjs directive with isolated scope needs clarification

Edit: There is a functional example in this plunker: http://plnkr.co/edit/GFQGP0q3o9RjLAlRANPS?p=preview Outer scope has $scope.name = 'Donald' All directives are declared as: <directive-name ...
0
votes
2answers
74 views

Should I load 10,000 rows into memory in my Angular app?

I'm building a customer management tool in Angular.js to load 10,000 customers right into the $scope. From there I can search up and manipulate any of the data without having to make calls to the ...
0
votes
1answer
17 views

How can I read List of objects in angularjs

How can I read below result in angularjs in controller.js { "placeList":[ [ { "address":null, "name":"Len The Plumber" }, { ...
0
votes
0answers
21 views

Why control is not reaching service.js from controller and not inseting in database using angularjs and spring

Here is the scenario, I have a company domain object and I am trying to insert company in company table using angularjs and spring. values are printing correctly in all alerts in controller.js but its ...
2
votes
1answer
66 views

Inspecting AngularJS scopes using the Batarang Chrome extension

I have an question about AngularJs scopes and especially the way those can be inspected with the Batarang Chrome extension. I have the following html: <!doctype html> <html lang="en" ...
0
votes
1answer
19 views

Angularjs app logic structure help required

I've recently started with Angular and would really appreciate some help on how to properly structure my code the angular way. This is more of a meta question rather then technical question. I have ...
0
votes
1answer
18 views

AngularJs decoupling page segments' nav links but maintaining one navigation system

I have a side menu directive that populates itself from a Sidebar Controller but the routing for all click events on the entire website comes from the page's parent Route Controller. The Container ...
0
votes
1answer
29 views

Basic issue with AngularJS directive not working

I have the following html: <!doctype html> <html lang="en" ng-app="myApp"> <head> <meta charset="utf-8"> <title>My AngularJS App</title> <link ...
0
votes
0answers
42 views

How can I download a file using AngularJS?

I want to list all the files(from a directory) in the view. When I click anyone of them. Then the corresponding file must be downloaded. Note: I am working in a windows machine. I have the following ...
0
votes
1answer
18 views

Creating Angular objects on the parent scope from a directive

I'm building a simple form in Angular that allows the user to add or remove fields as they please. I've modeled this system off of an array of objects. When you begin the array is empty. When a row is ...
0
votes
1answer
20 views

AngularJS - mechanics of $scope.$watch - is it just an observer pattern?

I have some factory: .factory("someFactory", function() { var someFactory = {}; someFactory.objects = [ { name: "obj1" }, { name: "obj2" } ]; return someFactory; } And some ...
0
votes
0answers
15 views

AngularJsS slideUp event in a directive

i have a directive which i want to slide up/down when clicked. i've used this directive for the slide animation : //create a directive to toggle an element with a slide effect. ...
0
votes
2answers
41 views

AngularJS - Can't access retrieved JSON data in the view

I just spent the last hour searching and reading a bunch of similar stackoverflow pages and was unable to find a solution. I'll try to be as descriptive as possible, but please let me know if I need ...
0
votes
1answer
23 views

angularjs using angular.extend to bind $scope to a service bad/good practice

I'd like to know if using angular.extend($scope,MyService); Does it break oop encapsulation principle ? Does it smell like MyService.call($scope) ? Could you face variable and function conflicts ...
0
votes
1answer
19 views

Converting Date to String in dhtmlxScheduler and AngularJS

I am using dhtmlxScheduler with AngularJS, and I'm looking for a way to convert a Date object to a string. I am only concerned with converting the start date, and not the end date in the following ...
2
votes
1answer
21 views

Can't put ng-controller on directive?

I have a very simple angular example at http://jsfiddle.net/7eL47/3/. The rendered output of the code shows "Foobar" on the page. The template for this rendered output is: <div ng-app="myApp" ...
1
vote
2answers
26 views

Render Two charts separate charts using angular js directives

I am trying to render two seperate charts using seperate directives for each charts, since the data is different ( also I am no expert in AngualrJs ). But only one chart was rendering to view. Please ...
0
votes
2answers
27 views

Angular.js $watch - a string will propagate successfully but a variable won't

I have the following view in my code: <div data-ng-controller="HelloCtrl"> {{counties.selected}} </div> This piece of code will update the html successfully (when ...
0
votes
2answers
89 views

How to pass a query param from controller to service in angularjs?

I have a form, where in i submit a text using ng-click, now it calls a rest service and insert into the DB - working fine. at the same time, in same function, it calls another rest service but nothing ...

15 30 50 per page