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
3 views
AngularJS - Using a few $parents for $broadcast
I have the following markup:
<div class="grandparent">
<div class="parent" ng-repeat="parent in parents">
<div class="child" ng-repeat="child in parent.children">
...
0
votes
1answer
12 views
How to add a style tag to the head using angularjs directive
Hi I am allowing users to specify whether they want to print reports in a landscape or portrait format.
I was wondering if it's possible to add this (see below) into the head of the web document ...
0
votes
0answers
7 views
Disable creating nested objects in django rest framework
Hi,
Can you help me how to disable creating nested objects ?
I have serializers like this:
(Employee has ForeignKey to Team)
class TeamSerializer(serializers.ModelSerializer):
class Meta:
...
0
votes
0answers
6 views
Can't get external library with browserify and debowerify
I have a headache on my hands. Here's my current setup:
bower to get vendor libraries (angular in this case)
gulp task to run browserify
debowerify to make the bower libraries compatible with ...
0
votes
2answers
15 views
AngularJS issues with injecting a new service into my controller
I have a new userContext.js file which attempts to create a new service entitle "userService". This service in turn will communicate with the server and return some environmental settings, as well as ...
0
votes
0answers
7 views
Angularjs $resource, how do I know which obj is being passed to it? URL not receiving :id
I am using a MEAN stack and I am a little confused on how the $resource works. I understand that the $resource factory is a service that retrieves data for controllers. However, I have two model ...
0
votes
1answer
19 views
How to access value of a select in my angularjs controller
I'm using angularjs for an application. I have several html items in an html file. Rather than access the values using the $scope.thisValue in my controller, I'd like to be able to loop through all ...
0
votes
0answers
23 views
Angular validation issue AND OR
I'm having an issue with my angular validation. I have an input that seems to be acting strangely. This is the snippet of code:
<input name="username" class="form-control" type="text" ...
0
votes
0answers
18 views
Add simple antispam operation in angularjs form
I have a input field like this :
<div class="form-group form-group-sm">
<label for="antispam" class="col-sm-2 control-label">1+1+5 = ?
<span ...
0
votes
0answers
10 views
Angular.js - Change url from login page causes logged in area glitch
I have a confusing situation somebody probably already had.
I am implementing login / authentication with angular.js.
I've done everything like described in this link
...
0
votes
1answer
22 views
AngularJS full page refresh
I am using Laravel with Angular and need a full page refresh when I switch to a particular route.
When this link is clicked
<a href="admin/pages/{{page.id}}/content">Manage Content</a>
...
0
votes
2answers
17 views
AngularJS - ng-repeat show one item at a time
looking for some ideas here. i have a meal plan object that contains an array of meals. only one meal can be set as primary at a time but i want the user to be able to cycle through the array of meals ...
0
votes
0answers
15 views
AngularJS directive blocks filter?
I have an element directive that has an attribute directive on it. At first I created the attribute directive separately, and it worked.
However, when I try to embed the attribute within the element ...
0
votes
0answers
7 views
How can I debug Jasmine unit Tests for AngularJS on Chrome?
Do I need additional plugins/dependencies to be injected? I am using jasmine-karma-PhantomJS.
0
votes
1answer
19 views
Is there a way to use multiple ng-click's on a single button?
This is my current attempt, both do not work at the same time
<button ng-click="actionType=false" ng-click="mapValues()">Back</button>
1
vote
0answers
12 views
Using slick caroussel inside a template
Our customer requested that we implement the kenWheeler slick caroussel: http://kenwheeler.github.io/slick/
Since our project is built with AngularJs we found the following directive that works as a ...
2
votes
0answers
7 views
Serving LESS, Javascript, and static resources from the same location in Java Play
Motivation
I am currently working on an Java Play app that uses Angular.js. At present, I am trying to reorganize my public folder based on feature. For example, all the Javascript, template files, ...
-1
votes
1answer
17 views
Angular keep iteraction object in option with ng-repeat
With ng-options the selectedCar will be a car object
<select
ng-model="selectedCar"
ng-options="car as car.description for car in cars track by car.id">
</select>
With ...
0
votes
0answers
10 views
Web App (Spring, Angular, Grunt, Maven, Tomcat) running both grunt and tomcat servers
OK so I've been reading several of the other stack questions and trying to piece this together without much luck. Basically my approach is that I currently have one project with multiple sub-projects. ...
0
votes
2answers
22 views
How to keep <th> dynamic in angularjs
How do I loop though my Post keys to keep my table headers from being hard coded? Right now my header row is just blank.
$scope.posts.data = [
{
"Post": {
"id": "38",
"title": "asdfasdf",
...
0
votes
1answer
32 views
Basic Angular Test
I'm pretty new to JavaScript & Angular and I'm trying to test this controller but I'm missing something here. Here's the error:
PhantomJS 1.9.7 (Mac OS X) Controller: UserCalendarCtrl Calendar ...
0
votes
2answers
22 views
Running jQuery code in MEAN.JS stack
I'm starting to work with NodeJS, and more expecifically with MEAN.JS. I'm trying to run some custom JS code, using JQuery, but no matter where i put the code, it nevers runs as expected. This is my ...
0
votes
1answer
26 views
Text Area linked with drop down
I have a drop down linked to a text area, so that when a choice is selected from the drop down the textarea automatically populates from the same model. A working version can be seen here: JSFiddle
...
0
votes
2answers
38 views
Wierd AngularJS error
I am rather new to AngularJS programming and was working on a sample application. I came across a problem while returning an object from a service. Consider following code in my custom service:
...
1
vote
2answers
33 views
how to completly remove # tag from angular route?
i am using $locationProvider.html5Mode(true) to hinding # tag in addressbar.
...
0
votes
1answer
10 views
angular-translate not working in a button that has another component
angular-translate works fine for several p's, h's, and labels using the format
<p translate>something</p>
Its great. But I can not get it working on buttons that have another Angular ...
0
votes
2answers
20 views
How to display value in Input box with AngularJS
I just started learning AngularJS. I want to implement a page for editing user info by showing the old info in the input field on the page. whenever the user want to update info they can see the old ...
0
votes
1answer
17 views
Showing data in table from 3 different JSON arrays in AngularJS
I have a JSON data like
{
tableList:["a","b"],
dbList:["c","d"],
score:[2 , 5]
}
I want to print this using AngularJS in Table like
DB Table Score
c a 2
d b 5
Can ...
1
vote
1answer
11 views
angular ui-router factory/service injected into directive is empty
I have an angular app that uses ui-router as follows:
var app = angular.module('app', ['ui.router']).run(function ($rootScope, $state) {
$rootScope.$state = $state;
});
I have defined states ...
0
votes
0answers
9 views
Loading template with AngularJS jasmine
I am trying to test a directive that is using a template. I am using VS2013 with the Jasmine nuget package, so I run my tests through the browser and not through any runner.
But when I run my test I ...
0
votes
1answer
22 views
Angularjs to return $http response to caller Object
How can I pass the response value to the parent object. The invoker who make the http service call in angularjs? What I have is a BaseModel where it will do the get like following. The idea is ...
1
vote
2answers
21 views
Data not updating at the expected time in Angular
I have an AngularJS application that lists out data from a server in a view that looks like this:
<table class="table table-striped">
<tr ng-repeat="query in saved_queries">
<td ...
0
votes
2answers
18 views
Angular inside of Angular - solving: WARNING: Tried to load angular more than once
I have a small angular app that just has one directive.
It will be used on many other websites, simply by them including one JS file and then using the directive anywhere on their page.
The problem ...
0
votes
1answer
33 views
AngularJS: filter array
I created an element directive for a table with data. The table uses ng-repeats to render all of the rows/columns.
I created an attribute directive for the element directive. It's purpose is to get ...
0
votes
1answer
7 views
Angular.js- Using ._extend() to extend a base Directive- How to replace Directive name?
I wrote a custom base directive. I will be using this base directive for other directives...for instance, I will write a directive for deleteButton and attach it to baseConfirmation.
I could use ...
0
votes
1answer
25 views
I can't get datas from json file with angula.js
I have theses codes:
index.html:
<!DOCTYPE html>
<html lang="en" ng-app="pizzasApp">
<head>
<meta name="viewport" content="width=device-width, ...
1
vote
1answer
17 views
How to handle server side errors in angularjs
How do I handle server side errors with angularjs. I saw a few solutions, like How to properly handle server side errors?, but they don't really fit my needs/maybe I need to change my failing ...
0
votes
3answers
11 views
Angular $http post() format Defaults to HTML on Rails
I have a factory that exposes a create() function which uses $http.post() underneath. For some reason when it is called from an ng-click the request is being formatted as HTML. All of the params are ...
2
votes
2answers
14 views
AngularJS - Loop data with dynamic total number
I try to create a input number that provided total number for loop my span tag like
<div ng-app='myApp' ng-controller="myCtrl">
<input type="number" ng-model="number">
<li ...
-3
votes
2answers
24 views
Why use a templating engine for an angular app?
I'm just curious if there is any reason to be using a templating engine for a node/express/angular app.
I'm new to node and express, so I might be missing something big. But I generally handle ...
0
votes
1answer
35 views
Add new AngularJS variables with JavaScript
I'm trying to make a dynamic form with AngularJS and JavaScript. The objective is to add how many inputs the user need and transform all those inputs in AngularJS variables that print it on body. So I ...
0
votes
0answers
4 views
Save data and scroll of previous state when opening new state in modal window (Instagram/Pinterest routing)
I want to create routing like on the Instagram/Pinterest. In my case - open full article in the modal window. From FAQ
I find this code:
$stateProvider.state("items.add", {
url: "/add",
...
0
votes
1answer
6 views
How to add mozSystem property to $http service in angular?
change jquery to angular in my application, but do not know how this property is added to the service $http, was something in jquery:
var xhr = new XMLHttpRequest({mozSystem: true});
more ...
0
votes
3answers
25 views
How do I set select default option in angular?
So I have json data that is retrieved from the server that looks like this:
$scope.StateList = {"States": [
{
"Id": 1,
"Code": "AL",
"Name": "Alabama"
},
{
...
0
votes
1answer
11 views
AngularJS service error on Safari and IE (InPrivate mode)
I have a service like below
app.service('abcService', function($q) {
this.abc = function() {
var deferred = $q.defer();
... blah blah ...
deferred.reject(object);
return ...
-1
votes
0answers
21 views
POST request hangs
I'm sending a POST request to get back a filtered report. I send my first few and they are pretty quick, no more than a second or two. On about my third request the request seems to hang, and doesnt ...
-1
votes
0answers
23 views
bootstrap 3 + angularjs and select hack
i have this html code
<div class="input-group">
<input type="number" class="form-control" name="distance" ng-model="calculatorData.distance" placeholder="Distancia" required>
...
2
votes
2answers
38 views
How to set the initial value of ng-model to an empty string in angularjs?
I want to be able to set my initial value for an attribute of my model as such
<input type="text" ng-model="selectedModel.title" name="title" value="" >
As shown above, I want the value of ...
0
votes
1answer
24 views
Angular.js required and ng-required not working for <textarea></textarea>
I can not get Angular.js required or ng-required to work. I want it to where if the user hits ok, they have to have some text in the textbox.
<div class="modal-body">
<p>Your change ...
0
votes
1answer
16 views
Thinkster.io Chapter 3 Issue
I am trying to get this tutorial to work:
http://www.thinkster.io/angularjs/S2MxGFCO0B/3-communicating-with-a-server-using-a-service-and-resource
I have started from scratch 3 times. (Deleted the ...