AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability, reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications
1
vote
0answers
7 views
AngularJS scope in IE not refreshed
I have a on page load REST call to my backend java webservice. The results will be set onto a scope object, then I will do some form submission from my UI to the backend and the result is created in ...
0
votes
1answer
7 views
Binding directive instances through a common property
I need to share a property between two instances of the same directive.
Here is a plunkr to help me explain what I mean.
http://plnkr.co/edit/wsrSxq?p=preview
The left position of the two boxes ...
0
votes
0answers
16 views
AngularJS and complex JSON returned by django tastypie
I have few resources written on AngularJS that access a Tastypie API. Everything works fine, except for a detail: tastypie always encapsulate the actual result inside a objects attribute on a JSON, ...
-1
votes
0answers
22 views
How to save some state into the URL as a query parameter
I'm using AngularJS 1.0.7, with ui-bootstrap 1.0.4.
My application has a main navigation bar, and some pages have an extra level of tabs (using ui.bootstrap tabset and tab directives).
What I'm ...
0
votes
1answer
21 views
AngularJS initial route controller not loaded. Subsequent ones are fine
I have a HTML5 pushState app. For some reason or another, the controller responsible for the route that I hit initiall is not loaded when I first load the up. If I click around, everything is fine.
...
0
votes
0answers
8 views
AngularJS authentication - Incompatibility between directives?
I'm really new on Angular JS development and I'm trying to implement the following authentication module : https://github.com/witoldsz/angular-http-auth (more info at ...
2
votes
1answer
23 views
How does one keep CSS3 animation state after ng-animate?
I am trying to change a div' state using ng-animate + CSS3 transitions.
My animations works just fine with this CSS except for the fact that the div doesn't keep its size + color once the animation ...
0
votes
1answer
25 views
ng-animate is not working with ng-show in angularjs 1.1.5
I was testing the animations in latest angularJS version 1.1.5 and it seems like its not working properly. please check this Fiddle
Html:
<div ng-app>
<div ng-controller='ctrl'>
...
0
votes
1answer
19 views
Can't inject the resolve data into my controller
This is my route:
$routeProvider.when('/blog/bearbeiten/:id', {
templateUrl: 'adminpages/blog/beitragbearbeiten',
controller: 'blogEditPostController',
resolve: {
loadData: ...
0
votes
0answers
28 views
how to load the contents of a tab only when the tab is active?
My goal is to load the content only when the tab is active. The angularjs version is 1.1.5, ui-bootstrap is 0.4.0 and my markup is this:
<tabset>
<tab ng-repeat="tab in tabs" ...
0
votes
0answers
15 views
Collapse a list of ng-repeat
I'm attempting to use ui-bootstrap's collapse on an ng-repeat list of items. I've added ui.bootstrap to my module, and worked out this html:
<div class="title">Things <a class="collapse" ...
0
votes
0answers
21 views
Why simple JasmineJS and AngularJS based unit test not working
I am trying to write a simple test using Jasmine. The test checks if $scope.testFlag is set to false.
Here is my test code
describe('Abc Controller', function() {
var $scope = null;
var ctrl = ...
1
vote
1answer
13 views
Overwriting $scope in controller will not reflect in the DOM
I am trying to persist the whole scope to a service so that it is available and already set up after user navigates away and then returns to the screen.
I have created a service and am storing the ...
-1
votes
0answers
24 views
JSON and LocalStorage with Angularjs
So i am learning localStorage with Angularjs, and this is my problem.. here is the code:
It's a simple task, all i want is when i push some data to a JSON, on a refresh, i want to show that data in ...
0
votes
0answers
15 views
change angular ui-view inside ng-repeat
I am using multiple named ui-views in a single controller. Everything is working as spected when name the ui-view in the html file with this code:
<div class="box">
<div ...
1
vote
1answer
26 views
AngularJS inner ng-repeat not processing $index.$parent in function argument
Could someone more experienced than I explain to me why this compiles:
<li class="btn dropdown top-stack breadcrumb-btn" ng-repeat="nodeName in selectedNodeNames">
<a ...
0
votes
0answers
11 views
How to test an AngularJS provider configuration?
I have a provider defined as follows:
(function(angular) {
angular.module('myModule', [])
.provider('myService', function () {
var service = {};
service.configureSomething = function () { };
...
0
votes
1answer
14 views
Run angular.js as a callback ($.ajax, for example)
I'm writing an app with mostly two javascripts, resources_loader.js and app.js, where the first loads some json files used by app.js.
The problem is: app.js (which has angular.js stuff) should run ...
0
votes
0answers
21 views
how should I troubleshoot why my databinding expressions aren't being bound or altered?
Given some simple markup like so:
div(ng-model="chart")
...
div.configureChart
h5 Configure Chart
h4 {{name}}
If I'm getting {{name}} on the page instead, what techniques can I utilize to ...
0
votes
0answers
10 views
Testing external AngularJS application
Is there anyway to do E2E testing with AngularJS on an external application? Meaning we want to be able to run the Karma test runner on a Windows and a Linux machine to test an application located at ...
0
votes
1answer
32 views
Accessing 2D Arrays in AngularJS
I've searched around a bit and found a number of similar things, but none that seem to answer my problem:
I'm creating a spreadsheet with AngularJS, which I have done based on this tutorial, from ...
0
votes
1answer
37 views
Restricting checkbox selection to a subset w/out using functions in ng-repeat
I want to restrict the number of records that may be selected in a list to a subset of the total records by disabling the remaining records once the max is reached. The list may be 1000s of records in ...
-3
votes
1answer
39 views
AngularJs code for show/hide div's [on hold]
Here my two div's are as follows:
<div class="login">
UserName:<input type="text" name="uname"><br>
Password:<input type="password" name="pwd"><br>
<input ...
0
votes
1answer
22 views
If body has class, then redirect with angular JS
I am pretty new to AngularJS.
What would be the best way to detect if body has class "lt-ie9", and if this is true, then redirect the user to different subpage?
PS: Somebody told me to use use the " ...
0
votes
1answer
17 views
Weird scope behavior when using templateUrl directives
So I have having the following simplified plunker to show a problem I am having with a directive of mine:
http://plnkr.co/edit/aXW7YlpensjcYsLTGwmo?p=preview
This has a directive that uses the ...
1
vote
1answer
18 views
Angularjs dynamic binding for ng-model
Here is the Plunker that describe my problem with dynamic binding in Angularjs.
http://plnkr.co/edit/fGgtOZ5IrJVo9QasQALc?p=preview
Before using Angularjs, I am used to using the input name/value ...
0
votes
1answer
19 views
auto-complete follow link on select
Here is the fiddle (directive at bottom):
http://jsfiddle.net/swfjT/249/
Instead of logging on click of input / enter, how would I make clicking an auto-complete item from the dropdown direct to a ...
0
votes
1answer
30 views
Restangular POST always empty
I think I'm not understanding how a POST is done in a RESTful api. When creating a new object in Restangular with this:
var user = {name: "John", id:"123"};
...
0
votes
0answers
22 views
directive template with more than one root element
I am trying to build a directive that renders <li class='dropdown'> and depending on a few factors it's either should or shouldn't have <li class='divider-vertical'> before it.
So, two ...
0
votes
1answer
13 views
AngularJS + TowerJS Tutorial/Ressources
I'm from .net environment and i want to learn this frameworks via tutorials.
Can you provide me some tutorials ?
Regards,
Guillaume
2
votes
1answer
27 views
AngularJS $evalAsync vs $timeout
I've been using AngularJS for a little while now, and have found the need to use $timeout every once in a while (Seems to usually be to init a jQuery plugin). Recently, I've been trying to get a ...
2
votes
0answers
14 views
AngularJS nested routing
I'm working a fairly simple AngularJS project with some deep route nesting to select from a nested data structure:
angular.module('doccat', []).
config(['$routeProvider', function($routeProvider) {
...
3
votes
1answer
39 views
The “with” binding of KnockoutJS in AngularJS?
I have just switched from KnockoutJS to AngularJS and I am not able to find the KnockoutJS's "with" data-bind in AngularJS.
Here is the piece of code in KnockoutJS. The "with" binding creates a new ...
1
vote
2answers
32 views
AngularJS - Computation-Heavy Tasks
Is there a pattern in Angular apps for computation-heavy tasks? (Beyond just using $timeout with a delay of 0 to let them get off the call stack?) Even using $timeout seems to make the UI ...
0
votes
0answers
35 views
Using Jasmine with Angular JS input validation
I have an angularjs app, which validates certain input fields. I was looking to write unit tests via Jasmine to test and maintain the validity of these fields.
NOTE: The validation works fine ...
0
votes
1answer
25 views
angular: ng-class in ng-repeater , duplicate call
first of all sorry for my English.
my problem is:
i've this simple code:
<li ng:repeat="item in menu.items" ng:class="getMenuItemClass(item)">
<a ...
0
votes
1answer
15 views
Angular E2E Test: Getting “input” from “element”
I attempting to set a text field value using angular's e2e test framework. Per their documentation, I have to use:
input(<model>).enter(<value>)
However, since the model is embedded in a ...
-1
votes
0answers
17 views
How to add Fullcalendar Resource view in AngularJs?
I am trying to add Resource view in my fullcalendar. After googled, found some useful links which has resource view in the fullcalendar but it was implemented in jQuery fullcalendar and my calendar is ...
0
votes
1answer
17 views
AngularJS: Scroll to end of element after applying DOM changes
I have a simple list of items. I want to be able to scroll to the bottom of the element displaying the items whenever I add more items. I understood there is no way of hooking to the end of the ...
-2
votes
0answers
73 views
Switch between two Div's in AngularJs [on hold]
I have two div's say: LoginDiv and SignUpDiv(hidden initially) and have a link in LoginDiv for SignUp.
When i click on the link, LoginDiv should be hidden and SignUpDiv should be shown.
And when i ...
-1
votes
0answers
25 views
How to use $routeProvider, using RequireJS? [on hold]
I'm trying to use the $routeProvider in order to handle the routing but I cannot figure out how to do that using requireJs.
In main.js declared
require([
'angular-boot',
...
...
0
votes
1answer
29 views
is it possible to combine multiple ng-class
is it possible to avoid repeating the code here by replacing the ng-switch by ng-class.
<li ng-repeat="el in elm.required">
<span ng-switch on="el.type" >
<i ...
1
vote
1answer
20 views
AngularJS - select the first option in list that's reordered in the template
I just started using Angular JS yesterday, sorry if I'm asking something obvious. What I'm trying to do is make the the first option in my select the one that's selected by default, but since it's ...
0
votes
1answer
24 views
On call(chart), how to debug “Cannot call method 'getPropertyValue' of null”
Working on nvd3.js with a simple example (line with view finder chart). I can make it work when I use a basic single html page, but when I use it inside a custom angularjs directive, it will fail on ...
0
votes
1answer
25 views
How to return from function when resource response is received? Angular.js
I have a function calling an angular resource, to retrieve an item. I want the function to return the value received in the response. Anyway,
function getTemplate (templateId) {
var Tx;
...
0
votes
1answer
22 views
how to use mutiple filters in angular js
I have html code includin dropdown which I have used filter.
<div class="controls">
<label class="control-label" for="teamRole">Select Rater: </label>
<select ...
0
votes
1answer
24 views
angular, promise and async function
today i have an issue that i really dont understand :)
I wrote an angular service that call my api, reformatting the result and bring this data to another function into angular controller.
I do this ...
1
vote
1answer
11 views
Injecting a provider into a module config
I have a provider named TestProvider
I'd like to configure my provider for my module.
This works:
app.config(function(testProviderProvider){
// ...
}
This works not:
...
-1
votes
0answers
17 views
How to update data in ngRepeat after successfully retrieving the JSON for custom url $http request
Due to the fact that angularjs is not working with ngResource custom url, I have to try $http instead:
My html is something like:
//html
<tr ng-repeat="person in people">
...
0
votes
0answers
14 views
AngularJs: AngularStrap datepicker is not working in arshaw fullcalendar
I have added a datepicker inside calendar header but its not working any more. fullcalendar.js file has render() function and I am adding below line of codes inside this function
<td ...