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
1
vote
0answers
15 views
Angular ui.route
I'm new to ui.router in Angular and have to build an app, which contains a header, sidebar (off-canvas), feedback area (save successful and warnings area) and a content area.
I thought it would be ...
2
votes
0answers
58 views
Basic and simple view, add, edit and delete functionality
I want to know what needs to improve with my application. Maybe there is a better way instead of what I am using currently.
index.html:
...
3
votes
1answer
1k views
Sign-up wizard structure seems too repetitive
I think my current structure is way too repetitive. I feel like I must be missing something that would easily make this sign up wizard work far better.
...
1
vote
0answers
34 views
A notification / interception implementation for AngularJS
I was in need of a thing that is able to inform my users about recent activities as well as intercept any action with a modal (e.g for undo purposes)
I decided that I will go for an independent ...
1
vote
0answers
32 views
Good practices with Angular Google Maps directives and JavaScript
Is this code good practice? What kind of design pattern should I use for this specific situation?
The following function creates a new marker on a map. It sets a new image for it, except when the ...
1
vote
0answers
36 views
Angular.js directive for a vehicle model selector
I'm looking to take my JS skills to the next level - please be harsh...
...
3
votes
0answers
76 views
AngularJS Todo List - too much controller logic?
I am starting an angular app and I was wondering if I am on the right track with this. I worked on my last angular app when I was just a youngun who didn't understand the important of designing the ...
2
votes
0answers
414 views
An Object-Oriented Programming pattern for AngularJS models using CoffeeScript classes
Over the past week, we tried to make our AngularJS model layer more powerful and reduce complexity in our controllers and template by using the object-oriented programming pattern and the CoffeeScript ...
6
votes
1answer
156 views
Angular dropdown
I have created this little dropdown directive in Angular. The idea is that you create a nav element with a ul inside. The directive prepends a chevron and toggles ...
2
votes
2answers
70 views
Adding to an array, adding to an existing index if it exists
So I have this rather large function, which adds to an array. What it also does is searches the array to see if the item already exists and adds to the quantity if it does. If ...
2
votes
0answers
43 views
Am I using Angular directives correctly?
I'm coming from Backbone and trying to wrap my head around Angular for a new project and would like to get some feedback on whether I'm using it correctly or not.
Plunker: ...
2
votes
0answers
118 views
AngularJS with global data and “service” / using $watch on $rootScope
I am currently learning angular.js.
The following is an example I came up with. The goal:
An editor for a dict, the dict format is: {key: [type, data]}
A view of the same data
The "type" should be ...
1
vote
0answers
53 views
AngularJS constants depending on other constants - any established patterns?
I'd like to be able to define Angular constants in terms of other constants.
It's not possible to inject dependencies into Angular constant services. When I want ...
2
votes
1answer
42 views
Filling two angular $scope variables with data
I'm unsure about how to simplify this method properly. The method is basically responsible to allocate data.
The response object is a collection of objects. Each object contains an attribute called ...
0
votes
0answers
28 views
$promise pattern that initializes a value
Use Case
I've got some code where this pattern is kind of common and I'm looking for a cleaner solution to this. Here is the pseudo-code for this method call:
If some value not initialized:
get a ...
1
vote
0answers
33 views
Factories and constructors in Angular?
I've got some constructors and a factory class that I would like to use in an Angular project. I would like to know how I can convert these to usable Angular services for my project.
Process ...
0
votes
1answer
130 views
Angular version of FitText
This project has evolved a lot since I started learning Angular. I'm pretty happy with it now, and I'm wondering if there's anything I can improve upon, or have forgotten at this point...
HTML
...
6
votes
1answer
207 views
Improvements to an Angular ScrollSpy module
Things that I'm not sure about:
Whether this works in all use cases - alongside routing and within templates etc
Am I polluting the scope with all these variables? This seems to be the easiest way ...
2
votes
2answers
6k views
Creating a simple login with AngularJS
I'm brand new to AngularJS. I would like advice as to whether I'm approaching the design of a simple login section of an app built with Angular correctly.
The app consists of two view partials: ...
3
votes
1answer
57 views
Controller structure for a browser game module with filters and pagination
To get an idea of what the controller code reflects, here is a screenshot:
Basically, the idea is that you print out a list of football players which you can then filter by their name, price, field ...
4
votes
2answers
618 views
Simplifying an AngularJs directive that counts the number of characters entered in a textarea
I am trying to implement an AngularJs directive that would count the number of characters entered into a textarea and display it to the user.
Note: it will actually become much more complex later on ...
3
votes
1answer
535 views
AngularJS Tab Control
I'm experimenting with angular directives, and as a proof of concept I wanted to create a basic tab control. I'd like to know if anything can be changed to be more fluid, or if I'm doing things ...
5
votes
1answer
62 views
AngularFire Tic Tac Toe Game
I am building a Tic Tac Toe game with AngularJS and making it online playable with AngularFire. The Tic Tac Toe logic is all there so this question concerns Angularfire a little bit more. I want to ...
1
vote
0answers
200 views
Implementing “day wise task management” system using Django and AngularJS
I have a Task model in Django which looks like the following:
...
4
votes
1answer
113 views
Angular promise in service
I'm new with Angular promise and I would like to know how to improve my code.
I have a service which preload media or data by calling an API.
The media API return an array of urls to preload.
...
1
vote
0answers
74 views
Angular directive with use of scope.$parent and $timeout
For the over eager people: check out this plunker
I create a directive which has to add buttons on top of input fields, to select the language you want to input.
This is used on forms, such as a ...
4
votes
1answer
2k 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:
...
2
votes
0answers
83 views
Building a set of AngularJS directives to provide the user information about their input
I am trying to create an AngularJS directive that will give information to the user about the text they are inputting such as the number of characters they must or may enter and so on and so forth.
...
3
votes
1answer
211 views
Bootstrap/bind click event over ngClick
I am working on angularjs, and I have created some directives with bunch of HTML elements within its templates. I have assigned a controller for those directives. Below is my code snippet:
...
4
votes
1answer
44 views
Segment builder
I'm writing a pretty complicated piece of UI with angularjs. I've been using angular for about 2 weeks. I'm going to post the controllers I feel are the most confusing to read, and am wondering the ...
3
votes
2answers
328 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 ...
3
votes
1answer
2k views
Dynamic routing with lazy load controllers
While trying to create an "admin" backend (to allow for CMS like functionality) to a site using AngularJS on the frontend, I came across an issue with routes.
In order to allow the admin to create ...
0
votes
1answer
785 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, ...
4
votes
1answer
62 views
Angular Modular File Structure
My intention is to separate components on a file basis. For example, I want a specific controller to have it's own file (Same goes with services, filters and directives). Of course, files will be ...
1
vote
0answers
355 views
Angular JS photo app for personal cloud
I've been working on my first Angular JS app for the past few days.
It's in a very early stage (no real functionality), but that will only make it easier to review what IS there.
The client side is ...
1
vote
0answers
1k views
AngularJS bookviewer directive written with Typescript and Angular-ui bootstrap
I have been working for weeks on a "BookViewer" AngularJS directive. I would like to write some blog posts on the lessons I learned in writing the directive. Before doing this I would like to ask for ...
4
votes
1answer
477 views
Angularjs extends service
As usual I'm wondering if there is a better way to do:
(The code extends a angular service)
...
6
votes
1answer
1k views
Angular JS Switcharoo multiple select module
I have created a script for going a multiple select option in Angular without using a select box that you have to hold control in order to select multiple items.
...
2
votes
1answer
196 views
Angularjs Module Registration Structure
I'm using meteor and angular. Since I can't add modules after the angular bootstrap, I made a workaround and somewhat not satisfied with the way it was coded.
How can I improve this?:
...
1
vote
1answer
199 views
0
votes
0answers
321 views
My first OSS software AngularJS drag/drop
I just posted some AngularJS directives to my GitHub account. I think they are both useful and easy, and this is my first attempt at publishing OSS. I would love some feedback on the documentation, ...
3
votes
1answer
71 views
Structuring a reusable angular component with multiple communicating directives
I have a nested JSON of multiple levels. The last level has the "series data" that is to be added to the highcharts options to render the chart data of interest.
I am sniffing the JSON and populating ...
6
votes
1answer
177 views
AngularJs and Google Bot experiment
I have learned the question of solving Angular app optimization for search engines, and was frustrated that the most recommended option is prerendering html.
After some time spent, I suggested to ...
2
votes
0answers
2k views
Dynamically generating a HTML option list using Angular.js
I used step 4 from the Angular tutorial to do some tinkering of my own. In that particular step of the tutorial, a option list is created that determines how a list ...
6
votes
1answer
281 views
Open source angularjs pouchdb model persistence layer - release ready?
I'm considering releasing a library as a bower module. Are there issues with code quality, missing test cases, that need to be addressed first? Perhaps it's not a good candidate for public release. ...
1
vote
1answer
410 views
4
votes
1answer
47 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 ...
0
votes
0answers
90 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
141 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.
...
1
vote
1answer
141 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 ...