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
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', []); ...
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
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
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 ...
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
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 ...
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); ...
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
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
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
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. ...
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
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 ...
0
votes
0answers
37 views

Using object in multiple nested angularjs directives

I have a list of person objects. I have a directive for displaying some read only data about the person and nested inside it a directive that acts as the toolbar for actions on the person (delete, ...
0
votes
1answer
22 views

how to load json data from url in angularjs

I'm trying to create graph in angularjs. it's working fine but i don't know, how can i bind data from json url in shipmenttracking variable. please help me. myApp.controller('AppCtrl', ['$scope', ...
0
votes
1answer
17 views

Set “states” variable cause Error: $rootScope:inprog Action Already In Progress

I have a select that depends of another select so I'm trying to listen for change event in first select and then populate the second one with values coming from JSON array obtained in server side. ...
0
votes
1answer
36 views

AngularJS directive for dependant select element

I'm trying to write a directive for dependant select elements. The relationship is Country > States > Cities. When element with class country get changed I should update element with class ...
0
votes
1answer
43 views

How can I download the files using AngularJS?

I want to list all the files in <a></a> when clicking it we need to download it from the corresponding folder. I tried the following code <div ng-repeat="file in files"> <a ...
0
votes
2answers
18 views

Form data always going null for text field in angular js and rest service spring

I am new to AngularJS and not sure where I am missing, though I know its a minor mistake which I am committing. Please help me out with below scenario. I have a form where in I write a post ...
1
vote
4answers
191 views

Passing local variable to directive in AngularJs

I have a controller that feed a repeater with an array: demo.controller('MyCntl', function ($scope, $compile) { $scope.items = [ { name: 'Diego' }, { name: 'Darko' } ]; ...
0
votes
0answers
49 views

Accessing parent scope/controller from same-directive

Nutshell: <layout direction="horizontal"> <!--ParentX --> <layout>ChildA</layout> <layout>ChildB</layout> <layout direction="vertical"> ...
0
votes
1answer
30 views

How do I execute the $watch callback before ng-repeat filter kicks in?

I have a ng-repeat that loops through an array of resource objects with a filter, much like this. <div ng-repeat='item in items | filter: { hidden: false}'> <div my-custom-directive ...
1
vote
1answer
30 views

Angularjs select in directive not showing label

I have tried and I can't get what is wrong with my directive. I want to encapsulate the select tag in a directive. It seems to work correctly, with one issue: the label in the select statement is not ...
0
votes
2answers
50 views

Angularjs - Directive controller loading faster than app controller - value undefined

I have a controller that makes an xhr request to retrieve some data.. $scope.mbProductImages = []; $http.get('product.json').success(function(data) { $scope.productDetails = data; ...
-1
votes
0answers
11 views

save login info to rootscope before app loads

My app needs login information returned from server before loading the appropriate templates for my app. I was thinking of saving the login info in the $rootscope so whenever the user is navigating ...
0
votes
1answer
26 views

AngularJS viewContentLoaded not executing on page refresh and initial load while using directive

I am experiencing some inconsistencies when using a custom directive and relying on the viewContentLoaded event to run... Below is a "bare-bones" version of the problem: var myApp = ...
0
votes
1answer
91 views

Multiple directives [x, y] asking for isolated scope

I have 2 directives on an element. Each works independently of each other. I am aware of the 1 scope per element restriction. I don't understand why this violates it. Directive X (priority 100) takes ...
0
votes
1answer
33 views

How can I disable the already selected value from the dropdown using AngularJS?

I want to disable the already selected value from the dropdown using ng-options AngularJS. <select name="fruit" ng-model="selectedFruits" ng-options="fruit as fruit.name for fruit in ...
0
votes
0answers
33 views

Why items are not rendered?

I have this function in my controller: // Get countries $http.get(Routing.generate('countries')).success(function(data) { if (data.message) { $scope.message = data.message; } else { ...
0
votes
1answer
20 views

Angularjs - Passing attribute value from one directive to transcluded one

I have a situation where I have to create a container directive with some bells and whistles.. and then I have a list of directives that can be wrapped into that container directive. Something like ...
0
votes
3answers
33 views

Accessing My Service Inside a Directive

I cannot figure out how to access my test service from inside a directive. when I try to alert my data I get an "undefined" error for that property. My test service: app.service('MyData', ...
2
votes
4answers
44 views

Function callback in directive with original binding

Passing in a function to be called back on init to a directive, this function is noted by a string attribute which is then parsed and used. The issue is when used, the function binding is no longer ...
0
votes
1answer
38 views

How to call two services from one provider factory?

Hi I am trying to post a discussion and then I want users to comment on it. for this I have exposed two rest services and below is the code where I have defined them. Posting is working fine, but when ...

15 30 50 per page