2
votes
2answers
23 views

Can an angular directive pass arguments to functions in expressions specified in the directive's attributes?

I have a form directive that uses a specified callback attribute with an isolate scope: scope: { callback: '&' } It sits inside an ng-repeat so the expression I pass in includes the id of the ...
0
votes
0answers
23 views

How to get the rendered html by AngularJS?

how to get the html rendered inside a div, after it is rendered and put it inside the scope of controller ? I am new to angular and though i know the basics of directives i cant seem to get the ...
0
votes
1answer
24 views

Angularjs Directive - Isolated scope value is undefined

I am a newbie in angularjs. I am little confused about isolated scope in directives. I have the following code, HTML <!doctype html> <html ng-app="myApp"> <body ...
1
vote
1answer
20 views

in angularjs, how do you get a `select` to refresh when the array for ng-options changes?

have an select based on any array. the elements in the array may change. how do I get the angular controller to refresh the array? module.js var langMod = angular.module('langMod', []); ...
0
votes
1answer
20 views

What is event.preventDefault preventing despite the event?

One goal of my main controller is to prevent users from going to urls of other users. That works perfectly fine with listening on $locationChangeStart and using its events preventDefault method. ...
0
votes
0answers
4 views

$httpBackend prevents normal angular routing; how do I configure $httpBackend to allow normal routing behavior?

I need to load up $httpBackend in order to mock out $http server calls (which return JSON). I've defined my own mocks, but when I load up my angular app with $httpBackend and my own mocks, I get an ...
1
vote
1answer
31 views

in angularjs, options for select in different controller - how to refresh?

have two different controllers, one for language, langCntl, and one for words, wordCntl. in the wordCntl record there is an attribute called ln. ln is displayed in the form using ng-select, with ...
0
votes
1answer
20 views

Angularjs directive clicking elements

Hi I was wondering when I have a list of elements from a ng-repeat, how I can allow the user to click one of the list and make it highlight via .css(). Then if the user clicks another element, the ...
1
vote
2answers
48 views

Angularjs isolates scope directive with ng-repeat

I'm trying to use directive on ng-repeat items each with an isolate scope but it isn't working. I'm looping through each item and coloring it red with the inboxuser-select directive. However, when I ...
1
vote
1answer
33 views

How can I find where an AngularJS scope visible in Batarang came from?

I am looking at my angular app in Batarang and one of the scopes has some values that I don't recognize. How can I find out what created that scope? I've already tried searching the DOM for the class ...
0
votes
1answer
21 views

Need help getting Scope Values for X,Y Coordinates from an AngularJS Directive for GAE Image Crop Tool

Trying to build a photo cropping interface tool for GAE with AngularJS. GAE accepts data in this form, crop(left_x, top_y, right_x, bottom_y) ...
0
votes
1answer
30 views

Calling Javascript within ng-if

I have some legacy jQuery code. It's a big chunk of code, so I would prefer to port it a little while later. To use it, I call $('#legacyId').legacyFunction(). Here's the deal, though. I have an ...
0
votes
1answer
107 views
+100

Laravel 4 and Angular JS and Twitter Bootstrap 3 Pagination

Edit: I need a pagination in my Laravel 4 - Angular JS application which is structured using twitter bootstrap 3. You may suggest the angularui-bootstrap pagination. But I am not planning to use this ...
0
votes
1answer
18 views

