Tagged Questions
AngularJS (a.k.a. AngularJS 1) 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 applications are also frequently known as ...
0
votes
0answers
2 views
How to use an AngularJS application in a servlet environment?
I am new to AngularJS and SPA development. I wrote an application that works well on the desktop. It queries a remote Jersey based API. My question is this: I build the application using ng build. It ...
0
votes
0answers
6 views
Display different numbers of items with ng-repeat
I have a question. How can I do this example with ng-repeat?
var collection = ['A', 'B', 'C', 'D', 'E'];
<div class="item active">
<p>A</b>
<p>B</b>
</div>
&...
0
votes
0answers
7 views
Ionic2 angular2 http get json from external api
I am aware that this might be a noob question since I've seen more complicated stuff, but to understand the complicated I need to understand the easy stuff first.
I am trying to get the name from a ...
0
votes
1answer
5 views
Confusion on State Provider in coffeescript/javascript
New to Angular/Javascript:
I'm trying to remove an old coffeescript file (rent-roll.coffee) and replace it with rent-roll.js but am having an issue with the routing/state provider.
The existing ...
0
votes
0answers
7 views
pass data from angularjs controller to C# MVC CTRL
this is simple but it dosent work
in angularJS part i have this code :
var data={"ID":1,"Key":"********"}
$http.post("/Home/DeleteListItem", data)
.success(function (...
0
votes
2answers
9 views
How can I get the window width in angularJS on resize from a controller?
Ho can I get the window width in angularJS on resize from a controller? I want to be able to get it so I can display some div with <div ng-if="windowWidth > 320">
I can get the windowWidth ...
0
votes
2answers
16 views
How does tsc know where are the ts files to compile?
I am trying to learn angularjs v2 from the official documentation.
https://angular.io/docs/ts/latest/tutorial/toh-pt1.html
https://github.com/angular/quickstart
While following the tutorial in the ...
0
votes
0answers
7 views
Is it possible to decorate global function only inside a certain directive?
I have some problems with JAWS16 which read the actually source code inside aria-live instead of their value for bindable elements.
Using the code below, JAWS would read "bracket bracket item dot ...
0
votes
0answers
7 views
Route between Angular1 and Angular2
Need suggestions on routing between angular1 and angular2.
As of now, I have bootstrapped my current application using ngupgrade but need to know
1) How to route between angular1 and angular2.
2) ...
-1
votes
0answers
12 views
Angular component, validation not firing
I have a angular component and validation will not work to validate it has something selected. It seems to not have access to the form tab and unsure on how to make it see it. The validation works ...
0
votes
0answers
14 views
$compile not compiling whole string
I am trying to compile html in my directive to move into a table via jquery.
For some reason my $compile does not grab this whole string, it just grabs the repeat directive.
If I remove the <tr ng-...
1
vote
1answer
14 views
`a.map is not a function` error when trying to make NVD3 chart
I'm trying to make a chart with AngularJS and NVD3. But I keep getting an error.
Here's index.html:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
div....
0
votes
0answers
16 views
get Header in jersey from a GET request
From a js page (in angular) I call a REST request, GET method, were I would to pass an header, this is the function that I call from the REST request:
allstaffworking: function(_getstaff){
...
0
votes
0answers
18 views
Legend item hiding/showing other legend items
I'm combining spline and error bar charts. There are two separate error bar charts for min and max. Two error bar charts are needed because the min and max need to be shown/hidden with separate legend ...
-1
votes
0answers
16 views
how to check that current module is injected to other or not?
Assume that i have theses angular modules:
angular
.module('rg-core')
.config(httpConfig1);
angular
.module('rg-web', ['rg-core'])
.config(httpConfig2);
How can i check that rg-core are injected to ...
0
votes
0answers
4 views
ionic jsonp not work
I have the following code that only returns a 404 error with a jsonp call, I am following the following tutorial https://docs.angularjs.org/api/ng/service/$http#jsonp but I do not manage to make it ...
0
votes
1answer
16 views
Using directives from other modules
This seems super basic but for the life of me I can't figure out what I'm doing wrong. I'm trying to use a directive that's defined in a second module (that I don't control).
Here's my fiddle: http:/...
0
votes
2answers
18 views
Issue when referencing Angular directives
im trying to implement the AngularJs directives to my project but i'm getting stuck with this issue. I have the App.js, ControllerA (which includes a directive on it) and ControllerB. Note that both ...
0
votes
3answers
21 views
Angularjs add/remove function with ng-repeat and ng-model
I am making a form that has add/remove function.
To do that, I tried to use ng-model in ng-repeat.
Here's what my code looks like.
<button ng-click='add()'>Add more</button>
<div ng-...
0
votes
1answer
20 views
Angular 2 Routing - How to handle route match conflicts?
I have two routes I'd like to match for, but they conflict with each other. I have a generic route where path: ":page", but I have another specific route path: "id_token". Ideally the router would ...
0
votes
0answers
3 views
Angular - remove root from firebase everytime controller is loaded
I am learning to use firebase with angularJS by creating a super simple todo app. Everytime controller is loaded into the page (basically every page refresh), I want the data on my firebase to be ...
0
votes
0answers
25 views
cannot set property of null while cross domain only
I build a small app using the generator of HotTowel.
Then i build the app, config a port forwarding so i can have access from remote.
Checked on remote and is loading!
But i get this error: "cannot ...
-2
votes
0answers
18 views
angular hash bang strikes again
Can anyone tell me what I should look for if an angular app suddenly began rendering domain/#!/path from domain/#!/path?
I have been working all day and did not commit very much, so I'm digging ...
-2
votes
0answers
8 views
Agnular 2 - http interceptor
I need to check every http response error for 401. I found this http interceptor, but it for angular 1. Does this feature available in Angular 2?
0
votes
2answers
11 views
How to load/render nested UI-Views in UI-Router
I have an application with one page called index.html. This page is the main page inside the application which I load my partials into.
Here is my Index.html:
<body>
<!--<div id="...
0
votes
7answers
35 views
How to truncate decimals in JavaScript without Math library?
I need numbers to have only 2 decimals (as in money), and I was using this:
Number(parseFloat(Math.trunc(amount_to_truncate * 100) / 100));
But I can no longer support the Math library.
How can I ...
0
votes
0answers
9 views
How to extend older angular material design component with new component?
we have calendar to select date of birth in our web application, for that we used datepicker component of angular material 1.0.9 now we are planning to update our calendar with on focus date feature(...
0
votes
1answer
24 views
Checkbox inside anchor
I have the following code:
<a href class="dropdown-toggle">
<input type="checkbox" ng-model="test.checked">
<span class="fa fa-angle-down"></span>
</a&...
0
votes
1answer
12 views
Generate a dialog box, in a single controller. Angular.js
I made this code based on a tutorial. I want to know how I can use a single controller. I want to generate this dialog box, using only a controller.
http://fiddle.jshell.net/adnu6mmt/2/?utm_source=...
0
votes
0answers
35 views
Begginer. Trying to POST data using Angular, RESTful API, from a Ionic user input interface
I am building a mobile application that uses Ionic as an HMI. I'm having trouble with AngularJS to make the connection between my interface and my database. I use a RESTful API that uses Node.JS, &...
0
votes
1answer
16 views
How to display modal pop up based on ng-if value in angular js
I am new to angular js , i need to display the modal pop up box when the ng- if statement is false . could u guys please help me in this problem ?
in html :
<div ng-if="inputdata == false" >
...
0
votes
1answer
11 views
change default folder for base modules
When I imported a module in typescript, and writer import { Component, OnInit } from '@angular/core'; the compiler find the module in node_modules folder.
I want to change that to other folder, for ...
-1
votes
0answers
12 views
Ng-click from ng-bind-html function from another controller
I have a data from $http.
I use
In my "something" data I have
body uses controller global.
An this controller I defined
$scope.open = function() {
$scope.showModal = true;
};
...
0
votes
1answer
9 views
Failed to load resource in Node JS
I am doing a tutorial trying to learn Node and Angular. I am completely new to this, I come from a LAMP stack environment so it's a whole new world to me and I feel completely lost.
I have installed ...
2
votes
0answers
35 views
Angular 2 Component Library
I am trying to create a component library that I can share with anyone via npm. I am building my component lib with webpack. When I try to install my component lib into an Angular 2 project's module, ...
0
votes
0answers
32 views
Angularjs filters - subsequent filters not working
I have a page that has data filtered on a numerous amount of values.
for each list block i use
data-ng-repeat="c in vm.competencies | filter : c.competencyTypeID = <number>"
some of the ...
0
votes
0answers
12 views
Angular material autocomplete
Is there any way that I can implement autocomplete suggestions in material autocomplete angular js?
example:
Developers:
John
Adam
Testers:
Sam
Arnold
Like one in jquery autocomplete,
https://...
0
votes
0answers
23 views
angularjs 1.6 route provider not routing to route
I have ana angular app that I want to route.
app.config(["$routeProvider",
function ($routeProvider) {
$routeProvider
.when("/", {
template: "<h1>Home</h1>"
...
0
votes
1answer
21 views
How to call a function on click of date in html 5 datepicker input type
I had a html5 date-time picker.Now on mouseclick(select) of date from date picker I want to call a function.I wonder how can we do that in angular js ...can
someone help me.
html:
<div class="...
0
votes
1answer
11 views
UI Router inside promise redirection
This is my login controller:
export class LoginCtrl {
// tslint:disable-next-line:no-empty
constructor(
protected $http: ng.IHttpService,
protected $state: ng.ui.IStateService)...
0
votes
0answers
6 views
Re-opening Angular google maps Windows directive doesn't open
I have issue with re-opening window instance. First time around I click on marker, and window opens correctly. When i click the close icon, it closes correctly. When i then click the marker again, ...
1
vote
0answers
27 views
How to show a busy message while angular digest is running
I have a complex page (lots of ng-repeats nested) so the digest takes a while to finish. I want to give the user some feedback, so they don't think the browser is hung.
Below is a sample fiddle, ...
0
votes
1answer
47 views
Call controller function and pass value
I am trying to call a function in the c# controller and pass a value but I am getting the following error: `'Unable to get property 'then' of undefined or null reference'.
I added the Driver Model as ...
1
vote
0answers
16 views
Angular's Ahead-of-Time Compilation: ngCompiler.ReflectorHost is not a constructor
There is an angular app which is levarging offline compilation with Ahead-of-Time Compilation.
When running ng build --prod --aot the following error occurs:
ngCompiler.ReflectorHost is not a ...
0
votes
1answer
40 views
How to allow only digits?
Please help fix the script.
html:
<input type="text" ng-model="phone" id="phoneInput" ng-change="apt.changePhoneInput(phone)">
js:
var app = angular.module('app', []);
app.controller('...
0
votes
0answers
15 views
How can I pass an existing controller to a state with specific args for injecting if I need to pass it like a string, not a function?
I've implemented my controller like this:
angular
.module(appSettings.appName)
.controller('someCtrl', function (objectFromResolve) {
var vm = this;
vm.serviceName = ...
1
vote
1answer
23 views
Angular 2 and Firebase SDK
I've been trying to get the Angular2 quickstart app to work with Firebase (see this repository). I've installed the latest version of Firebase, attempted to load firebase using SystemJS (see systemjs....
0
votes
0answers
20 views
Protractor sequencing basic test. Run test after login
I am trying to figure out how to make this basic test pass consistently.
describe('home page', function () {
beforeEach(function () {
browser.driver.get('https://localhost:0000/xxxx/');
})...
0
votes
0answers
23 views
How to run function located in an array with ng-repeat
Controller:
$scope.maleworkouts = [
{ title: 'Rock City', url:"#/app/details", id: 1, num:"01", image: "img/men1.png", info: "mwd.w1", caloriesmain:PROGRAMATICALLY, ...
0
votes
2answers
20 views
Writing controller in AngularJS
I want using ng-controller to bring some data with using Bootstrap media object but i can't load data.
my code :
<!DOCTYPE html>
<html lang="en" ng-app="confusionApp">
<head>
&...