2
votes
1answer
27 views

How to search a JSON with AngularJS?

This is my working Pagination: http://plnkr.co/edit/WmC6zjD5srtYHKopLm7m Here is a summary of my code: var app = angular.module('hCms', []); app.controller('samplecontoller', function ($scope, ...
0
votes
4answers
31 views

Angular.js Select option without using ng-option directive

I get an json oject from a service, and I use some of it's fields to populate my select option list. When I try to print the selected value in my controller, output response is "undefined". Where ...
0
votes
2answers
30 views

AngularJS - ng-click in shell page

I have an Angular JS app in which the header and footer are part of index.html, and the views are loaded dynamically between. I have a signOut() function on the scope in my controllers that makes the ...
0
votes
0answers
27 views

Binding a resource and a js object angularjs

I have a navigation menu that I am building based off of a json object coming from an $resource. Sometimes I need to append to this list with new menu items from another $resource. I want to bind the ...
0
votes
0answers
33 views

Angular.js select option value in controller

I receive this json from a service after client call. JSON [ { "Accreditment" : { "Id" : "1", "Creator" : "John Smith", "IdCreator" : "1", "CreationDate" : ...
-1
votes
0answers
35 views

Angular custom element renders incorrect attribute value

This is my first Angular project. I am trying to create a custom element using "Angular JS". I create a <div> using a template and assign attributes for <div> using scope. The problem: I ...
0
votes
1answer
22 views

$injector not working when using angular inheritance

I am learning inheritance in AngularJS, so I created an example to dig into it. From top to bottom its conveying the info as expected. But from child to parent its not. Following is the tutorial I am ...
0
votes
0answers
33 views

Custom directive using ng-model inside ng-repeat

I'm trying to create a list component that is bound to a list defining column metadata and row values. For example: var list = { cols: [ { name: "date", display: "Date", type: "date" }, { ...
0
votes
0answers
39 views

$scope.watchCollection in angular js is triggered only once

I have an object array which has two nested objects in it. The structure is as below. I am having watch functions to watch any update or push or delete of the extraCurricular nested objects. But those ...
0
votes
2answers
46 views

angularjs-nvd3-directives value outside function

I can't find a way to retrieve a value from a function of angular-nvd3-directives, I tried everything, using $emit, $broadcast, $scope.varName. I have the correct value printend in console, but I ...
0
votes
1answer
42 views

Update ngModel on a directive, from a directive

I'm having trouble understanding why changes to an ngModel doesn't propagate from one directive to another. Here's a plunker that shows a simplified version of what we're trying to do. Basically, ...
1
vote
1answer
20 views

Angular with nested scopes, tried using $parent but watch still not updating

I have two controls, a radio control and a checklist control, with only one of them showing at any given time (based off of a boolean multiline). I also have some logic watching $scope. Both of ...
0
votes
1answer
20 views

Copy value from scope object in directive

I have a directive where I am reading in values as attributes and storing them in scope. My markup is as follows: <my-directive ng-model="myCtrl.widgets" ...
1
vote
2answers
25 views

Select does not auto update on ng-model change rendered using ng-repeat

I am creating dropdown in a directive as follows: <select ng-model="selectedSite"> <option value="new">Add New Site</option> <option value="line" ...
3
votes
2answers
60 views

How to find first key “id” on the page in AngularJS?

I would like to find the first id of the index of the first ng-repeat on the page. without jQuery and use this value and store inside a new $scope.firstId. I need the value in the view. EDIT : I ...
0
votes
1answer
35 views

Angular.js update scope after variable has changed

I have a search-bar in my web page, which is associated with a controller that receives a JSON object as a response from the server. I then save this response in a global variable named assetResult. ...
1
vote
1answer
26 views

AngularJS ng-model not two-way binding properly as part of directive

I'm trying to make a simple Angular directive for a currency input. It should behave as a float in the model but it needs to display a to the user. It also needs to force the display of 2 decimal ...
0
votes
2answers
23 views

Simple $scope.$watch not called?

I have a simple table app which gets JSON data from a database. It passes the data via parameter to my app controller, which then filters the data. This works great. However, it is a lot of data ...
0
votes
0answers
40 views

Angularjs Directives Scope Issue

I am having trouble with a directive. My model updates with data that is being loaded by a http call. Without the call the service the directive works correctly. I have a directive called ...
0
votes
0answers
60 views

Is AngularJs the right choice for Scalable Applications? [closed]

I have been researching for weeks now on the right architecture for creating a web page/ form builder solution ( something similar to this: http://www.formassembly.com/service-overview.php) and after ...
0
votes
2answers
41 views

AngularJS: $watch not firing when value changed in directive

I've got custom directive that add's a property to the scope in side the link function, then it add's a watch to it. If i changed the value of the scope property from the controller the watch gets ...
0
votes
1answer
53 views

How can I detect if an Angular app has been initialized from outside Angular?

While developing the lift-ng plugin, I have noticed an issue where sometimes the server sends events via comet to the client prior to angular initialization. This causes events to be silently missed ...
-2
votes
0answers
33 views

Angular JS Controller not working

I am new to AngularJS, and unable to figure out why this basic controller is not working given the following code. It should take in two numbers and run a simple calculation(addition or ...
0
votes
2answers
32 views

Can't access attribute of Angular Promise

I'm trying to write a JS function using Angular such that I can have it return a value, then set a variable on the scope equal to that value. I return a promise object that according to the chrome ...
1
vote
1answer
39 views

Angular.js return value from directive to controller

I have a problem with directive. I found this plugin: http://allensarkisyan.github.io/VideoFrame/, now I have this plugin implementation in my controller: HTML <div class="row" ...
1
vote
1answer
32 views

how do I hide the dynamic loaded template on click of the same button angular

Trying to show and hide the template on click of the same button, but unable to get the write thing.. Added plunker is the tried demo link: Demo Link Tried ng-click="cClick()=!cClick()", but it is ...
2
votes
1answer
23 views

Load template on click angular

Have tried loading the template on click of the button but some where approach is wrong templates are not loading. Here adding the tried plunker: Plunker Can anyone let me know where had gone ...
1
vote
1answer
41 views

AngularJS routing with id parameter ends in white page

var app = angular.module('application', [ 'ngRoute', 'ui.bootstrap' ]); // configure our routes app.config(function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); ...
0
votes
1answer
41 views

AngularJS websockets too fast

I am using AngularJS to power my webapp. Recently I've decided to introduce Stomp over websockets in the mix with RabbitMQ. One problem that I keep hitting is that sometimes the messages sent from the ...
0
votes
0answers
58 views

Angularjs Service Scope + Bindings

I am looking to run the following controller but im having trouble with scope. I have a service that calls two functions that retrieve meta data to populate scope variables. The issue is that ...
0
votes
0answers
29 views

What are the advantages/disadvantages to a declarative template? ViewModel approach?

When talking about a declarative syntax in angularjs we usually always bring up directives, and how we can pass $scope properties down into these directives for processing, DOM manipulation, data ...
1
vote
1answer
36 views

Angular architecture for a sorting directive

Being quite new to angular, I am searching the best way to achieve a quite simple task. My aim is to update in a database, through angular $resource service, the order (I have a position attribute) ...
3
votes
1answer
32 views

How to get width of an element from an ng-click without Jquery in AngularJS?

I would like to get dynamically the width of the div.progress-bar from the ng-click. My function move($event) on the element div.progress-bar returns the event with the element div.progress-bar. But ...
0
votes
1answer
28 views

Invoking Main Controller function from Modal Controller - AngularJS

Problem Summary I want to invoke getCost function present in main controller, from modal controller. Pseudo-Code for this to explain the problem follows. I am am opening modal dialog as follows: ...
0
votes
1answer
28 views

angular - ng-if - how to callback after ng-if template has been rendered

in Angular, I need to call a function after an element with certain class has been loaded. Display of the element is controlled via ng-if='expr'. Value of $scope.expr is set after some ajax call has ...
0
votes
1answer
21 views

Binding Service Variables in Angular.js

Im trying to build a login modal that will update templates (just basic user info - avatars,names,etc..) across different controllers. Loosely following this example, my approach has been to bind ...
0
votes
1answer
34 views

Angular accessing scope attribute

I have the below code as a directive. I'm trying to pass scope from a controller to this directive, and it seems to be passing it properly (console.log(scope); works fine). However when I try to ...
0
votes
1answer
32 views

Angular- detecting a change in scope

I have a service that grabs JSON data for me and hands it off to a controller: Service snippet: ... getP2PKeywordData: function(global_m, global_y) { // Return the promise return ...
0
votes
1answer
15 views

Double data binding with angularjs controller as style

I am searching how to use double data-binding in angularjs respecting controller as style recommended by Google. It looks like: hello.mainpage.HomeCtrl = function() { /** * @type {string} * ...
1
vote
1answer
38 views

Difference between ways to declare a scope in a directive (ways shown inside)

I'm new to AngularJS, JavaScript and HTML. My question is: ¿What is the difference between the four ways to declare the scope in a directive? I'm going to show the way and then write what I think ...
1
vote
1answer
38 views

AngularJS Directive to directive communication

I've a directive nested within another directive as in the below fiddle. http://jsfiddle.net/sriramr/T7W6T/3/ My question is: if a variable in the parent directive changes value, how to ...
0
votes
1answer
57 views

AngularJS scope not binding data in ng-repeat

I am developing a single page application which retrieves blog feeds from a website. I got JSON using jQuery AJAX, and assigned the value to the "$scope.entries" variable, but its not reflecting the ...
0
votes
1answer
50 views

What is happening when I use .scope() in angularjs?

Could someone please explain what is happening when I use .scope() inside of a directive? I have a directive that is assigned to create a grid of squares. On load, I would like those squares to be ...
0
votes
1answer
32 views

How do I get a watch function in a directive to fire when elements are shown or hidden in angularjs

I'm trying to write an angularjs directive that works like foundation-equalize. My problem is that I want it to work with elements that are hidden when the page loads and then appear when a user ...
0
votes
1answer
28 views

Difference between defining isolated scope variable for angular directive in {} and in link

In angular directive, I know I can assign isolated scope, but I need to add '=' or '@' or '&' to define variable in {} while I don't have to do that in link, for example: scope: { foo:'=foo', ...
1
vote
1answer
51 views

Angular.js - ng-model overwrite my ng-value on text-input

I'll start off with mentioning I'm very new to Angular so I'm probably not doing things in the correct "Angular way". I have the following ng-repeat looping through some data - the correct data is ...
0
votes
1answer
44 views

how to call angularJS from another java script framework [closed]

I am trying to connect angularJS with another Java script framework - UI5. Scenario: I have a custom angular tag in my UI5 application. Change in UI5 must trigger the angularJS controller. I am not ...
0
votes
2answers
37 views

Angular.js $modal Scope issues

I am trying to create a simple login modal with username and password. To accomplish this, I used a factory for handling login variables across controllers: .factory('userFactory', function($http) { ...
0
votes
1answer
41 views

ng-click, scopes and nested directives in AngularJS

I have these nested directives the very inner of which has an 'X' sign, which is, when clicked, is supposed to delete an item (classic problem). Basically, the whole thing is a menu. I have added an ...
0
votes
1answer
61 views

Why can't I bind my directive's Inputs?

I am trying to learn about Angular directives and how to incorporate React.JS components into Angular, by taking this UI Router example, and put all of the original templates into directives. What ...