Tagged Questions
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability and reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications.
0
votes
0answers
6 views
Angular for DataBind Only -ng-init
At the top of my page I have
==============================================================================
<html lang="en" data-ng-app="app">
<head>
<style>
/* This ...
0
votes
0answers
6 views
The request sent by the client was syntactically incorrect - How to resolve?
I can't resolve this error, please help me.
He occours when i try to save a Pessoa in the postgres, using Spring, Java, AngularJs
HTML:
ng-controller="PessoaController" ng-init="initEditarPessoa()
...
0
votes
0answers
8 views
Link from Classic asp app to an AngularJS app with URL parameters
I have a angularJS application and a old classic asp application that will have a link to the new app. The classic asp app will pass a changing URL parameter to the angular app. like this.
...
0
votes
1answer
26 views
Scope is not updating if used inside of callback function
Basically I have a listener function in the controller. When this function is called I want to update my UI/scope, but it is not happening. Here is my code:
HTML
<div ng-app="myApp">
...
0
votes
1answer
6 views
Contenteditable directive not working with Angular UI Bootstrap Tabs
I am trying to create two tabs using Angular UI (Bootstrap), in which one tab lets the user input HTML, and the other tab serves as a "Preview", rendering the HTML provided.
To handle the preview, I ...
0
votes
0answers
2 views
Moongose auto-increment when document isn't unique
I’m building a node.js app that fetches geolocated photos from the 500px API based off a location search. The API request requires the page of results you want back.
Say for example I search for ...
0
votes
0answers
4 views
Angular-ui modal return value
I'm using Angular-ui modal instance and i'm trying to get the return value but for some reason the bindings is not working correctly
var openNewAlbum = function() {
var modal = ...
0
votes
0answers
5 views
angularjs custom service integration testing
I want to do integration testing of my AngularJs application. I want to test the actual service not mocking it. Somehow grabbing the instance of my service from the test does not work. Code is below:
...
0
votes
0answers
24 views
Updating the element in the link function propagates the change across all instances of the directive
This is the skeleton of my directive:
define(function () {
return [
'$deps',
function ($deps) {
return {
restrict: 'A',
link: function ($scope, $el, attrs) {
...
0
votes
2answers
8 views
RESTful Token Authentication Clarification
I've read almost every answer on SO and some blog postings, but I can't figure out one simple thing. In a simple token authentication scheme where the server generates a token and sends it back to ...
1
vote
3answers
19 views
Adding a function to $resource prototype
I'm trying to add a view function to an Angular $resource. I add it to the $resource via prototype but for some reason the 'this' reference in the prototype function is incorrect so all of the ...
0
votes
2answers
18 views
Passing scope as parameter into function to be saved
I have two functions in my controller found below.
$scope.formatPaymentDates = function() {
$scope.formatDate($scope.payment.due_date);
$scope.formatDate($scope.payment.date);
};
...
0
votes
1answer
11 views
Highcharts is not defined. Error log in console
Please help me. This error log in console in my angular app.
My App section:
angular.module('fbApp', [
'ngSanitize',
'ngRoute',
'ui.bootstrap',
'ui.router', ...
0
votes
3answers
19 views
Angularjs and route authentication
i have a AngularJS project with Asp Web API as backend. I have a login controller in angularjs that make a signin request to web api to request a token and if the user correctly logged in i set a ...
0
votes
0answers
15 views
angularjs and closing tags
I'm trying to set some params for an applet and the applet does not want to load if there are missing closing tags on the param's.
this is how it should look:
<applet>
<param name='abc' ...
0
votes
0answers
6 views
$locationChangeStart never broadcasted; $browser.onUrlChange never called after page load
My angular app is non-standard in that we don't use route provider or UI router. WE use a durandal style of navigation that swaps out views using $http.
locationChangeStart never fires I think due ...
-1
votes
1answer
27 views
How to filter(extract) objects in an array based on their similarity in javascript?
I have an array of some objects and I want to somehow organize them
Here is my Array in JavaScript :
doctors = [
{"prop":"A","hour":"08:00"},
{"prop":"A","hour":"08:00"},
...
0
votes
1answer
9 views
Angular HotTowel -datacontext is not defined
**
Can anyone tell why I am getting the following?
**
[shell] Hottowel Angular loaded! null
TypeError: undefined is not a function
at Object.fn (/Scripts/app/services/directives.js:162:33)
...
0
votes
3answers
26 views
Angular application config “Uncaught object” error
I have this simple page:
<!doctype html>
<html>
<head >
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
...
0
votes
4answers
22 views
Accessing AngularJS variable in view?
Consider basic AngularJS application with just one controller. Inside the controller I have set-up "myVariable" to hold a value "Test".
I am given an inline JavaScript code in the view and I need to ...
1
vote
1answer
11 views
element.on(“click”, …) don't trigger $watch
Why does not the click event fire $watch in the code below? If I include $apply, $watch is triggered.
angulartest.factory("Fac", function () {
var v = "foo";
return {
getV: function () {
...
0
votes
1answer
22 views
Uncaught object error on Chrome. Angularjs + ngResource
While using debug on Chrome, it keeps showing this error: uncaught object, on angular.js:36.
What am I doing wrong? :/
Thanks for any help :)
Module and Resource objects (services.js)
var services ...
0
votes
1answer
21 views
Angularjs Trying to test authentication interceptor
I'm trying to write a unit test to test that if a user hits a url and they are not authenticated, they get redirected to the /login path.
Below is my unit test and my interceptor. It seems that in ...
0
votes
1answer
8 views
Init filter of tableParams with a compound name issue
When I init a table with ng-init like this:
<table ng-table="tableParams" template-pagination="custom/pager" template-header="custom/header" ng-init="tableParams.filter({name:'George Harrison'})" ...
1
vote
1answer
23 views
How to enable popover feature for bootstrap in Angular framework
I have a question regarding the angular bootstrap popover feature.
I had a problem in my previous post saying the popover for bootstrap is not working.
How to enable bootstrap popover feature?
...
0
votes
2answers
25 views
How can I access a variable in $scope from inside a filter function?
I need to alter how a filter works based on a setting in my controller. Can I access controller vars from my filter? Do I add the var on to the filter parameter list in the template?
Thanks in ...
0
votes
1answer
25 views
AngularJS $rootScope:infdig and ngRepeat:dupes
I have given up trying to figure this out and have scoured Google for help. From what I've gathered AngularJs works some kind of magic on variables and functions. Ive read that, despite you ...
0
votes
0answers
11 views
Integrate facebook with cordova and angular (Ionic)
I'm trying to add facebook integration to my ionic mobile app that I'm building using cordova. I'm able to get it working either without cordovaa or angular but in no way with both. With the code ...
0
votes
0answers
13 views
How can I get Radian for AngularJS working?
I just started trying to learn AngularJS. I was able to successfully get the angular-seed project working in my broswer, but I am having a lot of trouble getting Radian setup. I go into the console ...
0
votes
0answers
6 views
Securing OAuth clientId/clientSecret in AngularJS application
I know this is probably an age-old question, but...are there any best practices for securing client secrets for performing OAuth2 authentication in AngularJS applications? I've been racking my brain ...
0
votes
0answers
21 views
How do I save a $resource when isArray is set to true in AngularJS?
Normally when you do a .get with a resource, the returned object has a $save method.
$scope.questionDetails=$resource(stepsToFlatten.dataSrc,null,{get:{cache:true}}).get();
...
2
votes
0answers
31 views
ngMin vs ngAnnotate
ngMin vs ngAnnotate. What to use?
Now I'm using ngMin and got known about ngAnnotate. What should be the main reason to migrate to second one?
0
votes
1answer
17 views
orderBy filter not sorting dynamically added ng-repeat list
When I add content dynamically to an array, ng-repeat won't respect the orderBy filter.
Please have a look at the example I have created:
http://jsfiddle.net/fPX7R/2/
<script>
function ...
0
votes
2answers
16 views
AngularJS Jasmine, test function in controller
I am trying to test my AngularJS controller function using Jasmine. However, I am getting TypeError: undefined is not a function.
This is what the test looks like:
describe('BoardController', ...
0
votes
0answers
20 views
Dynamic directive naming on angularjs
Is there a way to have all attributes or elements named ns-directive-* to call only one one directive ns-directive?
0
votes
1answer
20 views
Triggering updates / refreshes from outside of AngularJS
I have a web worker whose job it is to periodically poll a webservice for data, and then insert that data into an IndexedDB database.
Is there any recommended way of notifying an AngularJS module of ...
0
votes
2answers
14 views
New ui-router states are not created
I have this code (inherited an app)
angular.module('somename').
config(function($stateProvider, $urlRouterProvider) {
$stateProvider.
/**
* Login Form State
**/
...
0
votes
1answer
16 views
Method Type “OPTION” instead of “GET” with $resource Angular
I am trying to make a call to the Restful Api using $resource with the below mentioned code. On the network tab, I found out the Method type is "OPTION" instead of "GET" and type "text/html" (only ...
0
votes
0answers
18 views
Password Validation on Dynamically Generated Form
So I'm just learning Angular and I have basic routing setup and a partial for setting up a basic page with a form (theoretically any form), and based on the controller I load it loads that form from a ...
1
vote
2answers
20 views
Understanding Angular's `inject` with Testing
Looking at an example from Mastering Web Applications in AngularJS:
angular.module('archive', [])
.factory('notificationsArchive', function () {
var archivedNotifications = [];
return {
...
0
votes
1answer
18 views
Asset pipeline not loading script from rails-assets gem
I have added the danial-farid--angular-file-upload library to my rails 4 app via rails assets. The main library loads fine, but sprockets can't find the shims file it includes for file upload ...
0
votes
1answer
23 views
child state controller not being reached in angular-ui-router
I have the following setup in my code
.config(function config($stateProvider)
$stateProvider
.state('home', {
url : '/home',
views : {
'main' : {
...
1
vote
1answer
15 views
Can angularJS manage multiple transclusions inclusion?
I am trying to make a transitive transclusion, or call it “directive inception”.
I made this example to illustrate what I am trying to do:
http://plnkr.co/edit/0hFFHknDps2krtK1D9ud?p=preview
The ...
0
votes
1answer
6 views
Karma + ui-router fails: Cannot read property 'isDefined' of undefined
I am using ui-router in my Angular project. For testing, I am using Karma and Jasmine.
When running Karma, I am getting the following error:
Uncaught TypeError: Cannot read property 'isDefined' of ...
0
votes
2answers
18 views
Angular writing html to view using scope
I have a html value inside my scope, i need to append it inside a div, how do i do that?
Example:
$scope.htmlValue = '<p> text text <\p>';
Html :
<div> {{ htmlValue }} ...
1
vote
2answers
19 views
Installation of ngAnimate Module not working
I can't seem to get ng-animate to work in an existing 1.2 application. I've followed the check list in the API, but it isn't applying the appropriate animate classes.
I feel like I must be missing ...
0
votes
0answers
35 views
AngularJS: Unable to calculate the sum of values in a 2d array form model
AngularJS: Calculating the sum of values in a 2d array model
I have a complex form model which holds a sale order.
The model has the following construction:
order {
id: int,
lines: [], // ...
0
votes
1answer
22 views
AngularJS persistent object in Factory
I am just blowing my mind. I can't understand how the code below is working.
I have a factory and inside an attribute called "products" and other called "order". Two methods, one called "list()" that ...
0
votes
0answers
49 views
Angular ng-repeat input filter doubling first character in search
I've got an input element on my page to filter my result set. When I start typing in the text box, it always doubles the first character typed.
Here's the html:
<input ng-model="query" ...
0
votes
1answer
29 views
AngularJs , BreezeJs , ng-Table : Maximum Call Stack Size Exceeded
This code works w/o incident in my controller when vm.movies (json data) is the data source:
vm.currMovies = [];
vm.movies = [];
activate();
function activate() {
...