0
votes
1answer
13 views

How to insert $compile'd HTML code inside the directive without getting $digest recursion error?

I have a directive that, depending on the ng-repeat item data (from the database), build custom HTML with a switch case: app.directive('steps', function($compile){ return { 'restrict': 'A', ...
0
votes
1answer
24 views

angularjs solution for async $scope $apply

So I know if the call is outside angularjs or it is async then we need $apply to update the angularjs scope. What is the best practices to using $apply if I have many api/3rd party in my app? I ...
0
votes
0answers
22 views

How do you prefix a URL route with a dynamic $scope value after being called?

I am trying to prefix my users' usernames to the routes they call within my application after they've logged in. How would I achieve this in angular? I already tried using the $locationProvider and ...
0
votes
0answers
24 views

AngularJs - RequireJs - Access controller from module on ng-click

I am new to both Require and Angular. My question is how to access a controller on ng-click if the controller is hosted in a module. In My case I have to following files: -- This is controller ...
0
votes
1answer
28 views

angularjs saving $scope via a closure

Disclaimer that I'm new to angularjs :) I have a controller that delegates to a service and I'm trying to preserve the $scope so I can scope.apply after setting properties: var Build = ...
0
votes
0answers
26 views

How to set Authentication in Angular JS based on User

I have created application in Angularjs using Restful API. I have created teams and their members and my URL for that is http://localhost/index.html/home/team/admin/1 1 => specifies Team 1 => which ...
0
votes
0answers
36 views

redirect using the $location variable with angularjs

i followed the directions from this post: Redirect using AngularJS here is my user.js service: 'use strict'; staticApp.factory('user', ['$scope', '$http', '$q', '$location', function ($scope, ...
0
votes
1answer
34 views

angular.js boradcast error: $rootScope.broadcast is not a function

I am adding items dynamically to an array of items and would like to let a directive know that there are new items. So inside the controller function addItem() I am trying to do the following: ...
0
votes
3answers
44 views

$rootscope object model from service not (always) available in every controller

In my app definition I have: var myVtModule = angular.module('vtApp', ['myAppDev','mongoAPI']); myVtModule.run(function($rootScope, $location, Shop){ $rootScope.shopData = {}; ...
0
votes
0answers
34 views

angularjs directive for inner html element not working

I am using angular directive for implementing iScroll in my app. <div id="videolist" > ------------ ------ <div id="videoReviewsWrap" > <ul ...
2
votes
2answers
35 views

angularjs : broadcast event from directive

I've seen people doing this from wherever in their code: $rootScope.$broadcast('someEvent', someParameter); and then in some controller: $rootScope.$on('someEvent', function(event, e){ }); ...
0
votes
1answer
51 views

angular.js: model update doesn't trigger view update

i'm currently working on a web based twitter client and therefore i used angular.js, node.js and socket.io. i push new tweets via socket.io to my client, where a service waits for new tweets. when a ...
0
votes
2answers
35 views

Call Angular controller from script onload

I am trying to update the state of my controller after loading of a script from onload callback. I load the Google Client API: <script ...
1
vote
0answers
30 views

AngularJS memory leak with ng-switch? Can someone solve this?

I've built a custom routing method for angularjs and I use this to control ng-switch within my app in order to create multi level deep linking. http://plnkr.co/edit/beAm3WRomMafKzx1SoSZ?p=preview ...
2
votes
2answers
47 views

AngularJS - Access directive's isolate scope from within transcluded content

I'm not sure if this is actually possible, but I'm essentially wanting a reverse of the '&' isolate scope in AngularJS. Here is a Plunkr to demonstrate. Basically, I have a custom directive set ...
0
votes
1answer
37 views

Assistance needed converting jQuery to Angular

We have a table that is populated via jQuery ajax using this code: $.ajax({ type: "POST", cache: false, url: "/files/event_lister.php", // script that gets data from ...
0
votes
3answers
36 views

AngularJS Composite Components

I'm trying to create a component that contains multiple child components. I'm creating a collection of directives that other developers on my team can use to create custom search forms. For example, ...
0
votes
1answer
26 views

How to dynamically disable ui-sortable directive in angular-ui

I am using angular-ui for sortable using ui-sortable directive. Is it possible to dynamically enable/disable sortable functionality based on the scope state? So I need to have a button which changes ...
4
votes
1answer
106 views

Angular.js change on one item of ng-repeat causing filters on all other items to run

I'm still running into the same problem, filters and functions inside ng-repeat being called all the damn time. Example here, http://plnkr.co/edit/G8INkfGZxMgTvPAftJ91?p=preview, anytime you change ...
0
votes
1answer
74 views

AngularJS create directive & pass in array of key/value pairs for buttons that relate to actions in parent controller

I'm trying to make a directive widget in AngularJS and I would like to pass in an array of name,action k/v pairs to represent buttons that will trigger actions on the parent controller. What I've ...
0
votes
1answer
42 views

AngularJS: sending events from the isolated scope

I want to have a set of reusable widgets which can be used anywhere in the application. For ex. I want to have a settings menu and the menu items defined as nested custom tags. I want to be able to ...
0
votes
1answer
41 views

AngularJS Scopes and Deferreds

I have a service that does something hard and returns a promise: .factory('myService', function($q) { return { doSomethingHard: function() { var deferred = $q.defer(); ...
2
votes
1answer
46 views

Shouldn't there be an AngularJS ngWith directive?

Maybe I'm crazy, or too used to KnockoutJS, but I keep looking for an ngWith directive in the docs to define the scope on an element, in a controller, or for an included (ngInclude) partial. For ...
0
votes
1answer
28 views

How do I pass and then access an object inside a directive template (directive uses isolate scope)?

I have a collection of navBarItems and am currently presenting them like this: <a data-role="button" data-iconpos="notext" ng-show="navBarItems['search'].show" ...
0
votes
1answer
29 views

AngularJS referencing parent controller

I am trying to implement the following behavior. I am including a template using ng-inculde where I am doing something like this: {{something}} I want that 'something' to have double binding with ...
0
votes
0answers
26 views

Temporarily suspend data-binding in AngularJS to update model without firing $scope.$watch

UPDATE 4/19/2012 12PM PST: Gotta eat crow on this one. The problem was not with Angular's databinding but with math errors in how I was calculating the dates. I wasn't properly taking into account the ...
0
votes
1answer
68 views

AngularJs Scope, variable value get changed

I am totally new to AngularJs, i have taken tutorials, I had been stuck from last 5 hours on following problem, I am using twitterbootstrap and by modal i meant bootstrap modal It show me the modal ...
0
votes
1answer
115 views

AngularJS: Multiple views with routing without losing scope

I'm trying to implement a classic list/details UI. When clicking an item in the list, I want to display an edit form for that item while still displaying the list. I'm trying to work around Angular's ...
1
vote
0answers
47 views

Where should I put AngularJS scope $watchers?

I'm trying to get changes to an AngularJS scope to trigger actions in a model. To do this I use $scope.$watch() in my item controller, and plug those controllers into directives. The problem I'm ...
0
votes
1answer
56 views

Angular: call service once multiple controllers

This should be a fairly straight forward question, but I'm stumped. I have a service that makes an http call and then does extensive post-processing of the results. I would like the processed ...

1 2 3 4 5
15 30 50 per page