Custom directive`s scope doesn't pass to child directive

Sorry if I duplicate existing post, but I search SO on the subject and couldn't find description for my case. I got a custom directive (carousel) that contain inner directives (slides) Carousel ...
0
votes
0answers
28 views

Angular: Updating directive during request

I'm trying to make a loading bar, almost similar to the one on Google +. When an action is running, I would like my progress bar to update itself, but it only updates at the start of the request and ...
0
votes
3answers
43 views

How to bind directive model to async service data

I'm trying to do simple thing - bind directive's model to service's data. And all right before service's data loads async (by $timeout or $http request), it simply does not update directive's model. ...
1
vote
1answer
28 views

Angularjs controller syntax

I am new in Angularjs javascript. Tell me what is difference between below code:- app.controller("firstController", ['$scope', '$modal', '$log', 'HttpService', 'FisrtSharedService', ...
0
votes
1answer
25 views

Angular assigns value “two way”, bug?

In my html head I have an array. This is because I render it with a Django template and it's convenient. <script type="text/javascript"> foo = ["Python", "Marketing", "Start-ups", "business"] ...
0
votes
1answer
20 views

Updating parent.parent scope

I have a problem. I'm iterating array ngRepeat = a in arrA and in this iteration I have nested ngRepeat b in arrB. And on selecting b a have to update a with data from a. Is there proper way to do ...
0
votes
2answers
50 views

Data binding doesn't work in a specific case (AngularJS)

Here is my problem : When I click on the button after having modified my model "urlservicerest", my property "$scope.urlservicerest" stays initialized to "hello". I tried to update data with ...
0
votes
0answers
37 views

Creating dynamic scope variables

I am trying to create dynamic scope variable. Here is the json object: { "status": true, "res": { "call": [ { "percent": 100, "name": "150+" } ], ...
0
votes
1answer
20 views

order item in ngrepeat follow property of item

How can I order the post to top-down structure (the post which has highest likes number will be first and the last is the post which lowest likes number). To do that I set oderBy:likes.length but it ...
0
votes
1answer
22 views

Directive: I bound isolate scope (“=”) to template ngModel, but input won't update on controller

What I'm trying to do is put the isolate scope 'pointers' directly onto the ngModel within the template. What I expected was for the scope variables to update automatically on the parent controller. ...
0
votes
2answers
41 views

AngularJS Data service vs $rootScope events

Can you please explain the use use of data services vs the use of $rootScope events. I have a list of say branches which provides edit functionality. On click of edit button I am broadcasting an ...
0
votes
2answers
82 views

AngularJS Directive using Compile cannot access child elements

My intent was to create a directive that could rearrange (not reorder) its child elements into a Bootstrap CSS Grid, but I am having a lot of difficulty getting access to the child elements. I've ...
0
votes
1answer
24 views

angularJS: Why does binding to scope inside a directive result in lost content of ng-repeat?

I have this fairly simple HTML structure: <div ng-controller="MyCtrl"> <div dir1="xy"><div>dir1static</div><div ng-repeat="item in ...
0
votes
1answer
57 views

How do you submit a form in AngularJS?

I have a simple form, you select a color and input a quantity. When you click the submit button, I want to replace index.html partial with the submitted.html partial and work with the information ...
0
votes
1answer
23 views

AngularJS: how to know when the $compile has finished?

http://plnkr.co/edit/GRVZl35D1cuWz1kzXZfF?p=preview In the custom fancybox (aka lightbox, a dialog) I show contents with interpolated values. in the service, in the "open" fancybox method, i do ...
2
votes
2answers
69 views

Handling data response from $resource in angular js

I have a RESTful application with Laravel 4 and Angular JS. In my Laravel Controller, public function index() { $careers = Career::paginate( $limit = 10 ); return Response::json(array( ...
0
votes
1answer
36 views

Angularjs query does not work

Hello friends my english is poor. i'm sorry How to use it ng-click="bak = {{maclar.macid}}" <div><span ng-class="{class:bak == true}" ng-click="bak = {{maclar.macid}}" ...
0
votes
1answer
33 views

Outer AngularJS directive doesn't build inner directive correctly

Using AngularJS 1.0.8, I'm trying to create some reusable directives to create a situation where a web developer can code a single "top-level" directive with a number of attributes, and this ...
1
vote
2answers
42 views

In AngularJs, how do I identify a specific scope within a controller that is used multiple times on a page?

I have an application that uses multiple tabs with a grid in each tab. I have multiple pages using this same configuration. I have a single controller that works for all grids. I would like to ...
0
votes
0answers
49 views

Setting Model in AngularJS Control Not Updating View (something…)

I am experiencing issues with updating values in my AngularJS controller and having them properly reflecting in my model. I have the following form in my view: <form name="formSignIn" ...
0
votes
1answer
34 views

Accessing scope within directive

I have a controller which is charge of getting event json data and if there is data, update the dom with data, else update dom with error message: //Controller.js myApp.controller('EventsCtrl', ...
1
vote
3answers
43 views

Angular ng-repeat not loading

I have had this working in the past, I have moved the site about on localhost and now I can't seem to get ng-repeat to display results. Any ideas? App: var app = angular.module('Search', ...
5
votes
1answer
49 views

AngularJS: How to correctly work with Directives, Scopes and Bindings to avoid memory leaks?

I'm trying to find a solution for an AngularJS app memory leak. Because I'm new to the AngularJS world I don't really know where to start and where to correct and optimize my code. I'm trying to give ...
0
votes
1answer
50 views

Angular.js compiled directive template to string in controller - better way?

I'm using the Angular Leaflet Directive and want to dynamically populate the pop up content. To populate the content, you can assign an html string to a property called "messages". Example shown ...
0
votes
0answers
36 views

Nested directives - cannot pass args to controller method from child directive in Angularjs

I'm having some trouble with nested directives in angularjs. I want to call a controller method from a directive within another directive and am trying to pass arguments to it, however they are ...
0
votes
2answers
50 views

How to apply AngularJS Directive to an element after a nested ng-repeat is finished

The html looks like: <div ng-controller="MainCtrl"> <outer> <inner ng-repeat="d in data"> <div>{{d}}</div> </inner> </outer> ...
0
votes
1answer
30 views

Why is my $watch not getting called?

I just don't understand why my $watch is NOT called a second time with the updated value of "entity". .directive('myParent', function() { return { controller: function($scope, $log) { ...
0
votes
1answer
28 views

Loading angularjs controller dynamically

I have a form and on button click partial cshtml is loaded dynamically.I want to add Angularjs validations for the dynamic content but the dynamic content is loaded out of angular scope and none of ...
0
votes
1answer
26 views

AngularJS set up binding without an isolate scope

Is this the way to achieve read-only binding to an object attached in a parent directive's scope? I really need the child directive to receive change notifications if the parent changes it's ...
0
votes
0answers
29 views

what are $$hashkey objects in Angularjs? How can I read multiple file inputs?

I am trying to get multiple file attachments from file inputs using the following directive: var app = angular.module('app',['ui.bootstrap']).config(function($interpolateProvider){ ...
0
votes
1answer
25 views

AngularJS data binding redrawing inside ng-repeat

If i had a scope like this one $scope.array = [ { a: 1, b: 2 }, { a: 2, b: 1 }]; With a view: <div>A: <div ng-repeat="obj in array">{{obj.a}}</div> </div> Having in ...
0
votes
3answers
57 views

Reacting on angular events in a directive without injecting $rootScope

I wonder if you have an example of a directive code that reacts on angular events like $routeChangeError without injecting $rootScope in to it (to use $on in link function). It breaks in my opinion ...
0
votes
1answer
40 views

Angular update scope from event

I have an angular service which manages Authentication to the app. And a controller. service fires an even on $rootScope when the user logs in and logs out. I want to update the DOM element in my ...
0
votes
1answer
23 views

width within a directive not changing in IE

My directive works perfectly in chrome but not in IE8: app.directive('barMax', function ($compile) { return { restrict: 'E', scope: { current: '=', max: ...
9
votes
3answers
3k views

Call an AngularJS Controller Function from a directive without isolated scope

I cannot seem to find a way to call a function on the parent scope from within a directive without using isolated scope. I know that if I use isolated scope I can just use "&" in the isolated to ...
1
vote
1answer
180 views

When does AngularJS propagate model changes to the DOM?

In AngularJS, you can watch for model changes using $watch. So, if I write something like: $scope.$watch('model', function (newValue, oldValue) { // React to the change... }); ...then I can be ...
2
votes
1answer
304 views

AngularJs - Directive events and dom rendering

In the code below, I am trying to use a template (with {{ value }} substitution) but I have been trying for two days to find a way of getting to the rendered code to set some properties on it. I ...

15 30 50 per page