Questions tagged [angularjs]

89831 questions
1

votes
0

answer
223

Views

AngularJS - Validate when ng-model value not in Select options

I have a situation where the ng-model value may sometimes not be present in the ng-options list of a Select dropdown (ID of a user that is no longer with the company saved in a record, for example). AngularJS's behavior is that it adds an empty option to the dropdown, but does not mark it as Invali...
cheluto2
1

votes
0

answer
48

Views

how to set default view using angular-route-segment (not in index.html) angular js

In my MEAN application for nested views I am using angular-route-segment. Everything works fine with the nested views except for the initial default screen. my first page (index.html) contains header & footer with buttons connect & disconnect. This theme is common in all the pages. once I click conn...
Krishna Kiriti
1

votes
0

answer
369

Views

Is it possible to use Jasmine without Karma for testing Angular/Node based Nw.js apps?

I've read ton's of tutorials, but I must admit that this testing stuff is still very confusing to me. I have a Nw.js app which (of course) uses NodeJS and also Angular. I've installed the Jasmine test framework globally via npm and wrote an example test which starts with the following lines, and pla...
Bernd
1

votes
0

answer
34

Views

angularjs extension development kit

I have an angular application running, now some other team wants to add their module to my application and I don't want to change my existing application code. So, I am thinking of exposing some kind of xdk to that team so that they can build their own angular module add it to xdk and my application...
Bhushan Goel
1

votes
0

answer
90

Views

WebRTC adapter.js returns empty object

I am building a WebRTC app with the front-end emplyong adapter.js and AngularJS. A call to the function getUserMedia from adapter.js the success handler returns an empty object as the stream object. Below is a snippet of the code. index.html main.js $scope.constraints = { audio: true, video: true };...
tej-kweku
1

votes
1

answer
31

Views

Unable to display content on browser -AngularJS

I am new to angularJS and I have been learning from a book on AngularJs. I tried running one of the examples given in the book but I cannot see the content. This is the code Shopping Cart Your Order {{item.title}} {{item.price | currency}} {{item.price * item.quantity | currency}} Remove var...
RishiC
1

votes
0

answer
26

Views

gruntfile taskrunner compilation error in angular js 2 project

I am working on asp.net project using angular js 2 in VS 2015. I am using webpack and gruntfile. I have a task in task runner which is giving error like this: Running 'ts:base' (ts) task Compiling... Using tsc v2.0.6 >> Compilation failed Warning: Task 'ts:base' failed. Use --force to continue. Abor...
Asif Hameed
1

votes
1

answer
36

Views

How to extract response body from Angularjs CacheFactory

