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
4 views
Socket.io and $scope.$apply()
I'm trying to build a real-time voting app using angular-fullstack. I have everything working except for when I receive a vote, my percentages don't update. I've determined that I need to call ...
1
vote
3answers
12 views
Factory has two methods, one is $http method with $promise - how to reference the other method from within the first one's success function?
In one of my factories I need to set a variable when data is fetched (through $http) so I can access it in my controller (the intention is to display a spinner image until the data is loaded).
...
0
votes
0answers
4 views
Angular + Bootstrap Responsive Design + Data Grid (DataTables/UI Grid)
I have a large collection of data to display in a datagrid (1000+ records). I want to have this grid to be responsive and lazy load the data with Angular bindings. The Application requirement does not ...
0
votes
0answers
6 views
Localize Angular ui calendar
I'm building and agularjs application where I integrate angular ui calendar aka fullcalendar. I'm trying to tage advantage of its localization, but keeps getting an error. I tried including both ...
0
votes
0answers
6 views
Rails + AngularJS + Not able to access all the columns of the Single Model at View
In my rails application, I am trying to fetch Logged-In-User details using AngularJS service. But while accessing the JSON from server I am getting only few columns rather than all the column present ...
0
votes
1answer
21 views
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access.
I have a node.js server which is running locally on my computer. And I am developing html page with js-code:
var MainController = function($scope, $http) {
var onCountComplete = ...
0
votes
0answers
9 views
Open Outlook by web base system
Im currently working on ERP solution , languages that are yous for web application C# mvc and angulerjs. I need to generate a email and attach auto generate file and open it in outlook to allow user ...
0
votes
0answers
5 views
Nested tree view menu with directives
I have to create a sidebar menu that has two or three levels and that the developer can enable or disable some features, such as icons, labels and animation. I have created four directives, one for ...
1
vote
0answers
3 views
ADFS 3 OAuth 2 CORS Error
I am adding ADFS authentication to an Angular SPA web site with a WebApi back end. To accomplish this I have set up the ADFS instance with a client and a RP.
In order to log into the SPA the user ...
0
votes
0answers
23 views
Scope inheritance in angularjs
In my angular application in a view i am using a template where I have a form.
If I try to change the model from the front-end(view) it doesn't give the updated value in controller but if I bind a ...
0
votes
1answer
13 views
AngularJS function DI parameter
i'm building a provider for the authentication part of the app. I'm having trouble on passing values to a function when using dependency injector.
angular.module('security.authorization', ...
0
votes
1answer
25 views
Getting scope value in child directive
I am using the Typeahead directive from the UI Bootstrap framework. I am using this directive inside of another directive. My outer directive is defined like this:
.directive('myDirective', function ...
0
votes
1answer
14 views
ngChange not Triggered on ngModel change
UI bootstrap demonstrates a select dropdown using a button and a unordered list. This is all fine and dandy, however, I am trying to get the same functionality as a select tag in HTML. Functionality ...
0
votes
0answers
9 views
Why AngularJS re-triggers 'link' function of custom directive when model changed?
Plunker: http://plnkr.co/edit/01BRRI?p=preview
Purpose: build a directive that edits data and save back to controller scope.
Code description:
$scope.object is data in controller, I referenced it ...
0
votes
1answer
11 views
Inserting commas dynamically to a list inside the view, angular js
I've got some html that looks like this
columns = [<span ng-repeat-start= "col in colsList">"{{col}}"</span><span ng-repeat-end></span>]
Which is giving me nearly the ...
0
votes
0answers
4 views
Element-based Directive for a Dual List Box is not generating HTML on the page
For a small prototype, I'm working on creating a reusable dual-list-box system. Such a system is composed of two lists and two 'arrow' buttons that move items between the list; the list to the left ...
0
votes
1answer
9 views
Angular Datatables Not Applying Correctly
Here is my html code:
<div ng-controller="withAjaxCtrl">
<table datatable="" dt-options="dtOptions" dt-columns="dtColumns" class="row-border hover"></table>
</div>
Here ...
1
vote
1answer
17 views
Loading one directive from another
I have two custom directives, as shown below: app1 and app2. app2 should be shown only when I click on a specific button in app1. What's the best way I can achieve this?
Here's my code:
...
1
vote
0answers
4 views
How to set a particular field in a form to dirty in angularjs 1.3
I want to set a field of a particular form as dirty as I am manually changing that value.I have already gone the the SO thread Angular.js programmatically setting a form field to dirty , But no luck.
...
0
votes
2answers
16 views
Persisting array data locally in AngularJS app to be shared between two applications
I have some array data var queries = []; that I want to be persisted and shared between two AngularJS application. 2 applications meaning one for the front end and second for the admin end. Both the ...
1
vote
0answers
27 views
How should this Angular service be refactored so as to avoid a circular dependency
The $exceptionHandler service depends upon the eventBus service. Both are defined within the 'demo.services' module. Using the angular dependency injection subsystem to inject eventBus into ...
0
votes
1answer
22 views
AngularJS dynamic scope variables
I have a scope variable jsonData as below:
$scope.jsonData={id:'1234',abcd:{array:[{a:'data',b:'bdata',c:'cdata'},{a2:'a2data',b2:'b2data',c2:'c2data'}]},efg:{test:'testdata'}}
in my HTML I have a ...
0
votes
0answers
3 views
How do I work with the iOS 8.0.2 change to the status bar overlay in web applications installed to 'home page'?
When working with a web application after having installed it to 'home', it seems like a most recent update to iOS has caused the usual black status bar to go transparent and float above the web ...
-4
votes
0answers
24 views
Introducing angular to app that uses old jQuery
there are other really similar answers but none of them seem clear to me so I'll go ahead and ask this question. A lot of applications I'm working with is bottle-necked by that fact that they're ...
1
vote
2answers
14 views
Avoid too many requests in Sails.js + AngularJS (caching HTTP requests)
I'm using Sails.js as base for my project, and so far I'm trying to modularize every UI element using AngularJS.
Although I think this approach is good because it allows me to reuse my code as much ...
0
votes
2answers
22 views
Custom service not properly declared
I'm new to Angular.js and am stuck when defining a custom service. I followed the tutorial at https://docs.angularjs.org/tutorial.
My app.js:
var myApp = angular.module('myApp', [
'ngRoute',
...
0
votes
0answers
27 views
Using different controllers on the same directive in AngularJS
I have created a directive and service that combine to create a pop-up modal in our application. I can call the pop-up service which sets up a scope variable and causes a modal directive to become ...
0
votes
0answers
9 views
Type Error when I run angularjs ui calendar
The following is the error message that I got when I tried to run an example of angular ui calendar.
TypeError: Cannot read property 'length' of undefined
at Object.getTokens ...
0
votes
1answer
22 views
Angular Controller involving 'ui.state' throws error: Argument 'Controller' is not a function, got string
I have just started experimenting with the angular-ui-router from github to use states instead of the mess that is routing. I have written a controller and included it in all my bundled files, html, ...
0
votes
2answers
28 views
Can't undertsand why my Angular Dependnecies aren't resolving?
Why are my modules not available to the $injector service? Console is reporting 'unkown provider' for both my baseHello and geoHello services. Obviously I have missed something fundamental but for the ...
0
votes
2answers
37 views
Adding to Javascript array based on if statement
I am needing to add error messages to an array based on the outcome of if statements. The code below brings back the second error message only when I input data that should trigger both. I know that ...
0
votes
0answers
8 views
Integrating sinonjs with intern testing
I can get tests to run in Intern, but I am struggling with getting spies to work. I'm trying to integrate sinon so I can get spies. Here is a sample test file:
define([
'intern!bdd',
...
0
votes
2answers
31 views
AngularJS: Scope variable not updating in view
It seems that my view variable is not updating on the onSubmit event.
I can see in console that the performed call to an API gets the correct results, but I do not display them properly.
JS
...
0
votes
1answer
6 views
Append directive to body
I have a popup directive, and I would like to compile and append it to body. Is there a simpler way then recompiling and appending directive to body.
link: function (scope, element) {
...
0
votes
0answers
15 views
SPA Security Architecture using Typescript, Angular.js, and Require.js
So, I need to know if conceptually this is possible, and if so, I would greatly appreciate any assistance in getting my single-page application security module to work. Any examples or pseudo code ...
1
vote
0answers
10 views
Ui-sref not generating hash in URL (Angular 1.3.0-rc.3)
Since upgrading from Angular 1.3.0 RC-2 to RC-3 the hash-sign in my links generated by ui-sref has disappeared. The link is clickable and the state transfers happens correctly, but if i copy the link ...
0
votes
1answer
20 views
Angular controller not seeing dynamically created elements
I have a jQuery based app that contains a large grid of data that is built using jqGrid. The user should be able to click on a row in the grid and get a popup dialog showing some more details about ...
0
votes
2answers
38 views
AngularJS, nested controllers from variable
Generally, what I want to do, is to initialize nested ng-controller inside ng-repeat using variable.
JSFiddle
JS
angular.module('app',[])
.controller('main',function($scope){
...
2
votes
1answer
11 views
Appending Param to AngularJS REST Queries
I'm using AngularJS with UI-Router and am attempting to attach a query parameter to a url on all http requests across my site.
I have an OAuth system on the backend and was previously applying ...
0
votes
0answers
13 views
How testing file upload directive?
How can I test?
element.bind('change', function(evt) {
var files = evt.target.files;
if (!attrs.previewContainer) {
attrs.previewContainer = "preview";
var div = ...
0
votes
0answers
15 views
Angular UI Bootstrap Slider Multiple items per slide
I am connecting to a web service and want to populate A UI Bootstrap carousel with 4 items for each slide. I am using | limitTo:4, but I need a way to limit 4 per slide out of the 10 total.
Here is ...
0
votes
0answers
24 views
Why I can't see the ion-nav-back-button?
I started a new Ionic project with the Tabs template. Now I have the problem, that I can't see the ion-nav-back-button when I add a button which go's to a new state:
.state('test', {
url: "/test",
...
0
votes
0answers
17 views
Binding to data when changing the URL
I am building an application that uses ui-router. On my /teams route I have a form where a user can add a team name which then pushes the name to my MongoDB and binds to the view and displays the team ...
2
votes
3answers
20 views
AngularJS Store $routeParam in var in factory service
I'm new to Angular and i'm currently trying to get the id of a project from the url and pass it as a var inside a service.
My current code is as follows:
app.config(
['$routeProvider',
...
0
votes
2answers
32 views
angular checkbox update is not updating the model
I'm trying to change a checkbox value based on another checkbox value, but the change doesn't seem to have any effect in the model.
Here is a code example of the issue:
...
1
vote
1answer
21 views
Adding an All Option with ng-options
I am currently filtering through a data set to retrieve each unique name and put it into a drop down menu.
<select ng-model="Employee" ng-options="order.SPerKey as order.SPerName for order in ...
3
votes
1answer
47 views
angular.isDefined() vs obj.hasOwnProperty()
I have an object that may or may not have a status. When using the angular.js framework which would be more appropriate. What are the advantages and disadvantages of both.
var checkStatus = ...
0
votes
1answer
28 views
Showing data from database with AgularJs
I want to diplay data from db in my page .
This is my code in
JS :
$scope.save = function() {
var data = {
subject: $scope.composeStory.subject,
body: $scope.composeStory.body
}
...
1
vote
1answer
15 views
Need example of how to use angular-scroll
I'm trying to figure out how to use angular-scroll from this source on github:
https://github.com/durated/angular-scroll
I'm still very new to AngularJS and I think I'm having trouble reading in ...
3
votes
1answer
27 views
Is it possible to have multiple states on a page at once or change the state of a named view?
I am developing a page that has a news feed on it; when I think of it logically, this feed has several states on it (news, settings, favorites, etc.).
A feed should be able to be on many types of ...