Tagged Questions
0
votes
0answers
4 views
Angular-ui $modalInstance.close doesn;t work as expected
I created a service that shares a confirm modal.
services.SharedService = function($rootScope, $modal) {
sharedService.confirm = function(name, callback){
var confirm = $modal.open({
...
0
votes
0answers
14 views
How to disable dropdown list item in AngularJS?
I am a beginner to AngularJS and I am making a web app that needs to disable exiting values in a dropdown list.
I know how to do it in jQuery. It is just like this: ...
0
votes
0answers
9 views
Convert tiff images in Node.js and send them to Angular.js
I'm planning to build a small app, with the purpose to search and render multypage tiff images in the browser. Plugins like alternatiff works well but I want to avoid the user to install it.
I found ...
0
votes
0answers
11 views
How to push notifications with angular.js?
I have been building a simple application to learn angular.js. So far I hooked up all the pieces in the MEAN stack and I am able to save and retrieve data from Mongo.
The app is essentially a todo ...
0
votes
1answer
18 views
Deferred does not resolve in Angular version 1.2.2
When google is to slow, ask stackoverflow... For some reason I can't find something about this issue:
I read this tutorial, which led me to this plunk. For some reason deferreds didn't work in the ...
0
votes
1answer
30 views
Concatenate two scope models in angularjs
Hello Im trying to concatenate two models which are bound by html form values. My ultimate goal is to create a nested JSON object for a POST request. I have tried to use the DeepExtend method like ...
0
votes
0answers
21 views
Click button and reveal AddThis for each listing
I have a list of article listings, and I'm trying to get the AddThis plugin to only show once a button has been clicked in AngularJS.
<script type="text/javascript">var addthis_config = ...
0
votes
0answers
16 views
Protractor - clicking a link in a list
Given a todo app that has a list of tasks: Walk the dog, Eat lunch, Go shopping. Each task has a 'complete' link.
Using Protractor, how do I click the complete link for the second task 'Eat lunch'? ...
0
votes
1answer
25 views
Validation directive code is executed on every item in ng-repeat
I am writing a single page application using Angular and Breeze. I have a set of entities displayed on my page using data-ng-repeat.
I am doing in place validation on the entities by having an "edit ...
1
vote
2answers
32 views
If else conditions in angularjs templates
I am quite new to AngularJs. I am working on a Q&A Application where i have to render some questions and its answers in the form of a table. I have three Types of questions which I have to render ...
0
votes
0answers
17 views
how to custom angular ng-grid cell like this?
RT,now in a table the last cell have 3 states,such as 'edit','submit','cancel'...
so how to show that depend on cell state?
PS:my En is so poor,but thanks first!
sorry cannot upload pic,so just code ...
2
votes
0answers
24 views
Using AngularJS and Angular Translate how do you check if a string has been translated?
How do you check if a string has a translated value? I'm using AngularJS and AngularTranslate.
I only want to display a value if it has a been translated. Angular Translate will show the ...
0
votes
2answers
33 views
Choosing a web framework for premium business model : AngularJS and others [on hold]
For 1 week, I have been working on a nice web-app idea I have. I already develop a JS prototype and design UI. Now, I would like to introduce a premium system (users have to pay a few dollars to ...
0
votes
0answers
22 views
Angular js unit test mock document
I am trying to test angular service which does some manipulations to DOM via $document service with jasmine.
Let's say it simply appends some directive to the <body> element.
Such service ...
0
votes
0answers
25 views
AngularJS tokenWrapper - wrong callback arguments
AngularJS 1.2.1
ngResource 1.1.5
I got the weirdest problem.
I'm using tokenWrapper by Andy Joslin (AngularJS: How to send auth token with $resource requests?)
I have a resource defined like that:
...
0
votes
0answers
14 views
How do I run in my local environment the uiRouterExample in UI router?
I'm new to git and javascript and have until now just used fiddles. I have a confirmed git --version running. My goal is to run the provided sample that comes with the ui-router that is explained here ...
1
vote
1answer
17 views
Set angular.js url root globally
I have an angular app that is hosted at my university server.
Because the app is not in domain root (urls are constructed as follows: university.domain/~<student_id>) all links and image srcs ...
1
vote
2answers
38 views
Javascript Objects Inside Prototype
When learning angularjs I found out that if you put objects in a prototype object , the instances that inherit from that prototype would change the prototype's objects on assigning.
Example :
...
-1
votes
0answers
20 views
blob download not working in IE
i have this in my angular js controller that downloads a csv file:
var blob = new Blob([csvContent.join('')], { type: 'text/csv;charset=utf-8' });
var link = ...
-2
votes
0answers
25 views
Javascript Webapp Structure [on hold]
I have been struggling to find an elegant way of structuring the WorkMob Scoping App.
WorkMob Scoping App
The scoping app helps you create a project scope by clicking tiles and accepting inputs one ...
4
votes
1answer
58 views
AngularJS - Deep object' property deletion
I know how to set object' "deep" property with $parse service , like in this post.
But how can i delete a deep property ? Not assign it to null with this:
...
0
votes
2answers
23 views
AngularJS app.controller syntax error?
I am applying code to my project run by this guy https://github.com/simpulton/angular-photo-slider/blob/master/js/app.js. He has a little syntax error already, and the console tells you about it, but ...
-1
votes
0answers
31 views
Angular JS method inside controller problems
I have a method inside a controller, I think I have put it the right way but Angular keeps saying that uploadController is not a function, got undefined. This is the code:
...
0
votes
2answers
27 views
Using remote data in AngularJS app
Can someone ELI5 how to grab json data via GET in Angular, and have it available to a controller -
I'm currently doing this:
app.factory('dataRepo', function($http) {
return {
getData: ...
0
votes
1answer
35 views
$q not returning the promise that I've sent
I have an issue that is taking out my patience. My promises started not working and I think it maybe a version issue for me. I've made this code several times and it worked like a charm:
...
0
votes
0answers
42 views
404 Error with Angularjs TemplateUrl Routing
I am following this tutorial, trying to have a SPA inside my MVC3 application where the SPA is called by a controller, DemoController.cs.
Here is the site: https://drive0.azurewebsites.net/demo/
I ...
0
votes
1answer
67 views
Is it an angular ngRouter bug or am i doing something wrong
this code is from the AngularJs docs for ngRouter
angular.module('ngViewExample', ['ngRoute', 'ngAnimate'],
function($routeProvider, $locationProvider) {
$routeProvider.when('/Book/:bookId', {
...
1
vote
0answers
23 views
AngularJS delay Route change after transitions
I have enter and leave (javascript) animations on ng-view. When the location changes I would like to animate out multiple elements in the current view, then, when those animations are completed, ...
2
votes
1answer
24 views
configure angularjs module to send patch request
I am totally new to AngularJs. I am trying to send a PATCH request using Angularjs to Django Tastypie API's. My code is
var module = angular.module('myApp', []);
module.config(function ...
0
votes
1answer
44 views
AngularJS ng-repeat doesn't update when LocalStorage is changed (using store.js)
In my view I want to display a list of items (subject names) which are saved in a LocalStorage element. My code in the view looks like this:
<div class="list">
<a class="item" href="#" ...
0
votes
0answers
26 views
generate csv from web api httpresponse and receive it by angularjs for download
I am trying to generate a CSV file from my web api and receive that file through angularjs. I have an API controller like below:
[HttpPost]
public HttpResponseMessage GenerateCSV(FieldParameters ...
0
votes
1answer
17 views
AngularJS: output array (with keys) from php in ng-repeat?
I have a rootScope variable that will contain category for products, and each category may or may not have children. This is how I assign the rootScope:
$rootScope.categoryList = ...
0
votes
0answers
28 views
Why http request call error callback
Why http request call error callback when data is returned from server? My code:
var app = angular.module('app', []);
app.controller('MarkerList', ['$scope', '$http', function($scope, $http) {
...
0
votes
1answer
25 views
Adding AngularJS on top of existing Node.js, Express, MongoDB and Socket.io Stack
I've been developing a web app using Node.js, Express, MongoDB, Mongoose and Socket.io for some time now. Version one has just been released and is working great. For version two however, I want to ...
0
votes
1answer
28 views
how to initialize Angularjs ng-model in rails
A question about using angularjs two way binding and in rails erb files.
Suppose value of input in my .erb file has an original value i.e.
example.erb
<input type="text" value=" <%= ...
0
votes
0answers
36 views
Angular dynamic added element
I have two buttons first I added normalny in html file and the second which is generated dynamicly by jQuery the buttons looks like:
1.<button class="btn btn-primary glyphicon glyphicon-plus" ...
2
votes
1answer
36 views
AngularJS ng-click stopPropagation
I have a click Event on a table row and in this row there is also a delete Button with a click Event. When i click the delete button the click Event on the row is also fired. Here is my code.
...
0
votes
1answer
31 views
download csv file from web api in angular js
my API controller is returning a csv file as seen below:
[HttpPost]
public HttpResponseMessage GenerateCSV(FieldParameters fieldParams)
{
var output = new byte[] { };
if ...
0
votes
1answer
28 views
AngularJS ng-grid - Intialize grid after route is successfully loaded
Is there any way to load the ng-grid dynamically? i.e., the grid options should be initialized after the route change. Kindly have a look at the below code,
Method One:
app.js
var app = ...
0
votes
1answer
14 views
Placing limit on API calls based on DOM insertion promises
I'm trying to limit the number of API calls I am making if I already have enough elements on the DOM.
But it seems in between the promises and the actual insertion, my check isn't being triggered in ...
0
votes
1answer
18 views
call function inside $sce.trustAsHtml() string in Angular js
I am developing an app using Angularjs and adding HTML using $sce.trustAsHtml() in my page. I want to call a function in above dynamically added content. My html and script as below.
HTML
<div ...
1
vote
0answers
25 views
How to bring ng-table inside tab?
I've trouble having to implement the ng-table inside tab. I'm using ng-include to include the template into tab which contains ng-table attrubutes. When changing tab to tab ng-table not working?
When ...
1
vote
1answer
37 views
Pattern for sharing a library between angularjs and node.js
How can I share a library between angularjs and node.js?
For example an angularjs service is often a reusable piece of code. Let's take a URL library as an example (pick apart and construct URLs).
...
0
votes
2answers
36 views
$resource callback with saved value
I've just started using AngularJS and I love it.
However - I have a need to save an item to my database using $resource and then get back and object containing the values of the newly created item ...
0
votes
1answer
29 views
Localizing routes in Angular
I am trying to create an Angular app in multiple languages but I have come across and issue with the routing. I found a workaround to make the necessary routes valid for 2 languages :
var app = ...
0
votes
1answer
24 views
AngularJS adding inputs that represent an array model
Simple AngularJS questions that I can't get my head around.
Plunkr: http://plnkr.co/edit/OjaooVOQBEETkhaZFbWG?p=preview
HTML;
<div ng-repeat="label in likedLabels">
<input ...
0
votes
0answers
23 views
AngularJS select ng-change function not finding selected model
I'm having trouble with some basic angular databinding.
my view:
<select
ng-model="selectedPerson"
ng-options="person.name for person in testdataset"
...
0
votes
0answers
15 views
Custom data response in responseError interceptor
I am trying to return custom response when 500 err response occurs. i am handling this in the resource/service so controller doesnt have to worry about it.
Following the docs, i created interceptor ...
4
votes
1answer
61 views
Graceful improvement (not degration) with Angular.js? [on hold]
We're relaunching the landing page of our company (contains an info, jobs, team and help section) and decided we'll no longer maintain a Rails project only for this part of our service and therefore ...
0
votes
0answers
16 views
Angularjs URL Forward bumps to bottom of page
I'm trying to forward to a new url once a form submission completes. Everything works fine, and the forwarding works with the code i'm using, however the view of the window bumps to the bottom of the ...