0
votes
0answers
32 views

Updating view from service in angular?

Maybe I am designing this incorrectly ( new to angular ). Currently I have something like this: [TVController] depends on [TVService] [TVService] depends on [GameShowChannel] #could possibly have ...
0
votes
1answer
22 views

AngularJS: How to access child scope object from parent scope?

function ParentCtrl($scope) { //some function check whether data object in child scope is still null } function ChildCtrl($scope) { $scope.data={}; $scope.func = function(){ $scope.data.x = 1; ...
0
votes
1answer
8 views

Angularjs: directive defined controllers communicating with child directives

I think I'm missing something when it comes to directives interacting with internal controllers. The API documentation is pretty poor on the Angular site. As far as I can tell, in order to access a ...
0
votes
0answers
14 views

How do I unit test $scope.$emit changing a scope variable in angularjs? [duplicate]

How do I test a scope variable that gets changed by an event? This is the bit of code I want to test: $rootScope.$on('someEvent', function(event, option) { $scope.option = option; }); I'm trying ...
0
votes
1answer
17 views

Resolving a object list before route load in angularjs

Good day i'm trying to resolve a property in an angular js project. below is what i've done so far, .when('/wizard',{ controller:'WizardController', templateUrl: 'partials/wizard.html', ...
0
votes
0answers
24 views

AngularJS - dynamically remove directive from element

What is the proper way to dynamically add or remove directive from compiled and linked element? I have a page that has bunch of inputs there (the list is pretty long, so i want to come up with a ...
0
votes
0answers
18 views

Trigger the $scope.submit() event of blueimp in angular programmatically

When I use the submit() event of blueimp file uploader within the DOM, everything seems to work fine. i.e.: <span class="btn" ng-click="submit()">Go</span> However, calling ...
1
vote
1answer
20 views

Compiled Text Bind Does Not Show Up Until You Click A Button

I have a simple web app that lists users by first name and the city they live in. When the user clicks their name or city, the elements will be replaced by two input elements. One for the name and the ...
0
votes
1answer
30 views

Angular form validation in four step registration pages

I have a 4 page registration module in AngularJS. I want to submit the details only at the end. The submit button will be enabled only after the user filled the mandatory fields in all four tabs. ...
1
vote
1answer
44 views

Scope inheritance for angular directives

I've created a tab control using angular directives. It is consist of tab, tab-item directives with new scope and tab-item-header, tab-item-body directives for which scope is not declared. If I ...
0
votes
4answers
38 views

angularjs: ng-click on <a> not working, works on <button>

Here is the Javascript function gotoUrl($scope, $location, $http, $window) { $scope.setRoute = function (route) { $location.path(route); }; My code is <ul class="nav ...
0
votes
0answers
43 views

Passing a method to an angular directive ng-click event post declaration

In Angular and using Bootstrap 3.0, I would like to open a modal window to confirm an action where the modal action button continues to complete the request. I have put the modal code into a ...
0
votes
0answers
25 views

Troubles using ng-if inside html template of a directive

I have recently start working with Angular.JS, and i have arrived to a scenario that i don't know how to correctly handle it. Let me explain what i have and what i'm trying to do (i suppose it's the ...
0
votes
0answers
29 views

Do angular directives on the same DOM element share a scope?

If two angular directives are attached to the same DOM element do they both share the same scope? The angular documentation implicitly indicates this is the case, If so, what is the best practice for ...
0
votes
1answer
15 views

passing objects to $timeout

Is there something special I need to do to access objects inside $timeout functions? I get errors saying routes is undefined when I try and access it in the $timeout function, but outside the ...
1
vote
1answer
27 views

UI is not updated after firering a ng-click event on my AngularJS controller

I've bound a button with a ng-click event that fires a function on my controller. This again gets some data using $http and this works just fine. But when updateing my model in the success-callback ...
0
votes
0answers
45 views

In angular, how can I change the view after certain seconds?

I have my current view as so: <div class="television-container"> <div class="screen" ng-controller="TelevisionScreenController" ng-include = "currentChannel"></div> <div ...
2
votes
1answer
62 views
+100

AngularJS not cleaning child scope created by ng-include

I have the following use case - I provide a dialog service where I put a different content depending on the context. In the service method i manually compile a dom element and use it to display dialog ...
0
votes
1answer
26 views

navigation bar with angularjs with pages divided into segments

I have a setup like this <div class="" ng-controller="routeController"> <nav class="nav"> <ul> <li href="#view1"></li> <li ...
2
votes
1answer
48 views

angular directive binding value to parent scope from template model

I am trying to create an angular directive to behave the same as this jsfiddle that is done in jquery. http://jsfiddle.net/RCaCM/7/ The purpose of the directive is to have the controller (parent) ...
0
votes
1answer
41 views

How to pass a variable from view to scope using ngRepeat

I'm making a browse page where users can see the top terms for my site's search facets (I'm using ElasticSearch/Tire.) I created an array of objects with a title and arguments in the format I need for ...
0
votes
0answers
18 views

ng-animate with javascript throwing Exeption errors when out animation is cancelled

angular.module('AppAnimations', []) .animation('ecocool-in', ['$rootScope', function() { return { setup: function(element) { TweenMax.set(element, {opacity:0, right:'100px', ...
1
vote
2answers
41 views

AngularJS - Issues passing attributes to directive - Receive undefined value for each of them

I´m working on a directive that receives four parameters, each of them is binded to the directive scope. The issue is that the directive receives all the values as undefined, the data exists, and ...
0
votes
3answers
62 views

undefined scope into $watch

I have a directive named dir with: ng-model="job.start_date" comparison-date="job.end_date Into scope.$watch("comparisonDate... I want to access my ng-model value. The problem is that scope is ...
0
votes
2answers
42 views

angular directive scoping issue

I have some experience with angular now but I still cannot figure out that one. I have a directive2 transcluded through another directive1. Directive1 is on the same element as a controller and they ...
2
votes
1answer
23 views

AngularJS ngInclude dynamically changing its location

I have a few partial templates where the location is changed based on user actions via ng-click: <div ng-include="contentUrl"></div> <button ng-click="contentUrl = ...
0
votes
0answers
55 views

Watch event no fired on directive

Working on this example and I can't get the directive explode-balloon works, I'm updating the controller scope inside the click event of the directive balloon. What I want to do is to hide the balloon ...
1
vote
1answer
48 views

angularJS: How to call child scope function in parent scope

How can call a method defined in child scope from its parent scope? function ParentCntl() { // I want to call the $scope.get here } function ChildCntl($scope) { $scope.get = function() { ...
0
votes
0answers
42 views

AngularJS (1.1.5): Can you cancel Directives with priority cancel

Is it possible to keep the built-in ng-click handler from firing when you have a custom ng-click directive with a priority > 0 that fires first? Or to delay the built-in one in some way? In my case ...
3
votes
3answers
65 views

AngularJS $watch is failing for arrays after 1st update

I need to track when a model value which is an array has been updated by a directive but $watch appears to be failing. I created a fiddle to illustrate the problem: http://jsfiddle.net/DsTLN/ I ...

15 30 50 per page