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
8 views
accessing element of inner function scope instead of outer in knockout
I have my code below. I have var viewData in my constructor appVM as null and in activate I am filling it with some value. Now I have to use activate scope of viewData instead of outer scope. what my ...
0
votes
2answers
9 views
variable inside ng-model does not work
I am trying to create a directive but before creating a directive I am stuck at a simpler task. I can't make this work for some reason.
<div ng-controller="NgModelTraining">
<input ...
0
votes
1answer
6 views
simple_form adding attributes with no value
I'm using simple_form under a Rails 3.2 app with AngularJS and haml.
I've got this input field where we are storing a cost and I would like to use the angularjs directive 'form-cents-to-dollars' but ...
1
vote
1answer
16 views
$scope saved is the scope of the last directive in a nested hierarchy
I wanted to nest directives and have each of them their own separate scope. However, when I click on any ID button, I get ID = 3 everytime.
Live copy of my codes here.
...
0
votes
0answers
19 views
Using two Controllers in single script file
Here I'm using single script file to declare two controllers.
My index.html
<html ng-app="myApp">
<head>
<title>Lesson 4 - Tuts + </title>
<script ...
0
votes
0answers
5 views
Karma/anglular, testing event listener on run
Bit of a strange scenario for testing - I have a listener in my .run I would love to be able to test with karma, I am not sure if I am approaching this correctly and could use some advice
So it's ...
0
votes
1answer
17 views
Bootstrap DatePicker style not working properly angularjs
Can someone help me look at this plunkr. The style seems not to be working.
<!DOCTYPE html>
<div ng-controller="testController">
<h1>Hello ...
0
votes
0answers
11 views
Rendering problems when scrolling in AngularJS
I'm having problems in several versions of Chrome when trying to scroll through a short (25 item) list in my app. The screen smears like so:
I've stripped the controller and ng-repeat element so ...
0
votes
2answers
17 views
Pass Selection Option to New Page
I've got a requirement to pass the currently selected option from an ng-option dropdown on one page and make it the default selection of the ng-option dropdown on another page.
I can save the ...
0
votes
1answer
19 views
AngularJs filter search after user press 'entrer'
I am going to implement a searchbox wherein user will input the string on the searchbox and will be filtered when button is clicked/submitted/pressed enter.
Here's my code below. In my view :
...
0
votes
1answer
17 views
Display data of objects in table in ascending order angularjs
When I console.log my details variable I get the following results:
details:{
111:{
2015-2-10 : 0
2015-2-11 : 0
2015-2-12 : 0
2015-2-13 : ...
0
votes
1answer
11 views
Loading Controllers Separately using Controller As Syntax and ngRoute
I have the following Angular Module, Routes and Controllers inside my index.js file. Nothing complex. So far I load this one javascript file into my Index.html file and everything work fine so far as ...
-1
votes
2answers
13 views
angularjs controller instantiation
When do controllers get instantiated? Is it the first time you visit that state? also, What happens when you revisit the state, does a new controller get instantiated again?
Assume that I have two ...
0
votes
1answer
20 views
Display Image stored as external URL from JSON file
I am a newbee at developing web applications using AngularJS. I am using NodeJS, Express and a dev database called Bourne for this web app.
I have created my api and am pulling the data from my ...
0
votes
2answers
17 views
Angular service injection issue
I'm new in angular and I have this issue, I have service and want to inject it to my controller.
I followed samples but I get injection error on my user service, this is my code:
var twApp = ...
0
votes
1answer
14 views
How to assign value based on property in AngularJs
I store leads statutes in my database. The values could be 1,2,3 or 4.
Actually I return a human readable using the ngResource get:
Client.get({ id: $stateParams.clientId }, function(data) {
...
0
votes
2answers
19 views
how to execute function on ng-repeater running
Hi I have problem with ng-repeater in angular I want to execute function to do calculation on run my problem now the function is not execute when I pass the Id https://jsfiddle.net/gkqL3zdp/1/
can ...
0
votes
2answers
22 views
How do I refresh my ng-repeat?
I have a controller (called "catalogueController") that manages my search box and my search page. I have the controller initially set the page to automatically call the search function defined in ...
0
votes
1answer
25 views
How to handle Async http call in AngularJS
I am new to Angularjs. I am creating some employee app which basically fetch the data from http call(json) and display it using angularjs.
The problem is before getting the response from http call my ...
0
votes
2answers
26 views
calling directives by Logic on angularjs
I have some notify message to display, which using difference template by difference notify type.
Now I have make the template into directives, I display the right directive by using ng-switch, like ...
0
votes
2answers
17 views
$state.go not working from promise
I am trying to implement a basic security check to block users from accessing certain states depending on their permission set:
'use strict';
var autoExecApp = angular.module("myApp", ...
0
votes
0answers
9 views
Class not binding to ui-view before ng-enter
To achieve different animations between states - I'm applying a class to the ui-view depending on the current state:
<div ng-class="currentClass.current.name" ui-view></div>
This ...
0
votes
0answers
17 views
Having 404 Not found issue when posting the data from angular, but it does not give 404 not found error during get request
Here is my directory Strucutre -
app.js
public - resources having JSON file
Here is my Controller to get the JSON file
$http({
url : url,
method : 'GET',
headers : {
...
0
votes
1answer
9 views
Add ng-click to highcharts-ng column chart xAxis labels
I am using highcharts-ng within an angular app, I need to run a function when the xAxis labels are clicked see below the categories and labels I am adding to the chart.
Currently I can add an onclick ...
-1
votes
0answers
24 views
Why $scope is null in controller method
I have the below view and a controller. I just wanted to inspect $scope object for two-way data-binding inside my ng-click handler (submitting the form) but it is always undefined.
Here is my view:
...
0
votes
0answers
13 views
ui-router and controller inheritance
I was using ngRoute but have since found ui-router and can see it has some great advantages.
So, converting my application across, I found an issue.
I have this HTML:
<div class="container ...
1
vote
1answer
14 views
Is it possible to make the background of FullCalendar calendar events transparent?
I'm relatively new with web and I am using FullCalendar on a personal project and am trying to accomplish what I would think would be relatively easy. I may have to change some code around as I don't ...
0
votes
0answers
8 views
Angularjs >1.3 $validator causes modelValue to go undefined
I am using $validator to write a custom form validation directive.
Currently it looks like this :
module.directive('tweetLength', function(URLDetector) {
return {
restrict: 'A',
require: ...
-3
votes
1answer
25 views
json array disply in <li> using angular js
JSON array I am getting after get API call,
{data1: Array[3], data2: Array[3], data3: Array[3], data4: Array[3]}
I need to populate this json array in <li> in html5. How can I do it? I am ...
0
votes
0answers
11 views
toggle angularjs flot chart
I am using flot chart with angularjs directives, i would like to know how turn the individual lines on/off using angularjs
HTML
<flot dataset="dataset" options="options" ...
0
votes
0answers
18 views
NgRoute not loading (modulerr error)
I'm going through Scotch.io's MEAN Machine book, and I'm nearly done. Problem is I can't get my Angular code to run correctly——even when I'm literally copying the code from their Github. Whenever I ...
-2
votes
1answer
36 views
How to get this jSON data from API with Javascript / AngularJS
I am working with jSON, an API and AngularJS. I want to get the following data, but I will not know in advanced what the keywords or the dates will be
{
seo keyword of some sort: {
...
0
votes
1answer
8 views
Toggle Google Chart series within Angular directive
Just starting with Angular. I need to incorporate Google Charts into an Angular app.
Found this plunk (code posted in snippet below), illustrating how to use Google Charts within a directive:
...
1
vote
0answers
8 views
Error running 'webdriver-manager start' on Windows 8.1
I am attempting to run end-to-end test for an angular project using protractor and am getting the following error when I run the command 'webdriver-manager start'
I have run webdriver-manager ...
0
votes
0answers
4 views
Using angular animation to change view using panning snaps
I am changing the view using ngRoute which loads a new template for ng-view. The new view is loaded via angular animation (in a panning like manner). This works, however when the new view is sliding ...
0
votes
2answers
18 views
Angular directive model binding
I have just discovered AngularJS and am in what seems to be a fairly steep learning curve. Can anyone recommend a couple of good books that will take a "practical" dive into AngularJS. My ...
-1
votes
0answers
7 views
Why error: “Failed to instantiate module ngRoute” with karma?
I get the following error from karma:
Error: [$injector:modulerr] Failed to instantiate module ngRoute due to:
Error: [$injector:nomod] Module 'ngRoute' is not available! You either misspelled the ...
1
vote
2answers
35 views
Why does my $watch only ever fire once?
I'm factoring out some widget and the $watch expression works perfectly having all in one file but now I moved the relevant controller part into a new controller and the markup into a new html and the ...
0
votes
2answers
33 views
How can I define a variable in a controller who is from another file?
Here is my sample code: en.js
var translationsEN = {
USERNAME: 'Username',
PASSWORD: 'Password',
LOGIN: 'Login',
CANCEL: 'Cancel' };
and my controller:
.config(function ...
0
votes
0answers
4 views
Refresh with parameters in the Kendo UI Grid with AngularJS
I'm trying to use the Kendo UI Grid with AngularJS, where I define the grid like in:
<div id="grid" kendo-grid="grid" k-options="gridOptions" />
I then set the options in the controller, ...
0
votes
2answers
14 views
Stripe-angular dependency injection error Unknown provider:
I'm injecting stripe angular into a module to create stripe tokens, but i seem to be having some dependecy injection issues:
i've got both the Stripe.js and the angular-stripe directive loading in ...
1
vote
1answer
24 views
url in css get rewritten with angular
In angular there is an issue with having base set and html5mode with svgs. It causes all things like filter: url(#url) to be rewritten as filter: url(/base/#url).
...
0
votes
2answers
23 views
AngularJs update directive after a call to service method
I'm trying to create resusable alert service, which I would call anywhere in my application with just:
alertService.showAlert('warning', 'something went wrong!');
For example after ajax call to ...
0
votes
1answer
11 views
Angular State Dropdown Bound to Country Select
I am trying to have a contextual state dropdown menu that is bound to the country so that only the relevant states display.
I have looked at these two answers for a solution to my implementation.
...
1
vote
1answer
18 views
Callback from angular.js service is a promise, but I need the data.
I have a service that looks like this:
angular.module('myApp').service('NodeService', ['$resource', function ($resource) {
'use strict';
...
JMSStats:{
url: "/some/restUrl",
...
0
votes
1answer
11 views
Toggable tabs in an AngularJS single page application?
I have a MEAN.JS application running. It is a Single Page Application using AngularJS' hashtag routing.
I would like to implement Bootstrap's toggable tabs, but for them to work they use hashtags to ...
0
votes
1answer
19 views
How to add ng-class based on multiple variable comparison?
My select dropdown, needs the class of btn-success if 2 variables form a JSON object != null.
What I've tried so far which isn't working, basically if term.tag and term.id are not null, add the class ...
0
votes
1answer
9 views
Angular UI tooltip from element
Is it possible to have an Angular UI tooltip from an element, not from an attribute value?
Something like:
<a data-tooltip-id="tooltip1" href="#">Show the tooltip</a>
<p ...
0
votes
0answers
19 views
AngularJS and Spring boot web application as a standalone desktop app
I would like to build a web application including server and database component, package it and ship it as desktop application. The application should give a native desktop app feel and work even when ...
0
votes
0answers
14 views
How to call the Google+ login route?
I'm using NodeJS, AngularJS and passport and trying to do use google+ login using passport-google-oauth2.
Like described in the examples I added 2 routes:
/auth/google:
/auth/google/callback
In ...