0
votes
2answers
23 views

Two-way-binding in directive that is inside a template not working

I've been trying all afternoon to solve the following problem: I made up a directive that shows a search form. The model for the searchterm is defined in the controller and communicates with the ...
0
votes
2answers
14 views

Watching changed in the service from the controller

I am trying to listen to changes in my injected service (self-updating) in the controller. In the below example you'll find two $watch cases - one that works but I don't know exactly why and one that ...
0
votes
1answer
12 views

in a directive, through parent scope's function to change parents scope's value

I write a directive, I try to change parents scope's somevalue through parent scope's function. It works fine! However, when I use a jquery plugin in the directive, through the api, I add the function ...
0
votes
3answers
23 views

Self-updating service injected to the controller

In my application I want to have a self-updating data service, which is injected to the controllers: app.factory("StatsService", function() { var service; service = { data: 0, ...
0
votes
1answer
32 views

Angular “=” scope does not work with camelCase

I'm scope property of a directive It works fine when I use show as attr name. <span ng-repeat="field in fields"> <field-pill field="field" show="true"></field-pill> ...
0
votes
0answers
16 views

Use AngularJS with ASP.NET MVC 4 to detect changes

I have an existing MVC 4 application with several groups of checkboxes and I need to detect when a user has made a change, i.e. checked or unchecked a checkbox. If the user has made a change and they ...
0
votes
1answer
19 views

Unable to change Angular Select after ng-show

I've ran into this before with ng-src but I don't know how to handle it with an <select>. Pretty simple deal but after the select dropdown shows up the value can't be changed. I've tried ...
3
votes
1answer
45 views

Setting values on child scope with jquery-menu-aim

I'm working on creating a directive for jQuery-menu-aim, and my current implementation is working, but finding and setting values on the child scope feels like a hack. Plunker: ...
0
votes
1answer
28 views

AngularJS: model data from http call not available in directive

There seems to be a bug where model data fetched from an http call is present in the $scope but not in a directive. Here is the code that illustrates the problem: Jsfiddle: ...
0
votes
1answer
18 views

Modifying the parent $scope in angular

I have the following situation: view+Ctrl 1: menu, select a city. $watch the city attribute, refresh the jobs in that city from the API when it changes, and modify $scope.model.myJobs accordingly. ...
1
vote
0answers
25 views

How to give scope to nested templates in angularJS?

I want to make a tree grid in angularJS. I am creating a directive to achieve this. Each and every row contains an element and the hierarchy. So far, I created a table with tree view. But the child ...
2
votes
2answers
37 views

AngularJS ng-repeat in this model

I want to know if it is possible to use ng-repeat in a model that look like this: Example Model: $scope.items = { item1:{[1,2,3,4,5]}, item2:{[a,b,c,d,e]}, item3:{[a1,b2,c3,d4,e5]} }; The ...
1
vote
1answer
45 views

When is it appropriate to use a directive scope without its own controller?

My understanding is that the directives should be concerned mostly with DOM interaction and templating. Setting up the application logic related to the $scope is the responsibility of controllers ...
0
votes
1answer
33 views

Why is scope.apply required even though the function is called as part of event handler?

I was trying to write a directive which allows us to delete values from a list. The HTML and Javascript code are as follows HTML <body ng-app="evalModule"> <div ...
0
votes
1answer
20 views

How to separate scopes of buttons inside a reusable directive

I need to have a reusable directive with several buttons.But my problem is when I try to use the same directive multiple times the buttons binds to one single scope. For example see the code below: ...
0
votes
2answers
46 views

Data binding not working in nested directive

I am new to angular world.I am trying to create an app with reusable nested directives. Here is a link to my code. http://plnkr.co/edit/T2CNKQkLEoxjb3TGdp67?p=preview I have created two containers ...
1
vote
1answer
34 views

Confirmation dialog on ng-click - AngularJS

I am trying to setup a confirmation dialog on an ng-click using a custom angular js directive: app.directive('ngConfirmClick', [ function(){ return { priority: 1, ...
0
votes
1answer
31 views

$rootScope's databinding could not get the right value

I write a demo to show this problem, when you change the select value, curTpl will change. However, if you want to see the value of curTpl, the value don't change! ...
0
votes
1answer
35 views

Executing a scope bound function with parameters

If I have a function like this in a directive: scope: { loadChildren: "&" }, How can I call this from my controller and pass parameters? $scope.loadChildren(param1, param2); My ...
0
votes
2answers
31 views

Angular JS - Inplace Edit inside tree

I could not get inplace edit working within a tree. I forked a fiddle where inplace edit worked within a simple array of input data Here is the fiddle http://jsfiddle.net/cguy/wcMzw/8/ thanks for ...
2
votes
2answers
36 views

Issues binding / watching service variable shared between two controllers

I am having a really hard time deciphering what is going on here. I understand the basics of Angular's $digest cycle, and according to this SO post, I am doing things correctly by simply assigning a ...
0
votes
1answer
25 views

How do I add an object to a nested array in AngularJS?

I'm new to AngularJS. I've researched the theory behind ng-repeats but I cannot find any good examples of 2-way data binding or object creation for nested ng-repeats. I understand that the syntax has ...
0
votes
1answer
27 views

Calling order of link function in nested and repeated angularjs directives

I'm fairly new to Javascript programming and I have only touched upon AngularJS. In order to evaluate it I decided to write a simple note application. The model is really simple, a list of notes where ...
0
votes
2answers
30 views

How can controller talk to a directive in AngularJS?

I have a app that displays 4 flash cards, 3 of them are populated by one directive for 1 last card, I would like the value to depend on a controller Based on the view(and corresponding controller), ...
0
votes
0answers
22 views

Angular $scope unlinked from Leaflet directive

Due to issues positioning the map center and marker position in an Angular Leaflet map directive after server callback, I've implemented a $timeout function to refresh the Leaflet's map center and ...
0
votes
1answer
33 views

Binding checkbox values to respective arrays in angularjs

I have a form created at run time using angularjs. This form has 6 questions and where question 1 answers are radio buttons while rest of questions have checkbox answers. form is created as ...
1
vote
1answer
34 views

ng-select is not working along with a custom directive

I have created a plunker in order to emphasize the problem: http://plnkr.co/edit/QHUpCv?p=preview If I remove the custom attribute, or move the ng-select out of it, the companies are listed as the ...
1
vote
4answers
58 views

Scope in TypeScript/angularJS HTTP GET request

I'm new to typescript and angular.js and I'm struggling with a http get request. I'm using DefinitelyTyped for angular's type definitions. My controller code looks like this: module game.Controller ...
1
vote
1answer
99 views

AngularJS ngRepeat element removal

There are quite a few questions on how to implement item removal inside ngRepeat directive, and as I figured out, it comes down to using ngClick and triggering some remove function passing it item's ...
0
votes
1answer
24 views

How to submit form using Angularjs

I am newbie to angularJS. I want to submit a form with angularjs. I am using the following code : var app = angular.module('zippyModule', []); app.controller('Ctrl3', function($scope, $http, ...

1 2 3 4 5 17
15 30 50 per page