0
votes
0answers
12 views

AngularJs directive - how to save '&' scope property in the link function

I'm trying to implement a simple button directive with this properties: scope: { text: '@', enable: '@', click: '&' }, The click function will ...
0
votes
1answer
11 views

Watching and limiting size of array in angularjs scope

The premise of what I am trying to do is to have a simple Q&A system that shows only one question at a time. After each answer is given another question is presented until $scope.quiz is ...
0
votes
3answers
28 views

AngularJS automatically updating controller data by service

I'm having some basic problems with angular at the moment. I just wrote a service that reads the temperature of an external device in an interval of five seconds. The service saves the new temperature ...
0
votes
0answers
25 views

cannot use $scope inside window.fnName in angularjs

I wonder why I can't use $scope inside window.fnName = function(e){ }; I tried to inject the $scope like this window.fnName = function(e,$scope) but still fail. here the full controller code of ...
0
votes
1answer
13 views

Submit and disable all buttons in an ng-repeat without adding a new property on the scope

I have a list of items where each item is clickable and should trigger the submit(id) function. I would like to disable all items (buttons) when one of them is clicked. <ul> <li ...
0
votes
1answer
11 views

angular getting attribute value and cannot find a proper way

I have this in my dom <div id=“my-lightbox-container" style="height: 0px;”> <div id=“my-lightbox" role="dialog" style="width: 660px; height: 342px;”> <button id=“my-close" ...
0
votes
1answer
22 views

How to dynamically bind function to ng-click using the function expression from model

I have the following element in my Angular template to generate a button bar with Font Awesome icons: <li data-ng-repeat="btn in navigation.buttonBar" data-ng-click="{{ btn[1] }}" ...
0
votes
1answer
15 views

Call a function on Valid Blur

PLUNKER How can i trigger function call on blur only if element is valid has no other error? HtML <input type="text" id="order" ng-model="order" name="order" class="form-control" ...
0
votes
1answer
16 views

Angular JS scope not updating from included template

So I have below index.html: <div ng-controller="UsersController"> <div ng-include='"assets/users/partials/template.html"'></div> <a ng-click="get_data()">Get</a> ...
0
votes
2answers
27 views

Angular hide/show based on radio button

Plunker How can i make yes radio button to be checked on page load and show/hide the field-set accordingly. Currently on load radio button is checked but its not showing the fieldset. Html ...
0
votes
1answer
20 views

Two-way binding in an angular directive leads to loop

