0
votes
1answer
13 views

Why can't I use Angular an angular directive's $set function to set ngPattern, ngMinlength and ngMaxlength?

This is going to sound weird, but, even if it is bad practice or something, how would I get this: html: <div ng-controller='CtrlCtrl as ctrlr'> <input account /> <button ...
0
votes
1answer
13 views

access angular cookie in view

I fill my angularjs cookie with some objects like $scope.benchmarks = function(product){ $cookieStore.put("benchmark_prods", product); $scope.benchmarks = ...
0
votes
2answers
28 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
3answers
26 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
1answer
37 views

Call controller method from directive

I have a button which change the "active" state. First, it loads the status from the server <button active="data.active" ng-click="changeStatus()"></button> directive code: ...
1
vote
0answers
428 views

AngularJS - Share ngModel with nested directives and transcluded directives

I am trying to create 3 directives: .directive('dirOne', function () { return { restrict: 'E', transclude: true, replace: true, controller: function ($scope, ...
0
votes
2answers
32 views

AngularJS: pass variable to $scope in $routeProvider

I need to pass a variable to $scope in $routeProvider. Code is following: .when('/:zone/edit/:id', { templateUrl: 'views/edit.html', controller: 'EditSet' }) ...
0
votes
0answers
26 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 ...
1
vote
3answers
30 views

AngularJS - add active class to itself after click

Is there a simple declarative way (without a additional function in the $scope) to marked clicked element with AngularJS? e.g. I have a button which I want to marked as clicked/checked. <button ...
-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
0answers
32 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" : ...
2
votes
2answers
3k views

AngularJS: Select not 2-way binding to model

I am using a select to show Client names. A user should be able to select an existing client, which will then update the scope property: Controller Initializing the "first pick". ...
1
vote
0answers
27 views

AngularJS - JSON and return all results

I'm trying to write a basic search function using AngularJS. I have written a service that finds my JSON file and binds it to a $scope object $scope.SearchResult What i am trying to do it perform a ...
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
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 ...
10
votes
4answers
1k views

When to use $scope directly?

I just started out with Angular and have been reading through a lot of Tutorials. Now the free one at CodeSchool which was my starting point doesn't mention $scope at all. From what I've gathered, ...
0
votes
0answers
30 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
27 views

How to use $scope inside of factory declaration in AngularJS?

books_ctrl.js.coffee myApp.factory "Book", ($resource) -> $resource("/books/:id", {id: "@id", page: 3}) The above factory declaration works fine. Now in order to get my pagination to work I ...
3
votes
3answers
5k views

Angular JS: Load CSS and JS files dynamically

I am in the middle of developing an web app. I am using AngularJS for loading all the files dynamically into the UI. 1. i have and index.html onto which all the files will be loaded dynamically on ...
0
votes
2answers
16 views

AngujarJS template not rendering correct

I have a problem with getting a template populated with data, from a directive. This is what I have: app.directive('mypopover', function ($compile,$templateCache) { return { ...
0
votes
0answers
37 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
45 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
0answers
14 views

Ng Table Pager template is not allowing any custom data binding like ng-click=“Custom Function”

first I have used a ng table pager template I am not able to use my custom function like ng-click='first()' instead of ng-click="params.page(page.number)" and then call the parameter inside it's ...
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, ...
0
votes
0answers
19 views

Click event gets executed even after window.confirm returns false in angular confirmation dialog

Based on the example given here I have written a directive to display a confirmation dialog in Angular when a button is clicked. The problem is even after the user clicks on the cancel button on the ...
0
votes
1answer
12 views

How to listen for a site-wide event in a directive with isolate scope

I am creating a custom chart widget in angularjs using a directive with isolated scope. The idea being that each widget should be able to exist in isolation after receive basic config information on ...
3
votes
2answers
58 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
0answers
15 views

Angular js - $scope of previous page is carried to next page only after page refresh

I have two states in my angular js project which is controlled by two different controllers. The structure is as below Page 1 - <classLevelController.js> Button1 -On click - Page 2- ...
3
votes
3answers
2k views

How to detect browser using angular?

I am new to angular. How can I detect userAgent in angular. Is it possible to use that in controller? Tried something like below but no luck! var browserVersion = int((/msie ...
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
1answer
15 views

How to use $scope.watch for a scope inside a directive?

I would like to watch the model search.value inside my custom directive. How do to this ? HTML : <div search></div> DIRECTIVE : app.directive('search', function($rootScope) { ...
1
vote
2answers
23 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" ...
0
votes
0answers
17 views

Updating “treedata” model array in angular-tree-control will not update the UI. Why?

I am using angular-tree-control of wix: http://wix.github.io/angular-tree-control/ The main problem is to understand how to update the UI tree with new children nodes, not by clicking on the folder ...
1
vote
0answers
27 views

Data binding with `ng-model` not working on some systems

Quite strange, but yes the same code works on one system but not on the other. I developed a HTML-5 based extension for Adobe Creative Cloud Applications (Adobe CC have the chromium framework built ...
0
votes
1answer
34 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
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" ...
0
votes
1answer
23 views

AngularJS waiting for ajax reponse with .then doesnt work as expected

In my app i want to check if user is logged in , so i can enable or disable buttons in menu. I can do it in a simple way, but then i get a problem that menu makes a "blink" where users will see some ...
1
vote
1answer
25 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
1answer
33 views

AngularJS isolate scope how to add to correct parent scope?

I have a directive 'outerDirective', it has children that are directives, and they have children that are directives. How do I add the grandchildren directives scopes to the correct child directive ...
0
votes
1answer
16 views

Binding doesn't update when the original object changes

I think I have misunderstood something about how data-binding and scopes work in Angular, or maybe I have some misconception in Javascript in general. I hope somebody can help me. Let's say I have a ...
0
votes
2answers
25 views

Angularjs - Cleanest way to add promises to scope, now that Angular deprecated auto unwrapping of promises

I really like the clean (and I think easy to follow) way that promises were autounwrapped: $scope.myData = DataService.query({something:"etc"}); // done; And I really dont care for what seems to be ...
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
1answer
31 views

How correctly make a select ng-repeat into another ng-repeat

I have to write something like that <table> <tr ng-repeat="pers in persons"> <td> <select id="person{{pers.id}}"> <option ng-repeat="city in ...
0
votes
1answer
25 views

Highlight currently selected node in expandable tree angularJS

I want to highlight currently selected node in the tree. That means I want to unhighlight previously selected node (if any). I don't want to visit whole tree and deselect the node if already selected. ...
0
votes
0answers
59 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
0answers
16 views

Old data showing before new data loaded when re-visiting page

I have an angularjs system which displays a candidate profile and document against that profile which are managed & accessed by the users. We are encountering a problem whereby when viewing the ...
0
votes
1answer
18 views

Pass Services to Application Config in angularjs

I am developing an application with angularjs I have this piece of code for checking if the user is logged in at the end of the routers I also define a function in a Service in order to have a ...
0
votes
0answers
28 views

ngClass is not updated successfully in a directive

I have created a directive, that creates a popup with a ul element, but ng-class = isVisible is not returning the correct value. It works, if I only have one use of the directive at my page, but when ...
-2
votes
1answer
21 views

angular is not correctly binding anymore

I'm starting to have problems binding data to a select using angular 1.2.18. CHecking with batarang ,I have those data in the scope: ComuniNascitaList: [ { id: descrizione: Selezionare il ...