1
vote
1answer
21 views

angular js: programmatically instantiate a scope?

Simple case: Ask a controller $scope to create a child scope. This new scope would be applied to a $compile's linking function -- i.e. programmatic directive instantiation. My need falls just ...
1
vote
2answers
25 views

Where to place angular element so it can effected all scopes

I have this code which is a contenteditable placeholder by CraigStuntz. My question is where should I put this code so all the div which contain contenteditable will get effected. I tried to put ...
0
votes
0answers
20 views

Angular dynamcly setting the user's language

I have a service that fetches the Userinfo which contains his or hers preferred language and I want to use it in my controller to change the language of my application when the user loggs in, however ...
0
votes
1answer
21 views

Changed value on AngularJS Service not triggering watch within directive

I'm having an issue getting a watch to work within a directive. I've put together a simple example here. http://plnkr.co/edit/A7zbrsh8gJhdpM30ZH2P I have a service and two directives. One directive ...
0
votes
2answers
33 views

Cant able to access my selector in angular js mouseover event

I cant able to access the li element inside the div . I added mouseover event to li but it binds to its parent div only. HTML: <div> <ul class="rating"> <li ...
0
votes
1answer
12 views

disable jquery-ui drag drop with angularjs, to copy html in scope

my problem is, i have a tree element in scope. with : angular.copy() i copy the tree element which i use in a dialog. the functionality of both are different(one has ng-click, the other not and so ...
1
vote
1answer
35 views

meaning of underscores on injectables in angular

I've been writing tests for some Angular components, using a syntax that I found on google a while ago: describe('Directive: myDir', function () { beforeEach(module('myApp')); ...
0
votes
0answers
15 views

Create the duplicate select drop down on button click

I had the span with select drop down in view like this: <div class="modal-body"> <span><button class="btn btn-primary" ng-click="showAttributes=true;addAttributes()">Add ...
0
votes
1answer
44 views

How do I connect between parent $scope, directive $scope and a modal $scope?

I'm trying to create a directive for a label selector. <label-selector label="label1">label1</label-selector> label1 is the default label that should be selected, this value comes from ...
0
votes
3answers
63 views

Multiple AngularJS directives with different scopes

Hi I have a two popup directives on the same page. The problem is when I click on one they both pop up. How can I isolate each scope from each other so only the popup that's clicked pops up? HTML ...
1
vote
2answers
15 views

Initializing @attr in Angular directive

I have a directive like this: you can see the equivalent plunker here http://plnkr.co/edit/0e2nMyatAMD3M3QTCtls app.directive('bpTest', function() { return { restrict: 'A', templateUrl: ...
0
votes
0answers
22 views

How to trigger routeUpdate without changing the value of params in $location.search

In my application I use routeUpdate to check if the $location.search string has changed and navigate accordingly in my view. Like so. $scope.$on('$routeUpdate', function(next, current) { ...
2
votes
1answer
32 views

Angular: local scope property defined with '@' is not accessible from link function

While I was trying to define some local scope property I found that properties defined with '@' is not accessible directly in the link function while it's not the case for those defined with '=' or ...
1
vote
2answers
37 views

Angular.js - Passing $scope into jQuery function

I'm using jQuery File Uploader through Angular.js. I need to pass the server's response from the image upload to the Angular $scope, but I can't access the $scope within the done function: ...
0
votes
1answer
21 views

AngularJs- creating array with ng-model when checkbox selection

I am new to angularjs and want to create the model array when i click the checkbox and below is my code.. $scope.selectedAlbumSongs = [{ 'name': 'song1', 'url': 'http://test/song1.mp3' }, ...
0
votes
3answers
44 views

Manually trigger Angular data binding for an input field (for unit testing purposes only)

I'm writing some tests for an Angular directive and I need to simulate user input into an input field. I tried to do this: element.find('input').val('some value').trigger('input'); but it didn't ...
1
vote
2answers
40 views

AngularJS partials with URLs in directives - best practice?

I quite like how angular-ui has created ui-routes, which provides named routes (among other things). Though likely a simple directive to write—a wrapper for ui-view—I am not sure if it is best ...
0
votes
1answer
55 views

What am I doing wrong with AngularJS?

I recently discovered angularJS and have been trying to learn it, so I copied the simple todo tutorial into a yeoman generator angular app which happened to work just fine. However when I tried to ...
0
votes
1answer
55 views

AngularJS binding jQuery qTip2 plugin

I am trying to figure out how to bind the content of a tooltip with angular. I have a directive that looks like this: script.js var myApp = angular.module('myApp', []); ...
0
votes
1answer
35 views

Can I make the transcluded scope of a directive be the same as the parents?

Say I have some html in angular : <input type='text' ng-model='stuff' /> {{stuff}} <button class="primary" ng-click='dothestuff()'>Do the stuff</button> With the following in ...
0
votes
1answer
47 views

Problems parsing a JSON response using AngularJS

I am new using AngularJS and I am having an issue parsing a json response. This is the HTML code I am using: <!DOCTYPE html> <html ng-app> <head> <script ...
0
votes
1answer
36 views

How can I get directives to work when placed inside of dynamically loaded content?

I have created a directive that works fine when placed on my main homepage. However, if I try to use the directive on content that is loaded via ajax, then it doesn't work. Why? Consider this ...
1
vote
1answer
24 views

Communicating events from a service to a controller in Angular

I have an audio element in my service that has a "ended" event listener. I'm trying to communicate that message to an angular controller. Currently I have this in my service: Audio.addEventListener ...
1
vote
1answer
25 views

Angular js two way data binding issue to manage “text box” to “label” change

I am using data model having "edit" field. And based on "edit" value i either use text box or label. I want that once user click "ok" after edit then text box should change to label. However somehow ...
0
votes
1answer
34 views

How do I run custom js function when angular js finished retrieving data from the server (and updating the dom)?

I have the following code in the controller: ViewCtrl.resolve = { /** * Fetching a user model from the backend to make it available to this controller. */ user: ['$http', ...
0
votes
2answers
36 views

Angularjs first attempt at dependency injection

I have a UserAddController and I want to be able to access a list of countries returned by a Web API. The Web API returns data fine. Here is my app.js where I get the data : app.factory('Country', ...
1
vote
1answer
22 views

Accessing and modifying the models that are initiated in template with angular.js

Fiddle: http://jsfiddle.net/RnJbt/2/ I have a template block, where I initiate a local model, which is not really important to be included in the namespace, but is useful for the template's scope. ...
0
votes
1answer
25 views

Best (idiomatic) way to refresh data from a service in AngularJS

I am facing a "problem" with AngularJS, services and scope. It is not really a problem (I found a couple of ways to make it work), but I would like to know if I am doing the right thing, or if what ...
1
vote
2answers
25 views

AngularJS initially fill array with true, one for each in model

I want to have an array with values, one 'true' for each object in my model. As you can see in my JSFiddle - Hardcoded working, I have currently hard coded the values, and then it works, i.e. the ...
0
votes
2answers
37 views

AngularJS Wait for scope variable to evaluate from custom directive

I'm staring my way in AngularJS. I have created a custom directive: app.directive('myScroll',function(){ return { restrict: 'A', transclude: true, template: '<div ...

1 2 3 4 5 15
15 30 50 per page