I have a directive with a select in it. Here is a cut-down example. Note the real code has more moving parts and some logic. app.directive('numberPicker', function() { return { restrict: ...
0
votes
1answer
32 views

How to reload angularjs scope data without rerendering bound view

I've got a small problem. I have a bootstrap tabset within an angularjs app. The tabs are partially generated from ng-repeat and contain data, that is bound to the scope. Basically, within the ...
0
votes
1answer
18 views

Inject object reference in angular controller on instantiation

I have the following problem: I'm building a self-declaring app and it needs to register a ButtonCtrl but the instantiated object needs to have a reference to an external object outside Angular. I ...
0
votes
0answers
15 views

Dynamic TemplateUrl

I have screenControl and screen directive. I want to dynamic screen templateUrl from screenControl directive. Can i send dynamic templateUrl with attr from screenControl to screen. index.html ...
0
votes
2answers
31 views

How does scope() method work in Angular JS?

I have created a directive, which has an isolated scope. Somehow, when I try to get scope from the directive's element, it gives me controller's scope, instead of the isolated scope. What's wrong ...
0
votes
2answers
43 views

Can't update variable in angular.js

I'm building a Ionic application with angular.js, I'm almost done, but now I have a minor trouble. In my templates/menu.html I have: <ion-item nav-clear menu-close ...
1
vote
0answers
8 views

Angular ui-sortable + angular-gridster

I'm trying to combine the functionality of ui-sortable and angular-gridster so that I can pull an item from a list and drop it into a rearrangeable grid. ui-sortable and angular-gridster have the same ...
0
votes
0answers
16 views

Trying to read all response headers through angular interceptor

I'm trying to read response header through an $httpProvider interceptor to read all headers of all ajax request. $httpProvider.interceptors.push(['$q',function($q) { 'response': ...
2
votes
1answer
39 views

directive doesn't load correct after ngroute

I've got a Problem with an isolated scope in my custom directive. I've built a custom directive. It worked when I didn't set the scope-attribute in the directive by using the parent scope. What did ...
1
vote
0answers
31 views

Push non-angular object to AngularJs controller scope

I have a Angular controller that have a FormData scope, e.g: $scope.FormData. Data is collected via model connected to a simple form. Also, I have an external non-angular js code on the page. I need ...
0
votes
3answers
22 views

How to access an object attribute inside a service in AngularJS?

I have a service with a local variable object with events names: myApp.service('appService', ['$rootScope', function ($rootScope) { var events = { firstEvent: "MyFirstEvent", ...
0
votes
1answer
29 views

Auto Set fields with $scope variables - AngularJS

aving trouble filling text field and pre select a dropdown. This is my angular code. angular.module('MyCtrl', []) .controller('myController', ['$scope','$http', function($scope,$http) { ...
0
votes
2answers
28 views

AngularJS: ng-click listen on a different / specific controller

I have a login form directive with its own controller. The controller basically does the user login when the form is submittted fine. This works absolutely fine. I am trying to contain my user login ...
0
votes
0answers
11 views

Linking to a specific position on one page from a different page based on a json array variable

I am re-developing a clients site using AngularJs and since they list businesses for sale, I've placed all their data in a json file, then populated a page with ng-repeat. Everything works great, but ...
0
votes
1answer
89 views

Angularjs Directive scope

I'm trying to create a directive and am running into some problems with the scope object. In creating a plunkr to display what is happening I noticed that I'm close, but not quite sure what I'm ...
1
vote
0answers
32 views

AngularJs TemplateUrl

I have two directive and I want to dynamic templateurl with attr. For example; I want to send attr with deviceEmpty tag. If this tag not null, use this tag. If this tag use static url. AngularJs ...
0
votes
0answers
14 views

Keep getting undefined when calling $resource.query from function declaration

I am able to retrieve sample data through a web service using the codes below: // data.service.js angular .module('app.core') .constant("productUrl", "http://localhost:61938/api/products") ...
0
votes
0answers
15 views

Binding angular with an existing data model

I'm looking at html data binding and templating alternatives to apply to an existing model-driven system. I promise I'll get to the Angular question below, but it will have little meaning without some ...
0
votes
0answers
17 views

AngularJS model doesn't update on $state.go

I have built somewhat of a login and I want the user to be kicked to the dashboard page upon successful login. As of now, everything works as expected except for the model doesn't update until I ...
2
votes
2answers
30 views

Why in the same value in directive is defined and undefined at the same time?

Why I have value in scope as undefined but it is defined. HTML <body ng-app="plunker"> <test-dir></test-dir> </body> And JS var app = angular.module('plunker', ...
1
vote
0answers
15 views

angularjs: requireing and using tabsetCtrl.select

I am trying to create a directive that will automatically activate angular-ui tabs based on routes. my directive is intended to be added to every tab element within the tabset. I am requiring ...
0
votes
0answers
41 views

How do I $watch the Angular-ui's new ui-select (former ui-select2) search string changes?

I noticed that the Angular-UI have discontinued their UI-Select2 directive in favor of the new UI-Select (with multiple themes - select2, bootstrap, selectize). It looks like this: <ui-select ...
2
votes
1answer
23 views

How can i count the number of errors on Form?

FIDDLE How can i count the number of errors made on form ? HTML <div ng-show="form.$submitted && form.$invalid"> Sorry but 3 errors have been made. </div>
0
votes
1answer
27 views

How do I target just one instance of a nested repeat?

This is probably pretty basic, but I'm going round in circles. I have a nested controller in a ng-repeat - I would like to trigger an event in an instance of the repeat that will affect only the ...
0
votes
1answer
28 views

How to edit object in array using Firebase + Angular

In my Firebase + Angular (with AngularFire) app I have an array of objects which are formatted as a table with ng-repeat. Each row is a different object. I want to add option to "assign" particular ...
1
vote
1answer
30 views

Form Validation and disabled button

PLUNKER LINK In above problem i have three radio buttons which let the user pay balance,minimum amount and other amount.When user clicks on third radio button it opens up a div with input where user ...
0
votes
2answers
24 views

Angularjs : How to find value of a variable store in a string

It seems novice question but I am not able to figure it out how to find value of a variable store in a string e.g var value = "Scope.address"; Actually I want to find the value of "Scope.address" ...
0
votes
2answers
14 views

How to access a variable in a controller function?

I'd like to be able to access a controller variable inside a function of this controller. Why is the following code throwing an error into the console instead of showing the input value ? JS: var ...
0
votes
3answers
28 views

AngularJS Scope watch to find which binded attribute changed

I am writing a program in which I watch an array inside of my scope. Scope.watch works as needed, which gives me the modified value. But, how do I find out which element has been changed? for(var ...
1
vote
1answer
36 views

Form Validation angular/bootstrap

Here's FIDDLE Not able to understand that why the required validation is not working ?? HTML <div ng-app="app"> <div ng-controller="myctrl"> <form name="myform" ...
0
votes
0answers
26 views

Angular-ui: Is resolve the only way to pass scope to an angular-ui modal?

I have been using angular-ui with angularjs for a while now and have encountered a problem and subsequently a solution, but I want to know if this is a good way to do things. The original issue was ...
1
vote
1answer
38 views

Why can't I modify the isolated scope value in my directive controller?

Given the following Plunker: http://plnkr.co/edit/YicBDARAf5umI0PdCL8L?p=preview Why isn't $scope.someVal being set in the directive controller? I would expect the output of the template to show ...
0
votes
1answer
20 views

AngularJS matching filters exactly and not part

<li class="column__list--item" ng-repeat="skill in skills | filter: { skillset_id: filterbySkillset }"> I've noticed that when I try filter using the above, it filters anything it ...
4
votes
1answer
64 views

AngularJS - handle routes before app startup

Is it ok to use a Service within $stateProvider, for this purpose? I have been through a lot of posts on stack regarding routing but most are confusing for beginners as everyone uses a different ...
1
vote
1answer
23 views

Move an entire child directive to a new location

I'm creating two Angular directives that serve as a special kind of list. One is the parent, and the others are items in the list. The problem I'm running into is that one of the child items has to be ...
0
votes
1answer
22 views

Angular date range filter

I was wondering if anyone could help me. I'm currently trying to get a date filter to work in Angular. I could be going about this completely the wrong way but just thought I would ask. I currently ...
0
votes
1answer
19 views

Isolated scope within directive controller bindings

The problem Given the following directive angular.module('sandbox.directive.controllers', []) .directive('simpleDirective', function() { return { restrict: 'E', replace: true, scope: ...
0
votes
1answer
24 views

Directive scope got undefined

I get an issue with passing data to angular directives inside ng-repeat, it always got undefined. Here are my code The Controller: angular.module('module').controller('ModuleController', ['$scope', ...
0
votes
0answers
76 views

Angular Form Validation correction

Here's Fiddle Link Update--> works great with angular 1.3 by setting ng-model-options but i am using 1.2 :( Here's Fiddle Link Currently when user click on submit error comes up and goes away once ...
0
votes
2answers
31 views

Isolate scope requires templates

Here is an incredible simple app: <body ng-controller="MainCtrl"> <div parent ng-repeat="parent in parents"> <h1>{{ parent.family }} Family</h1> <div ...