Tagged Questions
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability and reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications.
0
votes
0answers
4 views
AngularJS-ui toggle accordion pedending on window with
I am looking to add the accordion functionality pragmatically when the browser is under a certain width. I thought I might just destroy the accordion when the $window watch reports a width under, say ...
0
votes
0answers
7 views
AngularJS: avoid url encoding with $location
I notice that when I passed a parameter that is an array to $location.search(), it was encoded as in the following example
$location.path('/somePath').search('ids[]=', [1, 2, 3]);
becomes
...
0
votes
2answers
25 views
Uncaught Error: [$injector:modulerr] [on hold]
I keep getting this error when loading my Angular app. In Chrome a couple refreshes and my app will run but IE and FF is a no go.
The error links me to this site but I don't really understand what ...
0
votes
1answer
32 views
Promise not returning
I have a promise that I thought should work, but isn't. The server returns a 200 and the javascript receives the data with no errors being generated, but the scope in the view is not updated. I'm not ...
0
votes
1answer
11 views
putting together restangular and angularstrap
I am bootstrapping a new angular application.
Will be using Angular JS as MVC and bootstrap, hence angularstrap is a default choice.
Could someone please advice me on the usage of angular resource ...
0
votes
1answer
29 views
Using then() to call two other functions : Error - Cannot call method “then” of undefined
Basically I have the function getUserInfo which has one function that returns available and assigned groups within the service. Then I have the other two functions below return those objects. However, ...
1
vote
1answer
12 views
angularjs - Getting the binding expression from an attribute (not the resolved value)
I'm making a directive that cross fades between images based on this: http://www.bennadel.com/blog/2497-Cross-Fading-Images-With-AngularJS.htm
Instead of watching a particular field, i'd like to ...
1
vote
2answers
22 views
AngularJS Trying to Fetch Images Json file and render a template broke something
Another Update
I got it turns out the routeparams.Id is not working because I am using ui-router and not routeprovider to define my routes. You can use $stateParams instead.
Updated
I fixed my ...
0
votes
2answers
28 views
AngularJS $compile HTML from templateURL
There is the following way to add HTML dynamically in AngularJS
var template = '<div>{{value}}</div>';
var element = angular.element(template);
placeholder.replaceWith(element);
...
0
votes
0answers
26 views
AngularJS loading Directives before completing Service http call
I try to get the data from via http call from a service, and, assign return data from the service to the controller’s variable $scope. fusionJsonObj and finally pass this data to the Directive to ...
1
vote
1answer
20 views
Returning function from AngularJS factory
I'm trying to understand what the purpose is of the return part of this AngularJS factory method means?
return {
getMessages: getMessages
};
What happens if we added a new method to this ...
1
vote
0answers
22 views
how to create an angular directive that creates child directives that interact with grandparent scope
I need to write a reusable angular directive that, using some metadata, includes a bunch of child directives. This directive will build a dynamic form and the children will be controls on that form. I ...
1
vote
4answers
32 views
AngularJS ngRepeat binding
I have a scope with an array of objects, and also a single integer. So, in the controller, something like this:
$scope.array = [
{title: 'foo', first: 'spam', second: 'eggs'},
{title: 'bar', ...
0
votes
1answer
23 views
nested angular directive not getting the correct scope
I downloaded an angular directive called abn_tree to build a filesystem view in angular.
The abn_tree is nested within another directive.
My template structure which contains the directives looks ...
0
votes
0answers
25 views
Controller scope across scopes
I have this html structure
<div kendo-splitter k-orientation="'horizontal'" k-panes='[{ collapsible: true, size: "15%" }
, { collapsible: ...
0
votes
0answers
25 views
Comparing a variable to a string with ng-if
New to using angular, seems pretty cool, but pretty confusing for me right now.
So I am trying to sort my docs, but am having some trouble. Each doc has a title and an owner. I am trying to sort ...
0
votes
1answer
21 views
Is AngularJS for a mobile App with static pages only [on hold]
I have a mobile App that is iOS and Android compatible (mobile and tablet viewports). The App consists of only static pages and there is nothing really dynamic about it. It uses HTML,CSS,jQuery and ...
0
votes
0answers
21 views
Scope problems in basic Yeoman Angular Todo App
I'm following the tutorial here: http://www.youtube.com/watch?v=iUQ1fvdO9GY while learning yeoman and angular.
I've gotten to here http://www.youtube.com/watch?v=iUQ1fvdO9GY#t=266 and where his ...
0
votes
0answers
21 views
AngularJs form Validation not working properly with inline ng-repeat
Given the following code, when the user clicks on "Add Attribute" button i have a new <tr> showing with input fields for name/value. when the user is finished and clicks submit, it calls ...
0
votes
1answer
10 views
how to select, click element with protractor's element explorer
I can't seem to select element and click them with protractor's element explorer.
e.g.
it('should do ', function(){
browser.get('localhost:3000/myapp');
browser.getCurrentUrl().then(val){
...
0
votes
1answer
10 views
using kendoui splitter class in angular
How can I use angular-kendoui with the splitter class? i have wrote
<div kendo-splitter k-option-orientation="horizontal" style="height: 600px; width: 100%;">
<div id="top_pane">
...
0
votes
0answers
23 views
AngularJS $resource makes HTTP OPTIONS request instead of HTTP POST for $save method
I'm in the process of writing a simple library application to get ready for a larger project with AngularJS. After reading a lot online about using $resource to interact with a RESTful API, I decided ...
0
votes
1answer
22 views
AngularJS Databinding - Inputs not updating from model
I've been doing a lot of googling and I can't figure out why this won't work. I have a "PlayerController" and a form to add a new player. The inputs are bound to $scope.NewPlayer.name and ...
-1
votes
2answers
24 views
angular search filter not working
I dont get the search filter working.
projects template:
<h3>Projekte</h3>
Search: <input ng-model="searchText">
<table class="table">
<thead>
<tr>
...
0
votes
1answer
20 views
Use repeat in nested loop without parent elements?
I'm trying to print out the error messages using the code below. As you can see, since the message is inside an associative array (object) 3 levels deep I have to use 3 loops. The outer divs are ...
2
votes
1answer
18 views
Templates from templatecache not rendering bindings when data is returned from $http in 1.2+
I have a basic app, that fetches some data through the $http service, however it doesnt render the data correct in the template, when the template is served from the template cache. My code looks like ...
0
votes
0answers
13 views
Kendo + Angular chart data
I'm trying out Kendo charts with angular, and I have problem displaying data, here is my code:
HTML:
<div kendo-chart="rchart" data-k-options="chartOptions" data-role="chart" class="k-chart" ...
0
votes
3answers
38 views
Updating scope variable from directive
The scope variables updated by the directive are not reflected where we have {{variable}} on the page, however they do show up as being updated in when i do console.log(scope)
here is the plunker for ...
0
votes
2answers
31 views
jQuery, jQueyUI (and plugins) and AngularJS - how do they all fit together?
I have this website (in Hebrew): http://www.iping.co.il (if you could have a look at it maybe with google translate and see what it does it could be great but not a must).
It basically a website that ...
0
votes
2answers
15 views
Calling Templates on demand in SPA
In my current SPA application, the index page shows Login form (default router) which doesn't have header & footer ,
When User Logs in account , router takes user to after login page and Header ...
0
votes
0answers
12 views
Coordinating carousels
Context
I'm making a marketing website that has 2 carousels:
One for the background image
One for the content
The page also has a fixed, fade-in & fade-out title:
Title fades out as the ...
0
votes
2answers
26 views
Array Null out side loop , but inside with values in Angular.js service
Forgive me if this sounds like a dumb question/awkward wording,
So my service function as follows,
i have a array variable outside the function
var newUsdToForeignRates = [];
then fucntion as ...
0
votes
1answer
15 views
Error with Karma and Angular UI Router
I'm new to using Karma and I'm trying to write a very simple unit test for a controller. I'm using angular-ui-router and whenever I try to run the test it says:
Error: [$injector:modulerr] Failed to ...
0
votes
1answer
25 views
Posting JSON To Laravel
I am trying to make a post request of json to Laravel. The request is received on the server however when I try to access a property I get:
"Trying to get property of non-object".
On the client I'm ...
1
vote
1answer
43 views
Keep track of element bindings and event states in angularjs
I have an angular application which behaves as follows:
on mousedown a request gets send, returning JSON data representing the updated object.
while event still is active, element gets re-rendered ...
0
votes
1answer
34 views
Call directive from ng-click of element inside a partial in AngularJS
I have the following HTML:
<!DOCTYPE html>
<html>
<head>
<title>AngularJS Demo</title>
<meta name="viewport" content="width=device-width, ...
2
votes
0answers
24 views
Single page apps: auth token management and browser refreshes
When working on an Angular app, I have a single page app that communicates with a JSON web service for data.
A "login" in my Angular app is really just exchanging a username/password for a token. ...
0
votes
1answer
15 views
Compile and hide AngularJs template in the page source
My question is how do I hide the template tags when using AngularJs. What I mean is in index.html I have this:
<!doctype html>
<html lang="en" data-ng-app="myApp">
<head ...
0
votes
0answers
23 views
Trouble understanding UI-Router and nested views
I'm setting up an AngularJS app using Angular UI Router using states.
In my app there are multiple pages, and two of them have a tabbed view. So I'm using nested views to display the pages that have ...
0
votes
0answers
27 views
How to inject a controller into a directive when unit-testing
I want to test an AngularJS directive declared like this
app.directive('myCustomer', function() {
return {
template: 'cust.html'
controller: 'customerController'
};
});
In the ...
0
votes
1answer
30 views
using angularjs directive for a jquery plugin
I have a problem that when I use directives to use jQuery plugins like this:
<div ng-repeat="e in status" >
<input id="{{e.id}}" type="checkbox" class="icheck" icheck>
<label ...
0
votes
0answers
38 views
Accessing parent $scope
I have posted earlier this post with the choice of not providing all my code. But now im stuck since with the same problem so I give it a change with providing all my code.
I know its not easy to ...
0
votes
1answer
16 views
Uncaught Error: [$injector:modulerr] when using angularJS
I'm using angularJS in my application but when I add config section for routing I'm get this error :
Uncaught Error: [$injector:modulerr] ...
0
votes
2answers
16 views
Controllers <-> Services interaction and unit-testing : Am I doing this wrong?
I'm building an AngularJS app, and I would it to be respectful or the best practices.
Thus, when I have to call an external $resource or $http request, I do it in an external Service/Factory.
My ...
0
votes
1answer
29 views
AngularJS write and then edit array
I have a piece that when you click the Add button a modal appears and has 3 boxes you fill in details, this when saved shows a list on the main page with the title of your newly written item.
When ...
0
votes
1answer
32 views
go gorilla/sessions angularjs and path, session values not saved (find the bug/place the blame)
Ok where to start...
The problem is when I set the session's Path to "/" the session doesn't get saved.
And I set Path because when posting to a path that is not the path where the session gets ...
0
votes
1answer
38 views
Web Server AngularJs GET 404 not found
After moving my web project from Tomcat / directory to subfolder /WebApp I get an error GET http://localhost:8080/partials/view-worker-apps-used.html 404 (Not Found)
This is my project structure:
- ...
0
votes
2answers
33 views
Clean up JSON response for markup
I am getting a JSON response from a server whose data includes text with html markup.
This is causing a problem because I am not able to style my pages since the response already has html tags.
Is ...
0
votes
1answer
40 views
-1
votes
0answers
38 views
Declaring $scope.attribute in the same controller to use in different function
The problem is $scope.data.comments is empty in the deleteComment() function.
I didn't provide all the code as I think the error might be obvious as I have no experience with Angular.js
The ...