AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability, reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications
0
votes
0answers
20 views
Inheritance in angular directive with coffeescript
Here is my solution:
MyFactory = ->
test: -> "test"
class Base
@$inject: ["MyFactory"]
constructor: -> return (@MyFactory) => @
restrict: "E"
link: (scope, element, attr) =>
...
0
votes
0answers
49 views
Am I doing Angular right?
I'm starting a new project using Rails and AngularJS. Things seem to be going okay, but I'm sure there are certain things I'm doing totally wrong.
Here's a snippet from the project. If you just want ...
1
vote
1answer
82 views
How could i improve my sisyphus-like service for AngularJS?
I have created a module/factory/directive for AngularJS which allows to save user input to localStorage and restore it if needed.
Although it works quite good, I am sure that I could improve its code ...
2
votes
1answer
57 views
AngularJS Improvement - Am I Starting Out Right?
I've recently just started with AngularJS and the best way for me to learn is to get some criticism to find out how I can do things better. I did a small project that calls a third party API and shows ...
1
vote
0answers
121 views
Bootstrap input validation error class
I'm trying to make example from this article using angular+bootstrap. I have this working code:
<div ng-controller="Ctrl">
<br>
<hr>
<form name="signup_form" ...
0
votes
0answers
44 views
Creating dialogs and modals with AngularJS
I wonder whether or not I should improve my current practice on creating/calling dialogs with AngularJS
Think of a simple information, displayed on demand as a modal window. To create such a thing, i ...
4
votes
1answer
30 views
“Stack exchange page visits” alike implementation
StackExchange page views works like this: Link
The objective is to increment the page visits by one. User should not be able to do this by refreshing. Number of visits can be incremented only if ...
3
votes
1answer
81 views
First angularjs directive
I've just written my first angularjs directive, and I was hoping to get some feedback. I already have two doubts myself.
Why is it that I must use tElement.append() to append the canvas element? ...
1
vote
0answers
91 views
Is there a better approach to implement this “day wise task management” system using Django and AngularJS?
I have a Task model in Django which looks like following,
class Task(TimeStampedModel):
project = models.ForeignKey(Project, related_name='tasks')
date = models.DateField(_('date'))
task ...
1
vote
1answer
246 views
In AngularJS, create lots of directives or use ng-controller?
This is a question about whether my coding style follows AngularJS best practices.
One of the selling points to Angular is directives. Directives allow you to create custom DOM with elements or ...
1
vote
1answer
94 views
Is it reasonable to expect this AngularJS function to perform well?
I have this function which is associated with a timer that I'm creating in AngualarJS. Should I be concerned about the function being able to execute quickly enough for the timer to be accurate.
...
0
votes
0answers
28 views
Adding a custom field to Routes - clever solution or terrible hack?
I need to make sure the correct menu item is highlighted according to which URL is currently being viewed.
Now the problem with our site is that each menu item can represent several pages. So the ...
0
votes
0answers
140 views
My first OSS software AngularJS drag/drop - please review code and documentation
I just posted some AngularJS directives to my github account, I think they are both useful and easy. This is my first attempt at publishing OSS, I would love some feedback on the documentation, ...
0
votes
0answers
18 views
How can I reduce redundancy in this angular or the angular html?
I'm very new to angular as far as directive and module options. I've just made my first module and factory here. The areas in the UL are frequently repeated elsewhere in the app, but are seem like ...
1
vote
1answer
53 views
AngularJS, Directive improvement
I wrote my very first directive and I'd like to get some suggestions for improvement.
My code - plnkr.
webApp.controller('AppCtrl', function ($scope) {
$scope.expandAdd = function() {
...
0
votes
1answer
289 views
An own approach to Angularjs validation
Introduction
So i am building a SPA with AngularJS. The application provides a large number of <input> elements and can be seen as a huge form.
However, i am not using an actual <form> ...
1
vote
1answer
186 views
Manipulating model elements in angular
All,
I barely have a week of angular behind me and I am still struggling with some of the concepts. Below is a piece of code I came up with. The idea is to let the user add/delete entries in a model ...
0
votes
0answers
86 views
Angular testing using Jasmine
I have a controller that I'm trying to test. I've written the spec and Karma (my test-runner) tells me it passed, however I'm not sure I wrote it correctly.
Controller
...
1
vote
1answer
234 views
coffeescript and angular directive
I feel this is deeply inelegant, but I really want the option of classical inheritance in the future. How could this be written better. FYI animation here is from GSAP if you are curious.
class Modal
...
1
vote
0answers
354 views
Angularjs stream ajax responses?
The following service repeatedly queries urlToStream with paging parameters and appends the results to an array in a scope (passed in as a parameter). It works but feels dirty (not the least of which ...
1
vote
0answers
709 views
AngularJS directive that manually transcludes content and has isolated scope
I would like to hear the opinion of more experienced AngularJS developers on whether the following directive is best practice...
I was trying to make to make a directive that will include HTML that:
...
0
votes
0answers
175 views
Broadcast event in angularJS
$scope.unreserve = function () {
var params = {
'wishlist_product_id' : product.wishlist_product_id
};
WishlistService.unreserve(params, function (data) {
if (data.success) ...
0
votes
1answer
664 views
Angular Checkbox Filtering
I'm very new to Angular, and trying to get my head around whether or not I'm doing it the Right Way (tm).
I want to filter a set of results by their properties, where if none of the filters are ...