Tagged Questions
0
votes
1answer
13 views
How inject $stateProvider in angular application?
I try to use angular-ui, and try to inject $stateProvider:
html
<!DOCTYPE html>
<html>
<head>
<script ...
0
votes
0answers
5 views
Angular.js move animation
I'm having hard time creating a rather simple move animation.
The effect I want to achieve is similar to this http://jsbin.com/vorub/1/edit?output (which I took from some other SO question).
Now I ...
0
votes
0answers
13 views
AngularJS: Is it possible to use ngAnimate inside a nested repeater?
In AngularJS 1.2+, with ngAnimate, it is very easy to display a list of item one by one with animation.
However, I have some trouble apply the same method to a nested array.
Let's say I have a 3x3 ...
0
votes
2answers
18 views
AngularJs + ui.bootstrap.Modal not working properly?
I am trying to fetch whatever I type inside modal; on main body, but it is not happening, somehow one way data binding is running.
Here's my plunker : ...
0
votes
2answers
17 views
How to redirect root page to another url in angularjs
I want my app to start with www.abc.com/#!/abc currently when I type www.abc.com it redirects to www.abc.com/#!. Following are my index.html
<!-- views/index.html -->
<section ...
0
votes
0answers
9 views
ionic change location won't work
i'm new in ionic ( just a little less in angularjs ) .
i'm trying to do a simple switch between two views:
HTML
<body ng-app="starter" animation="slide-left-right-ios7">
<!--
...
0
votes
2answers
15 views
angularjs service function invoke itself
I want to create a startService function in angularjs service (factory).
I want to startService function check if it can start service and if not it will invoke itself with a timeout and than checks ...
0
votes
3answers
30 views
Angularjs ng-class class order/precedence
EDIT:It turns out to be a confusion on my side, pls see my own answer.
I came across a strange behavior when attempting to reorder the precedence of multiple classes in ng-class.
...
-1
votes
2answers
10 views
Angularjs and Requirejs promises
I use RequireJS with AngularJS for lazy loading. it works correctly but my view appear before fetching data from database. what is the problem? How can I solve this problem?
0
votes
0answers
11 views
NVD3 Angular Directive callback firing too soon
I've recently started using NVD3's great angular directives for constructing D3 charts. Indeed they are slick. However I'm having a lot of difficulties with callbacks. Callbacks work well enough when ...
0
votes
0answers
9 views
AngularJS $timeout freezes during refresh No New Data Uploaded
I'm trying to make a simple feed where you traditionally pull down to refresh latest content, and scroll down to view old content.
THE PROBLEM: I want to delay for 1 second, push content to the front ...
0
votes
0answers
19 views
Angularjs currency formatting in input box
Hi! I have the following input box :
<div ng-repeat="item in items"
<input ng-model="item.cost" />
</div>
I am trying to figure out how to apply "currency" filter to the input ...
0
votes
0answers
18 views
Replace ng-view html content in AngularJS
I have a form inside ng-view, which get submit with $http call, i get html in response of the form submit. I want to replace ng-view content with the response html. Is it possible?
formSubmit($event, ...
0
votes
0answers
14 views
cannot display google map markers in clustors with jade
intro:
I initially set up a rails application that managed the asset pipeline and installed the angular-google-maps dependency (see gemfile). I used slim for the html, and this is the code I had to ...
1
vote
1answer
13 views
How to conditionally set ng-options for Angular JS?
Use case:
I have a web form, a user can select a category, and upon the selected one a <select> with proper subcategories will be shown.
Now I'm using ng-if directive per each case so the ...
0
votes
0answers
13 views
How to access input elements through the angularjs forms collection that are encapsulated in a directive
I need to access input elements of a forms collection to do some custom validation. This worked just fine like this:
scope.myForm.value3.$setValidity('complex', valid);
until I converted value3 into ...
0
votes
0answers
21 views
two way binding in angularjs transcluded content
Why doesn't the two way binding work in the following directive?
Module:
angular.module('main')
.controller('MainController', ['$scope', 'TestService', function ($scope, TestService) {
...
1
vote
1answer
19 views
Relating routing and navigation styles with AngularJS
Say you have a basic router set up in Angular as follows:
app.config(function($routeProvider) {
$routeProvider.when('/', {
redirectTo: "/news"
}).when('/news', {
templateUrl: ...
1
vote
1answer
10 views
Service object wrongly typed for angular directive in Typescript
Below is typescript for an angular directive. The problem is with the injected service "datacontext". The debugger shows that the datacontext in the constructor is a WINDOW object, not the ...
0
votes
1answer
34 views
Custom filter not working
I'm experimenting with custom filters and for the life of me I can't get this to work. Its a very basic filter on an ng:repeat that returns the data unaltered. As you can see the table does not ...
1
vote
0answers
7 views
AngularJS jQuery ui-sortable inside an iframe cannot connectWith other sortable
Problem:
I'm trying to make the jquery sortable (angular-ui ui-sortable) work inside an iFrame and it doesn't seem to behave the way it should be.
Scenario.
When trying to click and drag elements ...
0
votes
3answers
44 views
What's the best way to debug Javascript/AngularJS?
I just started learning Javascript and AngularJS and have a decent Java and C++ background.
Today I wasted an entire day debugging a trivial error that boiled down to a missing comma in a JSON file: ...
0
votes
0answers
20 views
How to check if URL is reachable with angularJS?
I want to check if customer parse some url if it actually contains any kind of data, so i don't have to take care of "broken" links. i created a directive this far:
app.directive('urlCheck', ...
0
votes
0answers
17 views
Angularjs initialize multiple controllers at startup?
i have a normal navbar with a menuController, this is the parent.
then i have two other controllers a DashBoardController this is loaded on startup and a LoadDataController this is called if i click ...
0
votes
1answer
9 views
AngularJs: Passing search criteria from very large search form to service - create custom model?
I have an app with a very large search form (around 45 inputs) and I'm struggling trying to figure out how to best code this up in AngularJS. I've just begun working with Angular, so this may be ...
0
votes
1answer
22 views
Problems loading content dinamically in a SELECT FIELD [ANGULAR JS]
Hello thanks for help me. I have two select field, one select field for states, and other select for the cities. I am trying to load cities dinamically from the JSON generated in the server, when the ...
0
votes
0answers
9 views
AngularJS infinite scroll, not working only with chrome fullscreen
I am doing an infinite scroll on a ng-repeat, changing the limitTo value with a loadMore() function.
Here is the code :
Directive (found on a jsfiddle) :
angular.module('scroll', ...
1
vote
1answer
16 views
Production Node Application Can't Find SVG Files
In my local development application the svg files show up just fine with the following code (The curly brackets embed Angular.js variables):
<img ng-src="img/servant_{{servant.personality}}.svg" ...
0
votes
1answer
20 views
binding variables to compiled elements in angular Js
I am dynamically creating an element with angular. When the app initally runs using app.run() the element is created and I compile the element, after compiling the element I add an ng-show="active" ...
0
votes
1answer
17 views
AngularJS datalist pagination / infinity scroll on datalist?
I am using a datalist that loads data from a restful API, I want to add pagination in my datalist, I am using AngularJS:
<label>Query:</label>
<input list="data">
...
3
votes
2answers
44 views
While or for loop with $http.get
I would like to know if it's possible to use while or for with a nested call to $http.get:
This is an example:
for (var i = 0; i < $scope.comments.length; i++) {
alert($scope.comments[i].id); ...
0
votes
2answers
31 views
what do the parentheses accomplish around the assignment
More of a JavaScript question. But I ran into it while learning about Angular!
Why does the assignment to $scope.clock have curly braces? I took them out, it certainly doesn't produce a correct ...
0
votes
0answers
11 views
Angular httpBackend: No pending request to flush
I am trying to use the $httpBackend for testing my AngularJS application. However, it keeps telling me that I have no pending requests.
This is the test:
it('should attempt to get boards from ...
1
vote
2answers
20 views
Angularjs ngRoute uncaught object error
I'm getting an uncaught object error in my console when trying to load my angularjs app. I don't know if it's related to ng-route.js or not, but that's all the error tells me is uncaught object
...
1
vote
3answers
29 views
$rootscope.$on increases count on subscribers
I have an Angular controller, a fairly simple one:
angular.controller('appCtrl', function ($scope, $rootScope) {
$rootscope.$on('channel.message', function () {
// do stuff here
}
});
...
0
votes
2answers
26 views
Can $http.put write data to JSON file
I apologize for the newbie question but I am getting conflicting answers to this while searching on the net.
I have created an AngularJS app to read from a JSON file using $http.get and display the ...
0
votes
2answers
32 views
Angular $scope has push() as undefined
Here is my HTML:
<input ng-blur="CheckUser()" name="username" ng-model="RegisterFormData.username"
class="form-control"/>{{ a.check_username_result }}
...
0
votes
1answer
20 views
Declare multiple values in ng-init
So I'm wondering how I can declare multiple values within a single ng-init, without having to create some weird hash, that then I need to always access specifically.
so basically I would like
...
0
votes
0answers
35 views
How to empty browser cache after clicking logout
I use golang for my server side and angularjs for client.
When I logout of my application, the cache is still present.
How can I empty the complete cache at a button click?
0
votes
0answers
22 views
BlobStore upload URL works, but returns 404
I am attempting to upload pictures to google Blobstore using purely javascript. I have a REST api that I query to get the upload url. I grab the upload url and post using the following code:
<form ...
0
votes
1answer
24 views
Angular and Pouch DB in Factory
I am trying to load the pouchdb client database on start of the application from within a javascript file but the database does not get created. There are no console errors in the debugger. When I try ...
0
votes
2answers
34 views
Popover doesn't appear from directive added to view
I wanted to create a directive for the Bootstrap Popover feature.
Controller:
var app = angular.module('firstApp', ['ui.bootstrap']);
app.directive('popover', function() {
return ...
1
vote
2answers
29 views
How to set default value for scope variable in angularjs
I currently display a scope variable using the following code
<a data-ng-href="#!/params/{{first.second.status}}">{{first.second.status}}</a>
Sometimes first.second.status is null, ...
0
votes
1answer
29 views
Prevent jiggling when auto-adjusting width of text input
I managed to write an angular directive (I have extracted it to pure jQuery for this post) to auto-adjust the width of a text input.
However, it seems like the width of the input field is not ...
-2
votes
2answers
37 views
how do I find everything left of a certain character?
Is it possible to get everything from the left of a "/" in a templateURL string from angular routing.
For example:
var app = angular.module('demoApp', ['ngResource', 'ngRoute'], function ...
0
votes
1answer
50 views
ng-model is not getting updated on selection change in select
Hi I am new to angular so still struggling with basic things, here is a problem that I am facing. I have a few html elements that repeat with ng-repeat. One of the controls in it is a dropdown.
I ...
0
votes
1answer
25 views
When do functions request, requestError, response, responseError get invoked when intercepting HTTP request and response?
The documentation mentions you may define 4 functions for an interceptor and it says:
There are two kinds of interceptors (and two kinds of rejection interceptors):
request: interceptors get ...
-1
votes
0answers
14 views
Angularjs create dynamic values in a widget
I'm trying to create 3 widgets that will display data dynamically with Angularjs.
My data are in json and they are received in real time from a websocket connection.
i create a factory that gets my ...
-2
votes
1answer
30 views
Can somone please help me with ng-hide and ng-show
In this todo app, which is in angularjs, i need a help in hiding the button using ng-show and ng-hide derivative. when the text box is empty.
$scope.addTodo = function () {
if ...
2
votes
0answers
22 views
Originzational MVC and Angular keeping from injecting what I don't need
My problem is I have one ng-app. Does that mean I have to do dependency injection for plugins I may not be using on that given view? Example I bring in ngTagsInput does that mean I have to do it even ...