I am new to Angularjs and trying to learn cachefactory. I am having trouble reading the response data using cachefactory. As of now I am just trying to print it on console immediately after calling the rest api. My javascript controller is: (function() { 'use strict'; angular .module('productManage...
NoNameNewbie
1

votes
1

answer
96

Views

Not sequential execution of JavaScript with Protractor tests

Whenever I try to run an automated test script written using JavaScript with Protractor, I can see that these two are actually ran in parallel independently of each other. Example: it('Validation of ND account', function() { // I logged in, and navigated to the page I need // And this is where is ge...
Sergey Pleshakov
1

votes
0

answer
52

Views

D3 fisheye distortion issue for simple line chart

I am bit new to d3.js, looking to implement fish-eye/magnifier to the simple line chart, the problem am facing i do not see any change/movement in the chart when mouse is moved, what could be the problem with my code, could anyone please point me out in right direction, any help will be much appreci...
Praveen
1

votes
0

answer
118

Views

angular js directives change Color svg element

I have successfully loaded a svg correctly. I want to change the color of the svg rect. I created this directive to do that but it doesn't work: directives.js: angular.module('svgApp').directive('place', ['$compile', function ($compile) { return { restrict: 'A', scope: true, link: function (scope, e...
said
1

votes
1

answer
133

Views

Nativescript: Failed to allocate a 1553380 byte allocation

I'm using Nativescript with Angular and the object of the app is to take photos and then send them via email. I'm using This GridView to display captured images to the user as you can see in the image below: Now as you can see this is the virtual emulator and the app works fine but when I try the ap...
SlimenTN
1

votes
1

answer
45

Views

JSON post returning null when passed from view to controller

vm.Name returns null when it's passed from view to controller but when I call for the data in view, it shows up fine. $scope.afterSelectedIngredient = function (selected) { if (selected) { $scope.selectedIngredient = selected.originalObject; $scope.newIngs = []; var ing = {}; ing.Name = $scope.selec...
klent
1

votes
0

answer
175

Views

CORS issue with Okta - AngularJS controller call to .NET Core Controller

I currently have a .NET Core 2 web app which serves up data to the frontend via AngularJS 1.6.6 calls to the backend API. When users enter the first page of the site (index.html), an AngularJS controller does an HTTP Get to grab some data from the database to serve up in a table. I'm trying to inte...
thunder chunky
1

votes
0

answer
194

Views

How to retrieve all children from Firebase Database

I'm trying to learn how to use Firebase by creating a simple social media application. https://i.stack.imgur.com/wfeyw.png (Here is how my database is laid out) I was able to add data to the database but I'm having trouble understanding how to retrieve data. I want to be able to retrieve all the pos...
KevinDunbar
1

votes
0

answer
74

Views

Tried both ng-repeat and ng-options for select dropdown; query results keep coming back empty

First, let me make a couple of disclaimers: This is my very first time posting a question here. I only do so because I've tried numerous possible solutions to similar questions over the past 24 hours and gotten nowhere. I'm also a complete newbie to AngularJS (using 1.5.6). I'm starting to understan...
Eddie
1

votes
0

answer
58

Views

route-to-component accessing wired ui-view bindings in resolve

I'm using ui-router with a component architecture. In my template I have something like . How can I access the projectId binding from within a resolve? The following will throw an error as no provider is found for projectId. { state: 'test', resolve: { test: (projectId, MyService) => MyService.get(p...
rodney757
1

votes
1

answer
241

Views

Gulp restart the server when i changed my front end(Angularjs) controller file

I have this gulpfile.js // Dependencies var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); // var notify = require('gulp-notify'); var livereload = require('gulp-livereload'); // Task gulp.task('default', function () { // listen for changes livereload.listen(); // configure nodemon n...
Mohamed Sameer
0

votes
0

answer
31

Views

Cordova webintent limitation

i am using cordova webintent in my project for updating internally. which is working fine with android 6. I have this new device which is in android 9 and when i try to update my app it says Failed to open android intent. I have been searching the net if theres a limitation of cordova plugin webinte...
-1

votes
0

answer
11

Views

Sharing data between controllers in AngularJS 1.6.5

We are using AngularJS 1.6.5 in conjunction with PHP. I do not have a choice in this matter. Part of the reason that my organization chose Angular was the idea that we could use predefined services to conditionally share scoped data between controllers, and have interface elements react in real time...
Carl Hamlin
1

votes
0

answer
55

Views

ModalService $on & $broadcast multiple instances

These are the methods in the same angular controller. The problem is that the $on is called every n clicks. So if it's the 3rd time i clicked to show the popup. The $on will run 3 times and the $broadcast once. I'm trying to kill the $scope, but it's not working. It seems the controller ( which is a...
NicoJuicy
1

votes
0

answer
53

Views

How can have multiple Modules without repeat injections

I have 2 applications app1 & app2 app1.js var app = angular.module('app1', ['ngRoute']); app.config(['$routeProvider', function ($routeProvider) { $routeProvider.when('/view3', { templateUrl: 'http://localhost:40/partials/partial3.html', controller: 'MyCtrl1 as self' }); $routeProvider.otherwise({ r...
Maher
1

votes
2

answer
260

Views

Can I check the condition and change the value of variable in ng-click

ng-click='(document.getElementById('procheck1').checked)?showme=true:showme=false' (or) ng-click='if(document.getElementById('procheck1').checked){showme=true;}else{showme=false;}'
Godwin
1

votes
1

answer
189

Views

Loading a JSON file inside AngularJS custom filter

I'm new to Angular JS. I created a custom filter function and I have separate JSON files (which contain language translation data). I'm storing the user's option in the local storage, and I want to load a specific JSON file's content into my custom filter based on that local storage value. Ex: If th...
apple_92
1

votes
0

answer
50

Views

How to test AngularJS controller using Karma-Jasmine

I am trying to use Jasmine and karma to set up unit tests like explained here, in my already developed Angularjs application. I created a simple test file for my controller like this: describe('controller test', function() { beforeEach(module('ipaApp')); var $controller, $rootScope; beforeEach(injec...
Manoj Suthar
1

votes
0

answer
46

Views

Cant read url parameter with $location.search

I only get an empty object using $location.search() having an url like: http://localhost/?test=baz so $location.search().test becomes undefined. Why? On https://www.metaltoad.com/blog/angularjs-query-string-handling-using-locationsearch I can read Note: $location.search() will cause the page to relo...
Anders Lindén
1

votes
1

answer
53

Views

How to retrieve data faster from angularJS get call

I'm calling angularJS get call and parse the response and showing the response in UI, but I see a slight delay on the UI, is there a way that I can fix this: Here is what my code is : controller.js: function controller($scope, empDetails) { var empName; empDetails.getEmpDetails().then(function succe...
Developer
1

votes
1

answer
36

Views

Make 2 modules in 1 project

I have a mean-stack project. In my index.js, I have in the end router.get('*', function(req, res) { res.sendfile('./views/index.html'); }) module.exports = router; Now I want to treat all the webpages matching https://localhost:3000/1/addin/* by ./views/addinIndex.html, where I expect to refer to di...
SoftTimur
1

votes
0

answer
34

Views

Angular JS Code Produce Unexpected Error

In my script code i a trying to post multi request . With this post request i sending data to server to check the validation . but the problem is its showing error , Expected on several lines and comments on that line where the error is showing .. here is my code . ///// var app = angular.module(...
Mohammad
1

votes
1

answer
53

Views

AngularJS Component to Watch and Display Notification when UiRouter Route Changes

I have two components on my page: Navigation component and Form component. I want to notify the user if they navigate away from the page (via clicking on the Navigation component or pressing the browser 'back' button) if the form is dirty. I have already implemented the dirty checks, but I don't kno...
Jon
1

votes
0

answer
116

Views

Is there any package for atom which autocompletes custom components?

I installed lots of packages to atom including emmet,auto complete HTML,angular and typescript plugins. All standard angular tags gets loaded. But my custom component name don`t get loaded. Do we have a plugin for this ? This is my HTML file This is my component ts file
AMendis
1

votes
1

answer
40

Views

Strange behaviour of <select> based product filters causing empty select boxes

I'm currently struggling hard with Angular 1.4. Since I'm coming from the React world I don't know all base concepts of Angular yet. I'm trying to build a (I thought) simple product filtering UI. As you can see, I currently have 3 select boxes. The two upper ones are responsible for filtering a list...
dome2k
1

votes
1

answer
44

Views

How to use zingchart with ng-repeat so i can show different data on different charts. Is there any way

The array is array = [{ humidity: 100 , max_temp: 289.48 , min_temp: 288.597 , pressure: 1005.27 , sea_level: 1030.68 } , { humidity: 84 , max_temp: 300.73 , min_temp: 298.697 , pressure: 1026.02 , sea_level: 1026.67 }] Code in HTML is 0 : Humidity {{obj.humidity}} 1 : Maximum Temprature {{obj.max_t...
Anuj Kumar Pal
1

votes
1

answer
47

Views

Could not get the file parameter value using Angular.js and PHP

I am facing one problem. I am trying to upload file using Angular.js and PHP but I can successfully send the file parameter value but in PHP side I could not get it. I am explaining my code below. workspesh.html: Attachment Attachment workspeshController.js: $scope.uploadedHosFile = function(element...
1

votes
0

answer
12

Views

After mdBottomSheet hide its remove ng-click fire

i insert in my code mdBottomSheet show and button that open it. this is my mdBottomSheet code: $scope.selectPhoto = function () { var options = { templateUrl: 'student-details/camera-buttons.tpl.html', scope: $scope }; $mdBottomSheet.show(options); } this is my button: after i click the button the m...
kfir
1

votes
0

answer
17

Views

How to Navigate to a New Page and a Specific Section of a Bootstrap Carousel in AngularJS

I have a page that uses an AngularJS controller (Ctrl2). This page has a button on it that is supposed to navigate the user to another page with a completely separate controller (Ctrl1) and then to slide 1 of a carousel. How can this be done? Cshtml View for Ctrl2: Controller 2 Go to Controller 1, S...
crackedcornjimmy
1

votes
1

answer
397

Views

EISDIR error with “Cordova crypt file plugin”

I have an ionic application built using ionic V1. Everything was working fine until recently. Now this EISDIR error keeps popping up whenever I try to build it. After a lot of debugging, I found out that cordova-plugin-crypt-file was causing the issue. Because when I disable it, the project successf...
2xSamurai
1

votes
0

answer
49

Views

Custom Angular Accordion - Not Responsive

I'm pretty fresh to using Angular. Right now I'm stumped on this angular accordion: http://jsfiddle.net/3sVz8/19/ angular.module('angularSlideables', []) .directive('slideable', function () { return { restrict:'C', compile: function (element, attr) { // wrap tag var contents = element.html(); elemen...
Alex Sieben
1

votes
1

answer
41

Views

AngularJS directive with binded function patrameter

I have an AngularJS directive with function parameter, and it works perfectly when I call the directive simply it works, and I want to generalize it. What I got so far: .directive('panelBox', function () { return { restrict: 'E', scope: { values: '=', calculatefn: '&' }, templateUrl: '/ProfitCalcula...
Erez Konforti
1

votes
1

answer
120

Views

AngularJS + UI-Grid + Bootstrap tab + Application Performance

I am using bootstrap (uib) tabs, angular 1, angular-ui-grid. Each tab contains a single grid and each tab can also have sub tabs. I am facing sever performance issue in application. Data nature - Tree structured which can not be paginated. And size could be in MB's. I tried 2 approaches: Approach 1:...
Vipul Goyal

View additional questions