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
Angularjs addClass/ removeClass
I'm quite new to Angularjs I've been trying to get this code working, but I've not been able.
I need to add and remove a class on click.
I have the jQuery version working fine :
...
0
votes
0answers
2 views
angular js Services.. Access to restricted URI denied
Access to restricted URI denied. iam using http service...
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope,
$http)
{
...
0
votes
0answers
3 views
Making sure only one $http GET is issued using angular's $httpBackend testing utilities
I want to unit test an angular service which caches $http GET requests.
In order to do that, I want to make sure only one $http GET is issued.
Here is my unit test:
it('should use cache', ...
0
votes
1answer
5 views
AngularJS Application do not running using ui-router
I am trying to use ui-router in a new project, I followed many tutorials and documentation, but I cant't understand why my application is not launching. I am in the very start and do not have too much ...
0
votes
0answers
5 views
Angular-datatables fetch data from angular provider
I am using an angular provider as a data storage for my application. I am using it to load data from the server side. What I am willing to do is to show some data with the help of angular-datatables. ...
2
votes
0answers
11 views
Why is two-way databinding in AngularJS an antipattern?
AngularJS offers two-way databinding.
I built several AngularJS apps and found two-way databinding to be a powerful feature, that increased my productivity.
Recently however I come more and more ...
0
votes
1answer
14 views
Angularjs broadcast and on query
I am learning angularJS broadcast and emit . The below code doesn't seem to work i.e the FirstCtrl and SecondCtrl are not receiving broadcast messages . Any
<div ng-controller="FirstCtrl">
...
1
vote
1answer
9 views
Angular 2 update view on component propery change
I created simple WebSocket service and a component and i have hard time updating view when new data is recived through websocket.
websocket.service.ts
import {Injectable} from "angular2/core";
...
1
vote
0answers
8 views
AngularJS SlimPHP CRUD - $http.delete doesn't work - XMLHttpRequest cannot load
Have an issue making a CRUD using AngularJS and SlimPHP v3. Everything works for $app->get and $app->post but got an error for an $app->delete.
I have frontend and backend on different domain names, ...
1
vote
1answer
18 views
Angular JS dynamic table generation issue with error class
Hi all I have used the following example to generate dynamic table as per my need
https://jsfiddle.net/shanidkv/vbft1sc4/
Modified the table as per my own with my own error class
<tbody>
...
2
votes
0answers
25 views
How to remhove file not found in angular2-seed?
I am trying to make hello world in angular 2. I am using this architecture: angular2-seed.
I did the following thing.
Create package.json file using npm init and then intall npm package. Here is my ...
1
vote
1answer
15 views
How to control invoking of directive
In this plnkr :
https://plnkr.co/edit/F0XsOPZKq5HArFo9vtFs?p=preview
I'm attempting to prevent a custom directive being invoked by the use of ng-show. But if check console output when the directive ...
0
votes
0answers
7 views
AngularJS passportJS user logged out after page reload
I followed the Chirp MEAN stack tutorial to add passportJS authentication to my site (https://github.com/hwz/chirp).
Login and registration is working fine (passport, store and lookup user in ...
0
votes
0answers
4 views
Protractor - is there a way to Do a click/drag event with x,y coordinates
I have diary page with rows (time) and columns(person). I want to drag and select three rows from top to bottom. Please help me on this.
0
votes
0answers
10 views
ng-hide & ng-show in leaflet legend
I tried to create a leaflet legend using the 'ng-show' and 'ng-hide' attributes.
Unfortunately, the legend is not created on site load but on map load.
The attributes don't seem to work if they are ...
0
votes
0answers
7 views
How do I set up django-rest-auth properly with my angularJs project?
I am trying to set up django-rest-auth with my project using the sample app.
Let me tell you what I did so far, I downloaded the scripts folder containing app.js, controllers, and services and placed ...
0
votes
0answers
17 views
AngularJS: “Uncaught TypeError: $injector.get(…) is not a function”
This error occurs only when I minify my code. I'm quite sure it has everything to do with minification. Debugging Angular leads to this line:
$injector.get($loaderFactory)(loaderOptions)
...
1
vote
1answer
26 views
What's the point of having 'one-directional binding' (<) in Angular 1.5?
With the introduction of components concept in Angular 1.5 one-way data binding (<) was also introduced. However, manual is saying:
Note however, that both parent and component scope reference ...
0
votes
1answer
13 views
Angular data binding - ng-book claims you should bind by object attribute. why?
“it’s considered a best-practice in Angular to bind references in the views by an attribute on an object, rather than the raw object itself.”
Excerpt From: Ari Lerner. “ng-book.” (page 66 in the ...
0
votes
0answers
10 views
How to add new comment in wp-api using AngularJS?
I want to add new comment to wordpress's post in WP-API using angular js. And this is my function to do that:
WPService.setComment = function(comment) {
var data = [
{
...
0
votes
2answers
10 views
Angular2 + Scala Play2?
I am somewhat new to the domain of web development. I am investigating Play2 and am trying to understand, do you need some kind of JS frontend framework to go with Play2 and Scala?
I notice that ...
0
votes
0answers
22 views
Angularjs - data updated in controller not updaitng in view
I have two arrays one of which is doing ng-repeat at and one at inside . the combination of it gives as a parameter to a function and function return the exact result. It is working fine up to here.
...
0
votes
0answers
18 views
can't view array objects using ng-repeat
I am pretty new to angular and trying to build a small app with rails as backend. I am trying to iterate over an array of objects and display them on the view though somehow I don't seem to be able to ...
0
votes
1answer
15 views
Angular Leaflet Search control event
I have an AngularJS application and I'm currently trying to access the "search_expanded" event of Leaflet Search control but having no luck.
Here's my code:
angular.module('myApp', [ ...
0
votes
0answers
9 views
stuck in angularjs login page elimation
I'm working on angular js. my application has its own login page. now we have separate sso service. So by using external service we login, and authentication s happening over there. then we need to ...
2
votes
1answer
19 views
ng-model not working for certain attributes in angularJS
Hi I encountered a problem with ng-model. I want to create an edit page for admin user to edit the rest of the user's permission level.
So, I listed out all the user's attributes in the edit page, ...
4
votes
1answer
25 views
Angular ui-router not extending parent view
I am trying to extend a parent view to a child view.
My route.js
let view = {
'': {
templateUrl: '/app/content.html'
},
'sidebar': {
templateUrl: '/app/sidebar.html'
...
1
vote
1answer
10 views
How to check if a user is authenticated using AngularJs and a Django Rest backend?
In a normal django project without rest, I did something like this in the templates:
{% if request.user.is_authenticated %}
<p>Hello {{request.user.username}}</p>
{% else %}
<a ...
0
votes
1answer
12 views
How to pass query string parameter in angularJS and how to receive it on node server?
I am making an api call through my service, as follows:
$http.get('/api/subCategories/'+parent).success(function(response){
$scope.subCategories = response;
});
The variable parent is what ...
0
votes
1answer
19 views
Use of isolate scope - @, &, and = in a simple Angular Directive
I have made a simple example with Angular.js directives for 'Celebrity Name'. I am reading about isolated scopes @,&,=, but I dont know how to use these in the following simple example to ...
0
votes
1answer
7 views
Firebase security: json data restriction
To my understanding, Firebase data can be accessed in the browser by appending the node name and .json extension.
For example, opening this url https://tinderclone.firebaseio.com/profiles.json,
you ...
0
votes
0answers
8 views
Error :$parse:Syntax while using pagination through angular bootstrap
I am having trouble using pagination on my tpl pages.
The problem that occurs while using pagination is
The output that is shown on the web page is this
The node and build tools version that i ...
0
votes
0answers
15 views
How to get around angulars performance issue with large content
I'm familiar with angular's digest cycle and how it affects performance with long lists and large model values. I'm just curious if you have any workaround for the problem specifically for my case.
...
1
vote
1answer
26 views
ng-repeat not working while traversing JavaScript array of objects
This is my controller code
var myApp = angular.module('myApp',[]);
myApp.controller('restaurantController',['$scope','$http', function($scope, $http){
$http.get($scope.something).success(function ...
0
votes
2answers
29 views
How to display Image in Div using Angular Js
This code is working fine To display Image in Img Tag
$scope.isImage = function(ext) {
if(ext) {
return ext == "jpg" || ext == "jpeg"|| ext == "gif" || ext=="png"
}
}
...
-1
votes
1answer
19 views
How to remove parent element in case child elements are removed from DOM?
Script
$scope.removableElement=['NAME','TITLE'];
<div>
<h5>Name</h5>
<div><input type="text" ng-if="removableElement.indexOf('NAME')!=-1"/></div>
...
0
votes
2answers
20 views
Use ASP.NET MVC routing parameters showing undefined in angular js controller
This is my Url which is using asp.net MVC routing
http://localhost:23293/Exam?id=1
i want to access id parameter in angular js controller
aoeapp.controller('ExamController', function ($scope, ...
-1
votes
0answers
18 views
How can i parse nested json array using ANGULARJS call from c# webmethod? [duplicate]
I have nested json array and trying to retrieve data from c# webmethod by using angularjs call.
Nested Json String
{
"Emp":[{"Name":"Red","Age":20},{"Name":"King","Age":18}],
...
-2
votes
0answers
17 views
Dynamic UI Elements in Angular
I am just starting with Angular.
I have a webservice that is returning the type of HTML element to be created in the UI . The response format from the webservice is as follows:
<UI Element ...
0
votes
2answers
13 views
html5 input type=“number” doesn't work with ng-model=“selectedItem.price” in angularjs
why does angular model doesn't work with the input type number? but works in input type text.
here's my code
<input type="number" step="0.01" name="price" ng-model="selectedItem.price" ...
0
votes
1answer
9 views
Angular-Meteor: What is the proper way to cancel client side changes?
I have seen the save method in several tutorials that make the collection.update call to save the changes made on the client but what is the proper way of discarding the changes?
0
votes
1answer
9 views
Control bound to a function but the function cannot access factory of another module
I have this code where a control is bound to a functon that uses a factory from another module. this.xyzFactory is undefined. Can anyone help me ?
function getName1() {
return ...
0
votes
1answer
14 views
how to install and use angularJS plugin in rails
I wanted to use this angular-number-picker plugin in my rails project.
I downloaded the .min.js file and the .js file and put the in the plugins folder. Then I also included the js in
...
1
vote
1answer
14 views
AngularJS lost data from multipartForm directive to routes
I am trying to build an Excel file uploader and parse the data in the routes to store it but it appears the data is lost in translation from the FormData sent in through the $http service route. I ...
0
votes
2answers
17 views
Displaying 12 records per row with bootstrap, the remainder should go to the next row
I am trying to display a dynamic number of users in the bootstrap grid:
<div class="row">
<div ng-repeat="Contact in Contacts" class="col-md-{{12 / Contacts.Count}}">
<img ...
0
votes
1answer
15 views
passing variables into angular-ui modal
I'm having some issues transferring the modal example from the angular-ui documentation here: https://angular-ui.github.io/bootstrap/#/getting_started
I keep running into this error:
Argument ...
0
votes
0answers
14 views
ionic 2 + angular 2 - tabs + side menu
I'm trying to join tabs and side menu together, I'm confused on what I'm doing wrong. since root belongs to sidemenu..
import {App, IonicApp, Platform} from 'ionic-framework/ionic';
import ...
0
votes
0answers
5 views
how to open pdf file directly instead of prompt window in ie11?
For every browser my view pdf link does not ask any permission to open the pdf file it will automatically open. but in ie11 it is opening the prompt window first and than file is opening afterwards. ...
0
votes
1answer
24 views
Hide placeholder after the first entry
I have this AngularJS code which allows user to add multiple tags.
<tags-input min-length="1" add-on-comma="true" add-on-enter="true" ng-model="modalData.tech" placeholder="Add Tags" ...
0
votes
0answers
7 views
Angular Autocomplete with Django Queryset
Has anyone ever combined Django queryset with Angular autocomplete? I don't want to use any other autocomplete functions if I can stick to Angular's.
I used to have a dropdown menu for users to ...