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
5 views
Wrapper directive and class duplication
I just want to make a directive to wrap an element. I've tried with this one:
.directive('wrap', function() {
return {
restrict: 'A',
replace: true,
transclude: 'element',
template: ...
0
votes
0answers
5 views
AngularJS ng-class cannot override Bootstrap dropdown CSS rules
Using AngularJS-1.2.26 directive ng-class, am attempting to override Bootstrap 3.2 CSS rules for dropdown-menu & dropdown-header, but my new font-size, padding, margin are not effecting html ...
0
votes
0answers
3 views
How to trigger bootstrap popover focus in karma test
Button to trigger the popover:
<a href="javascript:void(0)"
id="popover-button"
class="btn btn-default"
data-content-template="popover.html"
data-placement="bottom-left"
...
0
votes
0answers
8 views
how to reflect change in URL without adding reloadOnSearch:false to all routes
I recently added i18n to my site, and I want the selected language to reflect on the URL.
So I added $location.search('lang', language); in my code.
however - now every page I enter refresh. so I ...
0
votes
0answers
3 views
Passport.js Google authentication returns blank error
Trying to use passport.js in my Angular app to use google authentication.
The way I have my express endpoints set up is:
app.set('client-google-signin-path', '/google');
app.route('/auth/google')
...
0
votes
0answers
2 views
angular cordova app connecting via SSL through self-signed cert fails…but only for WP8?
I have a cordova application built using angularjs, which connects to a server via SSL. The server in question has a self-signed certificate, and yes I have read this post on that subject. The weird ...
0
votes
3answers
23 views
How to make separate copy of JSON and stop it from getting modified in angularjs?
Either I am making a blunder here, or might be misusing Angularjs. I want to make a copy of JSON on page load,create form using original one ,and on submit button press ,I will compare these 2 JSONs ...
0
votes
1answer
14 views
How to create a directive to only number only fields without ng model
I am using this angular directive to allow only numeric input in a text box. Here is a jsfiddle to it : http://jsfiddle.net/vfsHX/673/
This works. However it required ng model, my issue is that I ...
0
votes
0answers
14 views
AngularJS adds and encodes double quotes around a date
I noticed something with AngularJS 1.2.26 as I was trying to pass a date to a REST service.
The url of the request is showing encoded quotes around the date parameter.
The date is created with a ...
0
votes
1answer
13 views
how to hide and show list in angular js
I make a demo of filter.It is working fine.Now I need to make autocomplete with same code or logic .My list is display whole time when I run the project.I need to show list when user enter text in ...
0
votes
0answers
11 views
$q, deferred and partial application
So I'm wondering why this doesn't work as expected:
fn = ->
dfrd = $q.defer()
$timeout ->
dfrd.resolve({foo:'bar'})
,1000
return dfrd.promise
displayData = (data)->
...
2
votes
1answer
11 views
Getting $injector:modulerr after including ['ngRoute']
Having a $injector:modulerr error after including ngRoute. Using AngularJS 1.2.26
var app = angular.module('myApp', ['ngRoute']);
app.config(function ($routeProvider) {
$routeProvider.when('/', ...
0
votes
2answers
19 views
AngularJS Error :Module 'ngResource' is not available! You either misspelled the module name or forgot to load it
I'm trying to make a service call from angular js. I downloaded the angular seed project.And inside the view1.js wrote the following code to call the service:
'use strict';
...
0
votes
1answer
13 views
chaining multiple http calls against a loop
I've found all kinds of useful posts/info about $q, $q.all, and chaining in general, but I haven't found any examples of my exact issue, so I'm wondering whether what I want to do is even possible. ...
0
votes
1answer
14 views
creating a function in for-loop with index [duplicate]
I am trying to create an object in a for loop , and add a click function in the loop which can call another function and pass in the index - so that I know which object it was that was clicked. Here ...
0
votes
2answers
16 views
Angular Unit Test with $rootScope.$on(“name”)
With Mocha and Jasmine, I am trying to unit test this service:
angular.module("main.loadbalancer").run(function($rootScope, $state, DeviceVal) {
$rootScope.$on("$stateChangeStart", ...
0
votes
1answer
20 views
How can I access element properties from an AngularJS controller
I have the follow HTML code:
<form ng-submit="login()" novalidate>
<div class="row">
<div class="col-xs-12">
<input type="email"
...
0
votes
2answers
13 views
Removing part of a filter with selects
I am new to angularjs and I'm attempting to filter a table populated by an array.
In the table: ng-repeat="item in exampleArray | filter: query"
query is composed of two selects:
<select ...
0
votes
1answer
16 views
AngularJS loading different views through routes
I want to display two pages, but use a base layout. I have it somewhat working with the following:
index.html
<html data-ng-app="myApp">
<head>
<link rel="stylesheet" ...
0
votes
1answer
35 views
How to pass special characters in a function
I am fairly new to angular, I am working on a POC of how to use modal in my application. Here is what I am doing:
I have controller which declares a function called open in the scope. The function ...
0
votes
0answers
13 views
Angularjs and Chrome extension DOM manipulation conflict
I am building a sign in form using Angular and am also using a Chrome extension called Password Hasher Plus. The extension works by replacing the data in the password input field with the a hashed ...
0
votes
2answers
16 views
Mongoose schema for Multi-User application
I need to make schema for a multi user application I need to develop using MongoDB, Express, AngularJS and NodeJS. I have 4 types of users in that application, GUEST, REGISTERED_USER, SUBSCRIBER, ...
3
votes
1answer
16 views
Error thrown when $watch an object with circular references
When $watch an object with circular references, e.g. x.y = y; y.x = x;
An error: too much recursion is thrown. See the code below.
How to custom the $watch behavior? or create a custom 'equals()' ...
0
votes
2answers
21 views
Angularjs orderBy sorting issues - ie, sorts 10 before 8
I'm working on this app that is supposed to sort py IP address, so to get around issues of soring by what is essentially a string I break the IP address into octets and attempt to sort by each octect ...
-3
votes
0answers
14 views
'Advanced' Intro to AngularDart?
Now that AngularDart tagged 1.0, I would like someone to give me an intro for an experienced AngularJS developer. Or you can also provide some useful links. Again, relevant for the busy AngularJS guy.
...
-1
votes
1answer
10 views
Accommodating multiple states through $stateprovider in one $resource in angularjs?
I have a requirement where the angularjs states for one particular page would be different. Say, /items/create and /items/list -- those 2 are my urls for 2 different states. Now, how do I accommodate ...
3
votes
3answers
41 views
Repeating a set of <td>s in the same table row using AngularJS
I want to create a table that, in its header, contains the names of each player for two teams in each . The scope has a variable teams which is a list of Team objects, each one having list of Player ...
0
votes
1answer
37 views
jQuery cannot find elements unless I put a timeout
For some reason when I try and select an element from the page it only works if I put a timeout of 0 milliseconds. If I don't put the timeout it just returns what is there before the Ionic framework ...
0
votes
1answer
19 views
Multiple ajax calls to services or one to aggregate
I have a single page application and with have a backend json api for it. Right now in order to render a page with make multiple ajax requests to different parts of the api and then combine the data ...
0
votes
0answers
21 views
Not sure what I'm doing wrong in this Rails Angular app
I am trying to integrate Angular into an existing Rails app.
I only want Angular in the authenticated portions of my app. user_profile, etc
I'm loosely following this post:
...
-1
votes
1answer
11 views
Parsing huge JSON object for facebook post
I am currently building an angular.js social media platform and am trying to display facebook posts on my feeds page for facebook. I currently have this:
<div id='fb-root'>
<div ...
0
votes
1answer
27 views
Preserving the object key value ordering when it is pushed into array
When elements in an object is ordered using filter and then pushed onto array it loses the ordering and uses alphabetical order of key how to preserve the ordering after inserting into array ?
...
0
votes
2answers
25 views
Trying to run a function after a promise fail in array
I have an array of promises and a function I need to call after the promises are complete. However, whenever a single promise fails out of the array, my $q.all(promise) will not launch the callback ...
-2
votes
1answer
27 views
Using AngularJS to fill form textfield with text in <a> link on same page
I am using AngularJS and it has one text form field on the page.
On the right hand side, I have a series of text links.
Whenever the user clicks on one of the text links, I would like the ...
1
vote
0answers
20 views
How to Test Value Returned in Promise from AngularJS Controller with Jasmine?
I have a controller that expose a function that returns some text after a rest call. It works fine, but I'm having trouble testing it with Jasmine. The code inside the promise handler in the test ...
0
votes
0answers
20 views
How to reset validation with angular on reset?
In our angular application we have a form with validation and a reset button. We based it off of the examples in the documentation: https://docs.angularjs.org/guide/forms
The trouble happens when ...
0
votes
1answer
24 views
AngularJS 'scrollTop' equivalent?
I'm looking to implement something similar to this in an AngularJS directive:
https://github.com/geniuscarrier/scrollToTop/blob/master/jquery.scrollToTop.js
It's fairly straightforward, when you are ...
0
votes
0answers
25 views
jsonp GET request 404 Error
I'm using Nodejs, Socket.io, and Angular to build a web app taking advantage of the Instagram Real-Time API. I'm running into an issue when I fire off GET requests to the Instagram API.
I get this ...
0
votes
1answer
21 views
Angular.js html5mode(true) and normal anchor href links?
I am using html5mode(true) in angular which makes the following address
localhost/#/bla to localhost/bla which is fantastic!
Only problem is that when I go directly to localhost/bla i just get html ...
0
votes
0answers
4 views
Sidewaffle template controller not executing / throws javascript error
I created a new controller using sidewaffle. I changed the name of the module to match that of my module. The console.log statement is not getting executed.
Should it be executed when the router ...
0
votes
0answers
8 views
angular testing with karma gives error with CSRF fix
I am trying to run some tests with karma of my angular code. I have a block that deals with setting the CSRF token so it can play nice with Rails. This code works when running the server and using ...
0
votes
0answers
14 views
Angular SPA for only authenticated portions of the site
I am thinking of adding AngularJS to a project I'm working on.
To avoid dealing with SEO issues I think I just want the single page app experience for authenticated users on pages where SEO is not ...
0
votes
0answers
13 views
How to set column height to include full window and all content using angular?
How can I set the height of a column to be the height of the window and all of it's containing content. I've tried a bunch of solutions (css, jquery, javascript) but none of them seem to work for me.
...
0
votes
1answer
20 views
ng-pattern dynamic object property
I have the following in an input and it works fine
ng-pattern="/^\d{0,9}(\.\d{1,3})?$/">
I also get the same pattern via a JSON object under validation.decfield but if I do this.
...
0
votes
1answer
20 views
Angular directive for editing hidden JSON input
I want to create an angular directive which I can apply to a hidden input field. Basically, the hidden input contains a JSON string. I want to create some custom controls with JS which modify the ...
0
votes
2answers
63 views
how to create synchronous using $http in angular.js?
I am beginner in java script and does not understand how to create synchronous Ajax call using $http object if anybody have idea please guide me, how i can make Ajax call by $http sychronously
my ...
3
votes
1answer
26 views
Keep boolean toggle state on navigation in angularjs
I have a checkbox that toggles an image in a list in angularjs. The toggle shows images when clicked. However when i navigate to other views and then return to the list view the toggle state for the ...
1
vote
2answers
32 views
Storage method while learning angularjs
I'm currently learning angularjs and trying to build a listapp.
I'm struggling with deciding which method of storage I should be using while building the prototype.
Currently I'm using an object ...
-1
votes
0answers
13 views
Undefined ng-model value
I just installed yeoman in my OSX (yosemite). The versions of the software I am trying is:
shell#> node --version && npm --version && yo --version && bower --version ...
-2
votes
0answers
47 views
TypeError: Cannot set property [ ] of undefined + AngularJS
Im following a tutorial and having this error on F12. I have done some research on it but unable to identify the problem as im quite new to programming.
Appreciate some help! Thanks.
TypeError: ...