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
MEAN.io and Flow.js: How to register dependancy and integrate?
So I'm new to the MEAN stack and while I quite enjoy working on it I find myself usually wasting several hours searching for a solution as to why my angular suddenly breaks or why a dependency isn't ...
0
votes
0answers
10 views
node start http-server - cannot start - windows
I am on windows and am following the instructions here stackoverflow answer for http-server
npm installed the http-server correctly.
PS C:\Users\Sayth\projectmanagemvc\angularjs> npm install ...
0
votes
2answers
12 views
How to secure AngularJS $http.post data?
I came to a security concern while doing $http.post requests that are received by the backend of my app. I can see all the data that is being sent using for example firebug in Firefox.
Are third ...
0
votes
1answer
11 views
angularjs substract value and remove last four digits
In my application displaying the users age based on their date of birth
controller
$scope.currentIDate = $filter('date')(new Date(), 'yyyyMMdd');
$scope.dob = 19840623 # converted user age into ...
0
votes
0answers
5 views
Server Sent Events In Firefox Not Working With AngularJS
Currently I'm learning Server Sent Events. Everything is fine if I make a simple HTML application. But when I turn into AngularJS, the problem appears. Server Sent Events is not continually called in ...
1
vote
1answer
6 views
Angular js template won`t show variables from pouch db
I`m trying to get data from pouchDB, I wrote factory for it.
fac.factory('dbFactory',function(){
var db = new PouchDB('dbname');
return {
post: function(data){
db.post({
title: ...
0
votes
2answers
15 views
Initialize ng-app after document is loaded
I'm working with AngularJS.
One of the (technical) requirements is to fetch the "ng enabled" HTML content from the server, in response to a click event, and inject it into a <div ng-app> via ...
0
votes
1answer
18 views
ng-change doesn't update view AngularJS
I was working on AngularJS and trying to load products using.
$scope.update=function(){
$scope.loading = true;
$scope.brandString=$scope.brands.join(':');
...
0
votes
0answers
10 views
Angularjs sending json data is getting 'POST 400 Bad request'
I'm trying to send json data from a form to a controller in spring through angular but I'm getting Bad request. Any idea what this could be.
Angularjs controller send function
$scope.sendaction = ...
2
votes
2answers
30 views
Reuse HTML but bind different model
I'm using AngularJS in my website. One page on my site is quite large, as in, it has a lot of HTML elements. Imagine something like this:
<div id="bronze">
<input ...
0
votes
1answer
29 views
What did I forget to include?
I'm trying to initialize ngBootbox and toaster.
var app, deps;
deps = ['treeGrid'];
app = angular.module('MyApp', deps);
app.controller('treeGridController', [
...
2
votes
1answer
37 views
What is the advantage of using Bower to install all the package content I don´t even need?
Imagine I would like to use plugins like angular.js and html5shiv on my website. I could now use bower to install these packages together with all the unnecessary files inside those packages or I ...
2
votes
1answer
23 views
$scope variables vs var
in ngTable documentation, example 1 (http://bazalt-cms.com/ng-table/example/1)
There's this line:
<tr ng-repeat="user in $data">
<td data-title="'Name'">{{user.name}}</td>
...
0
votes
0answers
7 views
Grunt Watch REGEX for Modular Project Architecture
I have this configuration generated with generator angular for grunt contrib watch task in my Gruntfile.js:
files: ['<%= yeoman.app %>/scripts/{,*/}*.js']
I'm confused by this regular ...
0
votes
0answers
9 views
asp.net mvc + angularJs - Ajax.BeginForm submit multiple times
I am using asp.net mvc + angularJs in my applcaiton, I am using Ajax.BeginForm to Post my data without page reload, When I click on the submit button, the form post the form data multiple times at the ...
2
votes
2answers
26 views
AngularJS routing views properly but stylesheets broken
I'm building an AngularJS application with routed views and to be clear the routing is working, as in the template pages in my /views/ folder are asynchronously loading into the view div on my ...
0
votes
3answers
33 views
How to split string using angular js
I am new in angular js.
my array -
"cards":[
"xxx Bank Credit Card",
"yyy Bank Debit Card"
],
what i am tring get only xxx adn yyy or Credit and Debit from the string .I am using angular js 1.2.23 ...
0
votes
0answers
12 views
Anguar UI Bootstrap: Typeahead directive doesn't work properly with AngularJS v1.3
I've got typeahead directive in my application and it's work just fine with angularJS v1.2.24. But now I've got v1.3 and there is some problem. Fething data still works fine, but function tied with ...
0
votes
0answers
8 views
Angular-ui-boostrap canonical bower package name
it seems that both angular-ui-bootstrap and angular-bootstrap bower packages have the same content, and are both published by angular-ui bower user.
I'd just like to know which I should use.
What I ...
0
votes
2answers
31 views
Angular factory ajax call on every route change
I have a factory where I have a function getExpenseList which does an ajax call which queries the expense table and gives me the result.
Now I have two routes, 1 which is listing of expenses which is ...
0
votes
0answers
21 views
AngularJS comments style guide
When looking at the source code of Angular it seems there is a certain way how to style the comments. A quick google search does not reveal what rules to follow. What are the guidelines?
For example, ...
0
votes
1answer
14 views
Amazon S3 upload image - using angular js directly from browser
I am trying to upload images from my browser to Amazon S3 directly, using angular js.
Below is my code.
function _upload($files) {
$scope.file = $files[0];
...
0
votes
1answer
38 views
AngularJS: how to execute a method in another controller?
I've searched on Google but can't find information on how to do this properly. Seems like all the answers on Google are now outdated (using older versions of AngularJS).
I'm trying to setup two ...
0
votes
0answers
13 views
Jasmine testing Controller with factory and other dependencies
How can i write unit test for my controller with service and some other dependencies. ?
Here's FIDDLE LINK
My controller looks like
app.controller('SomeController', ['$scope','$rootScope', ...
0
votes
2answers
23 views
Call controller function only once, Two div with same controller
I am working on angularjs. I have two divs sharing same controller. My controller code is.
var app=angular.module('categoryPageApp', []);
app.controller('NgProducts', function($scope,UpdateService) {
...
1
vote
1answer
29 views
ng-view inside the another ng-view possible
Nested ng-view is possible in angularjs or if any alternative solution
for this one. If it is possible for ng-view inside the ng-view.
0
votes
0answers
10 views
Customize ngTagsInput Autocomplete
Anyone knows how to customize the layout of ngTagsInput autocomplete?
<tags-input ng-model="tags" placeholder="neues Tag">
<-- Customize this autocomplete layout --->
...
1
vote
1answer
37 views
directive not working in ng-repeat
I have a simple directive that shows a tooltip of a larger image when you hover over a small image. It stopped working when I added it to an ng-repeat. The directive runs, it even creates the tooltip ...
0
votes
0answers
11 views
SignalR: How to add client call after the hub is started?
First off, I just started trying to add SignalR 2 to my existing Angular SPA project.
I have a main controller which starts the hub right away that is feeding some messages to the client. Inside, I ...
0
votes
0answers
7 views
Using angularjs rails resource query correctly.
I am using angularjs-rails-resource and I have set up a service. I have a table of leagues which belongs_to a user so the columns of the league table are id, name, and user_id. I am trying to pull ...
1
vote
0answers
24 views
Can't inject service in run method angularjs
I'm just starting with AngularJS and as I was always used to work at server side I'm having some difficulties on getting things done, specially debugging code and finding out what the error might be.
...
0
votes
1answer
15 views
How do I retrieve parameters from an AngularJS GET HTTP request inside php?
On the Angular side, I'm trying to do a GET http request like the following:
$scope.getQuestion = function() {
//$http.post($scope.url, { src : $scope.question});
var request = $http({
...
0
votes
1answer
25 views
AngularJS: How to get properties from arbitrary type?
I have somewhat of a complex requirement here (a real head-scratcher)... and I'm not sure on the best way to proceed:
Requirement:
Build a page for managing widgets (CMS content blocks) in MVC5 ...
1
vote
0answers
20 views
Single controller to handle resolves in two routes, collection and single in angularjs
This might be a common problem that a angularjs dev will encounter, and I don't know if this was already been answered in the past, a brief searching doesn't give me results.
Okay, I have 2 related ...
4
votes
1answer
26 views
Where does Angular store directive information?
Where does Angular store directive templates?
I have a module/directive and I want to be able to get the template it uses in another directive. Specifically I want to view the raw HTML and the names ...
3
votes
1answer
19 views
Angular $watch window.pageYOffset not updating?
In my controller, I have:
$scope.woffset = window.pageYOffset;
$scope.$watch("woffset", function (newValue, oldValue) {
console.log("hello");
console.log(window.pageYOffset);
}, true);
});
...
0
votes
0answers
17 views
scope in directive breaks view scope with async validation
I am following a Year of Moo tutorial on async form validations and ngMessages (I'm using 1.3.0-beta.14 so I can't use the actual $async validator).
My validation is working, but the scope in the ...
1
vote
1answer
11 views
Google Maps for Angular directive not working in function
I'm attempting to use this Google Maps for AngularJS directive inside another function. The code works when I move $scope.map outside the function call and set the lat/lon statically. However, what I ...
0
votes
1answer
15 views
AngularJS: can't push $scope object onto end b/c data keeps updating
Each time a user submits a form, the fields are in a $scope.params object. I want to track all submitted data on a $scope.history object. So I'm doing:
$scope.history.push($scope.params)
This isn't ...
0
votes
0answers
26 views
How to trigger an ng-change from an ng-click of a different element?
background:
I'm trying to create a custom dropdown menu w/o styling a select tag.
Question:
How do I trigger the ng-change="currentCategoryFilterSet()" function inside of <select ...
0
votes
0answers
27 views
Using angular js on specific sections of the webste
I am building an online catalog for a charity and there is a wiki component to it where people can create an account and begin editing entries.
For seo purposes I want to avoid using angular for any ...
2
votes
1answer
16 views
$compile'ing already compiled elements is not supported, what to do then?
According to lgalfaso on Angular.js repo:
lgalfaso commented 8 hours ago
Recompiling an already compiled element is an abuse and not something
supported. I do not know what you are trying ...
0
votes
1answer
19 views
Extra option and ng-required
I am adding an extra option to my list of options with this code:
var defaultOption = { id: 0, descrip: 'Select Item Tree...' };
$scope.metaData.itemTrees.splice(0, 0, defaultOption);
Now, under ...
0
votes
1answer
8 views
angular accessing modal parent controller
I'm using ui-router with $modal and my set up is like this in my routing page:
.state('resourcesControl.resource.dataStuff', {
url: "/:resourceId/dataStuff",
onEnter: ['$stateParams', ...
0
votes
0answers
14 views
Simple Boolean Switch directive not working as expected
I have created a simple "Switch" button directive that allows the user to flip a switch on/off using a boolean value. For some reason I cannot get the directive to update the boolean model that is ...
0
votes
0answers
12 views
Resolve service chained promise
I'm writing a module with a state 'books' which resolves into a service promise. It is working fine, except if I access programmatically from another state controller like this:
$auth.login({ email: ...
0
votes
1answer
10 views
Mootools .addEvent can't get inside ng-repeat?
So I'm trying to use mootools to create a drag/drop cart as seen here: demo. I can get there code working just fine, but when I try to edit their html to look like the html beloe, it stops working. ...
0
votes
0answers
10 views
Added NgGrid Break Jasmine Tests
Working on my first angularjs project and using jasmine for tests. Everything was working great until I added ngGrid. The site still works fine, but all my unit tests started failing. I realize ...
-1
votes
0answers
13 views
Non Repeating template in Angularjs
Most of the templates I have seen for angularjs work with ng-repeat or ng-options. I want a template to whom I can pass an object on click event of a button or something and the template is rendered ...
0
votes
0answers
22 views
AngularJS - mark input field as invalid based on server-side response
Using AngularJS for a form - client side validation is no problem, but I'm trying to figure out how to mark an input field as invalid based on the response from the server (e.g. the input text fails a ...