Tagged Questions
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Whatever(MV*) capability and reduce the amount of JavaScript needed to make web applications functional. These types of apps are also frequently known as Single-Page Applications.
0
votes
0answers
6 views
Angular $resource - Data not being returned
I am quite beginner level with both JS and Angular, and I am trying to return data from an API and store it in $scope.
Once I've stored it, I want to loop over each item and output it into the page, ...
0
votes
0answers
7 views
Remove AngularJS attribute after initialize app
Is there any way to clean up the ng-* attributes after Angular initialization done and make HTML clean?
<div class="element-wp" ng-controller="SampleController as smCtrl"></div>
And ...
0
votes
0answers
7 views
angularjs ng--show is not working as expected
I am getting wrong behaviour with my ng-show directives.
<span class="spanLabel" ng-show="!minimumCharactersMet()" >You need at least {{ howManyMoreCharactersNeeded() }} characters ...
0
votes
0answers
7 views
Using formular in ui-view angular
I'm using a SinglePage-Application with one controller and three ui-view templates inside.
Here the HTML:
<div class="ng-scope" ng-controller="gameController">
<div ...
0
votes
0answers
3 views
AngularJS Comet app two way inter-module communication
I have a large complex AngularJS Comet application. Clients send data to the server, and also receive notifications from the server about events other users have initiated.
In its simplest form, the ...
0
votes
1answer
32 views
In AngularJS, how does $scope get passed to scope?
I'm a bit confused with the use of $scope in controllers and of scope in directives. Please verify if my understanding is correct (and also provide some alternative ways how to do this).
Let's say I ...
0
votes
0answers
6 views
What is the equivalent for directive, compile (pre/post) in TypeScript?
I have a question what is the equivalent for directive: compile (pre/post)?
Example in javascript:
angular.module('app').directive('checkBox', function () {
return {
//... my directive ...
0
votes
0answers
15 views
AngularJS filtering by object prototype function
I would like to filter an ng-repeat using a function defined on the repeat item's prototype, but I can't find any reference saying whether this is actually possible. Something like
<div ...
0
votes
0answers
6 views
Angular-translate use() is not working
I am using the angular-translate directive.
I got from the server a message and i need to translate it.
For example:
Original sentence:
"<b>Dispatcher Number one $CREATED_NEW_INCIDENT$ ...
0
votes
0answers
12 views
controller as syntax for data in the html
I use the angular ui-grid and the data for each row is bound below way.
Now I would like to know has angular kind of a controller as syntax for data in the html?
Or is there a workaround?
<div ...
1
vote
1answer
24 views
Unable to use angular-summernote
I am using Summernote Angular directive. However, for some reason it is not working.
Problem:
It is unable to identify the summarnote function...
<summernote code="text"></summernote>
...
0
votes
1answer
11 views
mean.io angularjs bootstrap modal 404 not found
Hi I have the following code in my controller
$scope.openModal = function () {
var modalInstance = $modal.open({
templateUrl: '/packages/system/public/views/nuggetModal.html',
...
0
votes
0answers
11 views
Angularjs testing routes with Karma
In my config of angular I had set the otherwise to redirect to a specific location, lets say /test so I want to write a test about that, I wrote something like:
it("should have a working otherwise ...
0
votes
2answers
19 views
Stop Angular from listing all from database?
I have a simple Angular Script which works like ajax to return search results, but when I don't type anything into the search box, it lists all of the data in the data base, how do I stop this?
My ...
0
votes
0answers
21 views
Parsing RSS in JS without tierce service (vanilla JS or Angular)
I want to recover an RSS feed in JS.
I looked-up on the web a whole day, and found that nearly everybody use google feed API, Yahoo API, or a nodejs/php page for the computing and Jsonification. And ...
0
votes
0answers
13 views
$scope.ons.navigator.pushPage not work in init method
I am following init function in app.js
$scope.init = function ()
{
if(localStorage.getItem("id")!=null && localStorage.getItem("pass")!=null)
{
...
1
vote
0answers
25 views
AngularJs Directive to add Attributes, the events are not triggered
Good morning everybody,
I'm a bit stuck on this directive, what I want is to receive a JSON string from the getProperties function like:
{"class":"someclass","ng-change":"someChange()",ng-click": ...
1
vote
1answer
10 views
Angularjs $http.post gives 401 error response . Laravel with oauth2-server
I am using oauth2-server-laravel package with angularjs as client. I have implemented it's password method which works fine for GET requests.
When I try to do a $http.post on a secure link. It gives ...
0
votes
0answers
8 views
Jasmine - Instantiate angular factory that accepts arguments
I have a factory i'm trying to test in Jasmine. It looks like this:
angular.module('myApp').factory("TestObject", function() {
function TestObject(name,description) {
this.name = name;
...
1
vote
2answers
29 views
Angularjs vs SEO vs pushState
After reading this thread I decided to use pushstate api in my angularjs application which is fully API-based (independent frontend and independent backend).
Here is my test site: ...
0
votes
0answers
33 views
AngularJS view not updating when model changes
I have a $rootScope variable like this:
$rootScope.queue = {'A1':{'Name':'John','ID':'A1'},'A2':{'Name':'Anna','ID':'A2'}};
In my controller I have a function like this where update is an object ...
0
votes
2answers
24 views
AngularJs updating the URL for $http method dynamically
So I am trying to make an infinite scroll in Angular. The data items I want to show on my page are being served by a third party API and the URL looks like:
...
0
votes
0answers
11 views
Extending AngularJS plugins
For a project I had to add custom behavior to UI Bootstrap's Datepicker.
I had to add new key-value pairs to the datepickerConfig constant, had to do some simple changes in the DatepickerController, ...
0
votes
0answers
10 views
Angular UI Router pausing before child state controller execution
I know that a child state / controller can wait for needed async results by adding a promise object to the the resolve object in its state description object. But using this means that the decision of ...
0
votes
1answer
15 views
Pulling data from the same json file with multiple controllers in Angular?
I'm kind of a noob to angularJS, as I just started the other day. I have a fairly simple question...
So say if I had multiple controllers that needs to pull data from one single JSON file, I would ...
-1
votes
0answers
15 views
Creating custom HTML controls using AngularJS
I would like to leverage AngularJS' directives to create a custom control that can be plugged into a website. Something like this, consuming site that wants the control adds a script tag, a data ...
0
votes
1answer
13 views
AngularJs + Soket.Io - Socket initialization
I have successfully implemented the chatroom in angularjs using node + socket.io
But hope you guys can help me, I am stuck in a situation where I listen to the socket on the clientside
...
-2
votes
3answers
38 views
Is it possible to make a function not return until a condition is met?
My problem is pretty simple and I think lot of programmers already must have faced this.
I am using angularjs and my javascript looks as follow:
controller('myController', function())
{
...
0
votes
0answers
4 views
Connecting angular-ui-grid to an angular-ui-modal with ngResource as a data provider. Is it supposed to be this hard?
I have been trying to get these three pieces to work together. I am allergic to $scope, so I am trying to use controllerAs and object oriented controllers where ever I can. I have a working sample, ...
0
votes
1answer
18 views
How do I assoicate two JSON objects together in AngularJS
For example
The app allows a UserAcount to upload an Image, and post it and then other people would be able to comment on it.
I would have two different objects right? One for UserAccount and one for ...
0
votes
1answer
21 views
How to access elements attributes from custom directive while keeping access to parent scope?
Essentially I want to be able to access the parent scope of the directive I have created, but I also want to be able to access the attributes that I have placed onto the element.
For example ...
-1
votes
0answers
12 views
How do I update a filtered array in an AngularJS directive?
I'm new to AngularJS. I've built a directive that uses an Isolate Scope (=) on an array called "todos". I then filter the todos array, and call it filteredArray. My "todos" element is updated using ...
0
votes
3answers
25 views
How do I inherit behaviour of another directive in AngularJS?
This is really a rather generic question, but as people on IRC appeared to have issues understanding what I was trying to do, I've provided some rather specific information in this post. The answer ...
1
vote
1answer
20 views
Is there a way to pass multiple functions to an AngularJS directive?
I am building a dropdown menu directive which allows you to optionally attach a function to each item in the list. I know how to pass one function per attribute into the directive, but I'm hoping that ...
0
votes
1answer
11 views
Using scope variables with non-form elements
If I have 2 divs (removed ng-click function for simplicity)
<div ng-class="{selected: header.type == 'percent'}" data-type="percent"></div>
<div ng-class="{selected: header.type == ...
1
vote
0answers
15 views
AngularJS: Directive Scope is not getting $destroy called
Been searching for awhile in the archives and on the 'net for an answer, but not really finding one, just bits and pieces. Seems there's a lot of suggested posts, but none of those have the answer.
I ...
1
vote
1answer
21 views
ngOptions compare by value
I have a webserver (node.js) that serves a JSON file containing a list of languages in the following format: { "en" : "English", "fr" : "French" } (and so on). And a separate JSON that is dictionary ...
0
votes
2answers
20 views
$scope array and $scope.$apply in angularjs
I'm learning AngularJs and I'm facing a problem.
I want to show an array of items in a view. First in the controller I define the array using $scope.arrName = [], then I receive data from a third ...
1
vote
1answer
27 views
How to correctly develop this with Angular?
Hi this is my first question and I'm not really sure how to formulate it properly but here it goes:
I have this piece of code that correctly populates my container:
<div class="container" >
...
0
votes
1answer
21 views
ng-view or controller is not working
I'm trying to build a little web-app with AngularJS.
I have an index.html at root directory and 3 other html pages in html subdirectory
login.html
list.html
detail.html
At the first time, the ...
0
votes
1answer
18 views
AngularJS Rails User Sign Up without Devise
I am trying to create a sign up flow with Angular client sending user inputs to the server via the $resource service. The User model on the Rails side has a has_secure_password, password_digest field ...
1
vote
1answer
21 views
How to use multiple classes with ng-class?
I have a layer with ng-class, and I need to use user.status with ng-class. and I have another class that I want to bind on the same layer.
<div ng-class="user.status, 'locked':(user.active === ...
0
votes
0answers
8 views
How to do validation in $ionicPopup?
I'm trying to use $ionicPopup to handle login/registration on my app.
I'm opening it from a service, so I created a new scope and attached it to the ionicPopup.
It looks smth like this:
...
0
votes
0answers
23 views
sockets.io using eronious websocket adress
So for some reason the web socket address is the head of my html in URL form and on load socket.io fails to connect. In the JavaScript console I get this output;
WebSocket connection to ...
0
votes
0answers
11 views
Binding to selected data in new view with UI-Router
I am building an application that uses ui-router. On my /teams route I have a form where a user can add a team name which then pushes the name to my MongoDB and binds to the view and displays the team ...
0
votes
1answer
12 views
how to set angular modal custom height and width
I have found a way to change the width of a angular modal, how ever I can not figure out how to set the height I want. I need the modal to be 400px width, 400px height. also I need to reposition it so ...
0
votes
2answers
36 views
Sticky footer not sticking in AngularJS
Im working an angular site and im trying to implement a sticky footer across all views but the footer stops sticking when content exceeds the size of the window and the scrollbar appears. I've tried a ...
0
votes
0answers
8 views
AngularJS + require.js + routing: how to build for scalability?
I've been researching using Google for a few days now. Going in circles, maybe someone with experience could give me a few pointers on the concepts.
Scope:
Need a scalable mobile site using ...
0
votes
0answers
18 views
File not being sent to server using Angular JS File Upload
I am using the angular-file-upload directive in my app and I am unable to upload a single file with it to my server.
Relevant HTML:
<!DOCTYPE html>
<html lang="en" ...
0
votes
1answer
40 views
How can I improve the performance of this directive that transitions opacity on scroll?
I've been working on improving this directive for a few hours now but can't seem to take it much further. Can anyone recommend further improvements?
.directive("scrollFade", function($window) {
...