0
votes
1answer
14 views

calls to angular.extend don't cause $scope.$watch to proc

I'm merging a smaller object into a larger object using angular.extend. Here's a sample of data: $scope.bigDocument = { "id": 0, "guid": "e75ce3b3-68f6-423f-94d8-1a613cde0c59", ...
0
votes
0answers
43 views

CoffeeScript breakpoints not hit when debugging angularjs / jasmine unit tests in webstorm 7

I am successfully unit testing my coffeescript / angularjs code using karma / jasmine. One of my tests is failing and so I would like to place breakpoints in my coffeescript code. I understand that ...
0
votes
1answer
47 views

AngularJS doesn't update an array returned from a promise

I'm have an issue after querying youtube API for data. The problem is replicated in this jsfiddle in case you want to try it jsfiddle.net/YBvQJ/4/ The problem is as follows: the first time I search ...
1
vote
1answer
44 views

Angular - Checking if data exists?

I'm creating a small calculator and it creates multiple values with binds. Is there a better way to do this? I feel like this is utter hackery. I'm new to Angular. The calculator: <div ...
0
votes
0answers
29 views

Angularjs namespaced controller in coffeescript

How can I test an angularjs controller written in coffeescript in a karmatest? I keep getting the following error in the test: TypeError: 'undefined' is not a function (evaluating ...
0
votes
0answers
20 views

How do I use the ng-repeat directive to make items appear multiple times in a list?

I have an issue with a list-widget directive I made that uses ng-repeat. I want to be able to create a list that groups items by "Group A, Group B and Group C". However one item should be able to ...
0
votes
2answers
50 views

Angular.js deep watch Coffeescript class instance

I have a CoffeeScript class like this: class Foo constructor: (@bar) -> setTimeout () => @bar = "changed!" , 5000) And a list like this in my controller: ...
0
votes
0answers
46 views

Why can't I resolve a factory-provided deferred in a directive?

I'm trying to create a controller which waits for a promise who's deferred is resolved in a directive. But all I get is a silent failure, preventing both my controller and directive from executing or ...
0
votes
1answer
45 views

CoffeeScript class-based controller for AngularJS doesn't update template

Using AngularJS 1.1.5 with CoffeeScript I'm trying the use the new 'Controller as ...' syntax as follows: class EventCtrl @$inject = ['$scope', '$http'] constructor: (@$scope, @$http) -> ...
0
votes
2answers
245 views

Zurb Foundation Abide and AngularJS initialization

I am using both AngularJS and Zurb Foundation.To initialize Foundation you have to make the following call: $(document).foundation() But, when you load a new view using angularjs foundation js is ...
1
vote
2answers
187 views

AngularJs auth service behaves strangely

Updated: code in JS I borrowed auth (session) service from angular-app, and strongly modify it: angular.module('auth', []) .factory('session', ['$location', '$http', '$q', ($location, $http, ...
0
votes
1answer
97 views

Best way to display images from Rails Asset Pipeline using AngularJS?

I'm working on a Rails app with an Angular-driven frontend. I want to include images from my Rails asset folders into a view that is shown only shown in certain contexts using an ng-switch directive. ...
0
votes
1answer
23 views

AngularJS simple page counter in controller

I have this in my html template. I want the button to fire the showMore function when clicked. <button ng-click="showMore(secondPage)">Show More</button> This is the controller. I'm ...
0
votes
1answer
138 views

AngularJS: app not getting data from get request

My Angular app has the following code: index.jade: doctype 5 html head body(ng-app='app') div(ng-controller='EventController') div(ng-repeat='event in events') ...
2
votes
3answers
156 views

Unable to CoffeeScript AngularJS module to load with ng-app in JSFiddle

I'm playing around with Coffeescript and AngularJS, trying to use the new "controller as" syntax. Despite varied attempts and searching Google, I can't get it to work - the controller reference in my ...
0
votes
1answer
89 views

Injecting a HTML template to DOM on click the clean way (Create an instance of a class)?

In my AngularJS project I have something like this (it's a dropdown menu with customer names. With a click on one of the names a Scrum Card should appear with the customer's names inserted in the ...
0
votes
1answer
43 views

Test for an instance of angular scope

I am doing unit testing with the Karma, Mocha, Chai and CoffeeScript stack, and looking to test for a variable being an angular scope. Something like this would be nice but does not work: scope = ...
1
vote
4answers
175 views

AngularJS: variable in ng-repeat without $scope is in its local scope?

here is the code: <ul> <li ng-repeat="i in items" ng-class="{'red': click}"> <span ng-click="click = !click">{{i}}</span> </li> </ul> <ul> ...
0
votes
3answers
36 views

coffeescript angular function call

I have a referral link that I'd like to be able to share, but I'm wondering if I can embed a variable in a function call that's already being literal. In my controller: $scope.get_share_link = ...
0
votes
2answers
183 views

AngularJS UI Bootstrap typeahead with ajax using Coffeescript

My question is very similar to this post 'Using typeahead and ajax in a AngularJS app' Coffeescript: $scope.tradingPartners = (searchOn) -> console.log("Searching on #{searchOn}") ...
0
votes
0answers
123 views

Angular directive attr.$observe work only when is created

i have a directive with an observer on data-color attribute. # datepicker-directive.coffee app .directive 'datepicker', -> { restrict: 'A' require: '?ngModel' link: ...
1
vote
1answer
442 views

AngularJS controller resolve: Argument 'controller' is not a function, got Object

I am trying to inject an controller into the $routeScope when using AngularJS's $routeprovider and requireJS $routeProvider.when '/', templateUrl : loadView('aboutJellyfish') ...
0
votes
1answer
69 views

AngularJS promise handling with CoffeeScript class

I am having some problems to understand the behaviour inside a service handing promises. In the following code i have one async call the server. Trying to use @$rootScope in the .then call is not ...
1
vote
1answer
84 views

Can't create Angular JS module in Coffeescript

I have the following html: <!DOCTYPE html> <html> <head> <title>Angular JS</title> <script type="text/javascript" src="/javascripts/app.js"></script> ...
0
votes
0answers
54 views

AngularJS: stop everything and redirect

In AngularJS, is there any way to stop the current script (even during a digest), and simply redirect to another page ? Here is a very simple example of what I would like to do (note: in coffee ...
5
votes
1answer
732 views

How do I enable Webstorm intellisense for AngularJS when writing CoffeeScript

I have setup Webstorm to recognise and compile my coffeescript files. I have installed the AngularJS plugin and can successfully write my controllers etc in plain old javascript. When I try to ...
1
vote
2answers
70 views

Implicit returns in Coffeescript and AngularJS

The following dummy controller in Coffeescript: GlobalTimelineController = ($scope, $http) -> $http.get('/api/globalTimeline').success (posts) -> $scope.posts = posts get compiled to ...
0
votes
1answer
54 views

Control angular directive from outside

I'm trying to make changes to a directive from my main controller. this is the directive code # directive.coffee application.directive 'btnState', -> { restrict: 'A' link: ...
0
votes
0answers
98 views

Dynamic variable in Angular directive cannot be resolved

I have a HTML table linked to a directive, I need to pass in a scope variable to the directive {{product.id}}, the product variable is set asynchronously in my controller. But when I try to retrieve ...
0
votes
1answer
92 views

AngularJS: Initial checkbox value not in model

I have got a form with a checkbox like this: <input type="checkbox" name="publish" id="publish" ng-model="data.publish" ng-true-value="Yes" ng-false-value="No"/> Now I would like to have its ...
0
votes
1answer
66 views

is it possible to use a $q promise in a service's dependencies to force the service to wait until the promise is loaded?

I'd like to be able to build a User service that depends on a utility library (that contains a logger and lodash). The code I have seems very close: angular.module("NS.services").service ...
0
votes
0answers
57 views

how can I resolve in a base state and get that resolved value when using named views?

TLDR: I can't get the resolve function in the base state to work and get my named views to display the right thing. I've got a set of working routes with named views (docs here) that look like this: ...
0
votes
1answer
67 views

Angulars $routeProvider does not route

I have a $routeProvider in my Angular JS application which won't load the template in the ng-view. I've set up <html data-ng-app="myApp"> and <section data-ng-view></section. It does ...
0
votes
2answers
57 views

Angular equivalent of .done in jquery

I cannot find an alternative solution to what I am trying to do, lets say I have this code in jquery: $.get 'file.json', (re) -> for k, v in re tpl = ...
3
votes
1answer
502 views

How to use an angularjs resource for rails/RESTful routes?

I've got an angularjs app embedded in a rails app. I'm using the RESTful methods provided by rails for a resource named "Task." Here are the routes I'm dealing with: GET /api/v1/tasks.json POST ...
0
votes
1answer
62 views

Briefly show then hide an element after custom validation in Angular.js

I want to briefly show (for a second or two) a 'looks good!' message next to a text box after some server-side validation function has run. I'm not certain of the "angular way" to do this. ...
0
votes
0answers
46 views

How to pass resolved dependencies in state manager view controllers?

I am trying to access the response from dependencies in the controller. [ui-router] $stateProvider.state('project', { url: '/:projectId/:forkId', resolve: { foo: function() { return { bar: ...
1
vote
1answer
96 views

In an Angular application, how to integrate the Ace editor with a toolbar?

I wish to write an Angular application which integrates the Ace editor with a toolbar for saving + undo/redo. I've created a basic plunk for working out this app. As you should be able to tell from ...
0
votes
1answer
51 views

Get information from an api with Angularjs $resource

I have access to a JSON api, the api URL is http://host/api, when I ask the api with the following parameters http://host/api&q=count_people&on=house&house_id=123433 the api response ...
0
votes
1answer
118 views

Checkbox not binding to scope in angularjs

I am trying to bind a checkbox to scope using ng-model. The checkbox's initial state corresponds to the scope model just fine, but when I check/uncheck the checkbox, the model does not change. Some ...
0
votes
1answer
181 views

How come Ace editor won't work correctly in my Meteor/Angular application?

I've created an example Meteor application which integrates with AngularJS and embeds the Ace editor via the UI.Ace Angular directive. However, although the editor shows up, it doesn't accept input. ...
0
votes
0answers
200 views

Authentication issue using Restangular and Passport

I am currently working on a pet project that uses AngularJS on the frontend and Express on the backend. The Angular frontend talks to the backend using RESTful requests using the Restangular module. ...
0
votes
2answers
164 views

Yeoman/Angular/Coffee .when() router won't route - cannot GET

Have a basic install from the Yeoman angular scaffolder and for the life of the, I cannot get the router to load a basic template. Here's my setup // index.html <body ng-app="mvmdApp"> ...
0
votes
1answer
121 views

angular unit test - controller

Well want to make some unit tests for my controller. I already prepared some stuff and everything works fine, except that the scope is not loading properly. In my controller i set a value user, but in ...
0
votes
0answers
118 views

AngularJS and custom jQuery SelectBox

I am trying to get a custom AngularJS directive to work. I am using Select-Box plugin for jQuery, which perfectly works when not executed in a linked function of a directive. The behaviour I want to ...
0
votes
1answer
236 views

Uncaught Error: No module: LocalStorageModule

I am trying to work on an AngularJS project with Local Storage. I am making a todo list application and storing each todo note using angular-local-storage. I have made a localStorageService which is ...
0
votes
1answer
70 views

controller not recognized - angularJS

I have a angular controller I have @MyAngular = ($scope) -> $scope.my = [...] @MyAngular.$inject = ["$scope"] I get this message error : Argument 'MyAngular' is not a function, got ...
0
votes
1answer
161 views

AngularJS, dynamically loaded view can't see corresponding controller

I trying to write app using angularjs and bootsrap. I use RoR on server, SLIM and CoffeeScript for templates and assets. This is my index file: doctype html lang="en" ng-app='my_server' head ...
0
votes
1answer
158 views

AngularJS directive and string interpolation

Context: I'm applying a Lightbox effect on some DOM elements using an AngularJS directive named opensAsPopup. Issue: Some of these elements have dynamical content coming from a ng-repeat directive, ...
1
vote
1answer
402 views

how can I reload my angular page without using location.reload()?

There seem to be two answers to this question: $scope.cancel = -> location.reload() or: $scope.cancel = -> $route.reload() The first works fine but it is a full GET ...

15 30 50 per page