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
3 views
Identifying the user using jwt token authentication
I am using jersey rest webservice along with JWT with RSA signature token feature for authentication. I was able to successfully create and send token to the front-end. Now after I have achieved this ...
0
votes
0answers
6 views
How to create graph same as the reference video
Im here to get some help from you guys on creating a very similar animated graph in the video shared. Im using Angular js and HTML5, please suggest me the best option to create a animated graph very ...
0
votes
0answers
10 views
Force recompile of filtered ng-attr without $scope change
I am programming a chat application in which I want to have human-readable relative timestamps on messages. I am using a filter that takes in the JS timestamp and (with the Moment.js library) outputs ...
1
vote
1answer
18 views
Getting error “Failed to instantiate module {0} due to:\n{1}”
I'm going slightly mad with this. Why does this script works inside SE but does not work inside JSFiddle???
var myApp = angular.module('myApp', ['myControllers']);
var myControllers = ...
-1
votes
0answers
6 views
Migrating Silverlight MVVM Application to ASP.NET MVC - what JS framework should I choose?
One of the projects I am working on is written in Silverlight (5.0) and it is scheduled to be migrated this year, as Silverlight support will end in 2021 and some requested features are harder to ...
1
vote
1answer
10 views
Angularjs ng-if with ajax request
I'm new to angularjs and trying to figure out how to show/hide navbar elements depending on permissions. I'm currently getting the permissions via an ajax request:
...
1
vote
2answers
21 views
Inserting data into MongoDB using Angular JS
I am trying to insert some user input data to database, instead of mySQL i have decided to use MongoDB. here i have my input form
form.html
<div class="row" ng-controller="formController">
...
0
votes
0answers
9 views
Handle routes when using Angular combined with Express (Node.js)
I have the following config in angular
.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: ...
3
votes
2answers
27 views
Dynamically add a directive
I'm generating a report with collection of questions.
app.controller('reportCtrl', ['$scope','$stateParams', function ($scope, $stateParams) {
$scope.questions: [
{ questionkey: 1, ...
0
votes
1answer
18 views
Angular load route when ajax returns
How can I delay/defer a route/controller until an anonymous function returns? On app bootstrap, I default rootScope.me as guest account until it can check cookies for a logged in user.
I have a ...
0
votes
0answers
16 views
Pass parameters in RESTAngular
I am using angularJS, RESTangular.
I need to pass 3 parameter.
When I an passing 1 parameter like below, I am getting data
subjectAllocationEdit: function (Restangular, $stateParams ) {
...
2
votes
1answer
25 views
Can't deserialize the current json array into type
I just can't find a proper solution for this problem though i came across the same topic which was asked before.
Here is my sample Json which i am posting to a web api controller
{
...
2
votes
1answer
11 views
Determine Angularjs Controller based on route params
I have the following configuration for my route:
$routeProvider.when('/', {
controller: 'homeController',
templateUrl: 'app/views/main/home.html'
})
...
0
votes
0answers
10 views
Angular webapp using ngRoute executing controller constructor twice
I am using ngRoute.
index.html :
<body ng-app="mainApp" ng-controller="AboutController">
<div id="header">
<h1>Employee Gallery</h1>
</div>
<div ...
0
votes
2answers
24 views
Purposefully Invoke an Error in $http Post Request
I'm using Angular to send a post request with the $http service. I am doing all of the data validation of the form in Angular prior to sending the post request. However, there is one validation I am ...
0
votes
3answers
30 views
AngularJS $http.post returns an empty variable on successful callback
In my angular application, I am trying to sent the data to php script and then return a callback.
Here is the angular code:
var data = { value: 'somestring' };
$http.post("post_backend.php", ...
0
votes
1answer
36 views
Adding nested if else statements inside div
I have a problem, how to specify which picture should be added when value changes from certain point. I know i have done wrong coding but its because i don't know how to do it.
<img if({{h}} > ...
0
votes
0answers
10 views
Strongloop loopback how to assign static roles to new users
I have cloned a https://github.com/beeman/loopback-angular-admin
and I have created a couple of new roles using the loopback explorer but how do I assign roles to users that I create
I have a user ...
0
votes
1answer
19 views
Uncaught Error: [$injector:modulerr] Failed to instantiate module jacksApp due to: Error: [$injector:nomod]
I am trying to learn Angular and I having trouble getting it to load properly. I took a look at similar questions on SO about this, but could not find what I was looking for.
Does anyone see why ...
0
votes
2answers
17 views
Registered function for ng-change does not get fired
I am trying to implement ng-change whenever input value is changed for the text-field.
<html>
<body>
<script type='text/javascript' ...
0
votes
1answer
13 views
ngTagsInput does not seem to be supporting objects inside a JSON string
My CakePHP application generates a JSON output of all my categories as shown below:
{
"categories": [
{
"Category": {
"id": "7",
"name": ...
0
votes
1answer
8 views
Safari blocks CORS request to Express API
I have a simple node/express server which I use as an API for my AngularJS app. It's running at localhost:8080
let express = require('express');
...
let cors = require('cors');
...
let app ...
0
votes
2answers
13 views
Selection does not stick in AngularJS MultiSelect Binding
I'm trying to display selected values from a multiselect as separate objects in my view, meaning selected values will appear somewhere else on the form; the actual multiselect will be hidden, it's ...
3
votes
1answer
27 views
Modifying the scope of an Isolated Scope Directive in Angular
I'm trying to understand Isolated Scopes in directives. I have the following html:
<div new-test>
<h4>new scope : {{msg}}</h4>
<button ng-click="clicker()">new ...
0
votes
1answer
20 views
refreshing user.is_authenticated with angular and django rest framework
I'm using django rest framework on the backend and angularjs on the frontend. The problem is the login, in angular I do:
function ($scope, $http, User) {
$scope.login = function (user) {
...
0
votes
2answers
11 views
One ui-sref link working, the rest don't
I've got a page where I three links on an Angular template. The first link works, the second two don't. The first link shows the cursor as a pointer, the second two show the cursor as auto/default. ...
0
votes
0answers
10 views
SSE with angularJS and java in play freamwork
I'm new with SSE, so I decided to build website that works with SSE. I use in the client side angularJS and make my server requests with restAngular. my server side is written in java. I built ...
-2
votes
2answers
30 views
_.map and _.zip javascript syntax error
Using undescore.js:
(_.map(_.zip([v,xs]),function(rs){return {a:rs[0],x:rs[1]}}))
gives me a syntax error
Syntax Error: Token '{' is unexpected, expecting [)] at column 34 of the expression ...
-2
votes
1answer
30 views
How to bind 3 or more variables with 1:1 relationships in AngularJS?
Suppose I wish to make unit converter in AngularJS. Also I would like that multiple values change simultaneously on edit.
This means, for example, that if we have 3 variables, then on change of each ...
0
votes
0answers
10 views
Which is better: ui-grid angular or smart table angular?
The requirement is to have a custom CSS, sortable columns, global search.
A few apprehensions related to UI-grid:
The layout of UI-grid is based on divs, while that of Smart table is
like that of ...
-3
votes
1answer
45 views
Simplistic AngularJS example (Error: [$injector:nomod], Error: [$injector:modulerr])
I am trying to build simplistic and clear (for me) single-fiddle angular JS example and wrote something like
var myApp = angular.module('myApp');
var myControllers = ...
0
votes
1answer
27 views
Why one ng-app is working at a time?
I have 2 div each applied with a ng-app. But it is strange, that only one ng-app is working at a time. When I run the following :
<html>
<body>
<script type='text/javascript' ...
1
vote
1answer
19 views
Angularjs: change class on audio ended
I have small sample mp3 files that people can listen to, and made a little player with angularjs.
When the play image is clicked, the audio plays and the play images changes to a pause image by ...
2
votes
2answers
27 views
angularJS adding ng-href only if present in javascript object
I have the following javascript object that I'm building my navigation bar from:
$scope.slo = [
{
main: "IJS",
url: "https://www.ijs.si/ijsw"
},
{
main: "ZIC",
...
0
votes
0answers
10 views
Prerender.io not rendering my page properly
I am facing great difficulty in prerender.io as it is not rendering my page (angularjs app) properly.sometimes it does render properly and sometimes it does not.As I am first using this render.io I am ...
4
votes
2answers
28 views
How does the createSpy work in Angular + Jasmine?
I made a simple demo of a factory and I am trying to test this using jasmine. I am able to run the test but I am using the spyOn method. I would rather use jasmine.createSpy or jasmine.createSpyObj to ...
0
votes
2answers
22 views
How to ignore the text after some particular length using Angular.js
I need some help.I am fetching some data from database and displaying them inside table.I need when any column value will text character will more than some certain length ,it will display up to that ...
1
vote
0answers
23 views
How to solve ngtouch higglight issues
I use the angular-touch.
when clicking a close button on layer.
button is highlighted, and layer is hidden.
But strangely,
the page's button is highlighted moment after layer is hidden(only touch ...
0
votes
1answer
26 views
Getting <li> value with ng-model
below I have a selectable dropdown list. I need to pass the choosed value to ng-model directive:
ng-model="$root.specCategory_search"
But its not working in my example. How can I do it?
Previously ...
0
votes
1answer
15 views
Changing Angular UI router app root from “#” to something else
When I implement angular UI router in my app, my view URL appears as :
www.example.com/serverpath#/UIRouterPath1
www.example.com/serverpath#/UIRouterPath2
Now I want to change to something like
...
-1
votes
1answer
15 views
Knockout Bindings are not being applied when using angular templates
I'm trying to port an angular example to dukescript and navigation behaves as spected, but when tried to apply bindings nothing happened.
I've tried both with the script tag an in external files with ...
0
votes
2answers
15 views
Work with dynamic elements in AngularJS
I tried to make a simple counter with a variable displayed in html and a function to increment it, and it worked. But when i tried to display same variable in javascript in initialization step ( ...
2
votes
1answer
49 views
Controller is not called in angular ui
I am calling rest service in my controller to get the values like first name and last name etc but its not returning any values.
Here is my controller:
myApp.controller('profileController', function ...
1
vote
1answer
29 views
text not displayed in double curls
I am new to angularjs. I was trying the following code:
<html>
<body>
<script src='angular.min.js'> </script>
<div ng-app>
<span ...
0
votes
1answer
19 views
Angularjs gauge chart
I want gauge chart with angularjs + chart.js.
I have search this topic but I have not found any proper article.
Please if you have any link related with this topic or any demo than share with me.
...
1
vote
1answer
34 views
Angular $http.get not return data
I created a helper service to wrap the $http.get.
self.apiGet = function (url, success, failure, always) {
$http.get(url)
.then(function (result) {
...
-3
votes
2answers
32 views
how to use AngularJS and PHP? [on hold]
hello i am new in AngularJS and have PHP knowledge. I just start creating new eCommerce website in php but i want to use AngularJS for frontend and PHP framework for admin panel. Is it possible? if ...
1
vote
1answer
23 views
Do we really need “pascalprecht.translate” in input directive.?
I have a input directive which supports translate.
The directive has two property input label supports translate.
My doubt is the app which need has support translate will have the ...
2
votes
1answer
29 views
how to mock an alert in unit testing of angular
I am trying to mock the alert used in my application
Here is my factory code
app.factory('Handler', ['config', '$location',function (config, $location){
return {
log: function (message, ...
0
votes
0answers
23 views
How to assigning colspan to each td using angular js
I want to assign each colspan value based on the percentage. The below code is not working as expected.
<style>
.stacked-chart table {margin:0; padding:0; width:100%;}
.stacked-chart table tr ...