1
vote
1answer
29 views

How to call a controller function from another controller?

What is the simplest way to call a controller's functions from another controller? I have controller like this.. Controller1 $scope.setTitleKey = function (titleKey) { ...
0
votes
0answers
10 views

Angujar.js: JSONP response returning each caracter as seperate object

Here is how I'm calling the api: moonshotApp.factory('Session', ['authResource', function(authResource){ return authResource(apiRoot + 'sessions/?callback=func', { sessionId: '@id' }, ...
0
votes
2answers
17 views

Data Binding to convert mm to ft and inches or vice versa using Angularjs and ng-model

I want to convert lenghts from mm to ft and inches or vice versa. User can input either mm or ft&in.The case is I always want to save data in mm to database but use angular to see it in both ...
0
votes
1answer
10 views

How do I customize directive template based on attribute in Angular?

I'm trying to make an cell into an input if it's set to editable by an column definition variable but I'm not very successful. This is my directive app.directive('bsCell', function() { return { ...
0
votes
2answers
20 views

Get and set a checkbox in Ionic Framework (AngularJS)

I need to track when a user changes the state of a checkbox in Ionic, save it to localStorage, and then use it to load again later - so it remembers their settings. My toggle code looks like this: ...
0
votes
0answers
10 views

'window.onfocus' function does not work in some mobiles native browser for higher android versions and some of the web browsers

'window.onfocus' function does not work in some mobiles native browser for higher android versions and some of the web browsers. function focusin() {alert("focus"); document.title="BLURRED"; } ...
0
votes
2answers
30 views

How do I set the value of element in Angular.js

Why can't I do this in Angular.js: document.getElementById('divid').value('Change Text to This'); And what is the "right" (Angular) way of doing it?
1
vote
1answer
25 views

Custom directive in angular js

Why this custom directive in angular js not working for me.I am only getting the user: but not getting the names of the user which I passed in the userinfo custom directive tag ...
2
votes
3answers
50 views

AngularJS - Directives in a template

I'm trying to find the best approach for dynamically creating the sub-contents of an element created using a directive. To give a simple example, say I have directive that say creates a basic div ...
0
votes
1answer
13 views

How does requiring modules manually differ from calling them dynamically with browserify?

Sorry for the awkward post title but it's a very weird situation to be in. In my project I have a folder structure like so: /filters index.js [...] /controllers index.js [...] ...
1
vote
1answer
33 views

Submit form with dynamically changing action attribute

I'm trying to send form with dynamically changing action url, but right after changing attribute the form doesn't submits. Here is simple example: http://jsfiddle.net/THZHL/1/ <div ...
1
vote
1answer
27 views

Display keys and values with Angular array

I have an array in Angular like this: $scope.test = [ {'item1' : 'answer1' }, {'item2' : 'answer2' }, {'item3' : 'answer3' } ]; And so on... Now there's 2 things I want to do. Firstly I want ...
0
votes
1answer
14 views

PouchDb - remove object inside document

I'm an Italian PouchDb and AngularJS Developer. My json document is: { "_id": "6", "_rev": "3-f7283d7683cd6fb15753f494aad1d49f", "name": "Ivrea", "owners": [ { ...
0
votes
2answers
15 views

Angularjs, Typescript, Uglify Failed to instantiate module myApp … unknown provider: a

I am receiving this error whilst using typescript with angularjs to inject a custom service. The resulting typescript transpiled JavaScript has been ran through uglify. The app works when not ...
1
vote
0answers
15 views

Uploading images using angularjs and php

I have a websites code to edit and i have there a issue i can't solve on my own. I hope you can help me ;) I have a HTML form with a few input fields, the form uses angularJS and on buttenpress, the ...
1
vote
2answers
20 views

Simultaneous asynchronous requests in AngularJS containing inner operation

How can I create 2 simultaneous asynchronous requests in AngularJS having one operation that has to be done after the first request ? I want to do something like this: call the first web service ...
0
votes
1answer
23 views

AngularJS Directives: Inserting Attribute values in template

I am fairly new to AngularJS, and I have the following problem. I have an HTML Element: <div class="hn-multi-select" array-of-strings="testArray"> </div> and a Directive: ...
2
votes
1answer
22 views

AngularJS not binding model when browser fills the form

We have a login form with email and password field. FF has a feature to save username and password. So once I enter it and then save the password. Next time I come for login then form is ...
0
votes
1answer
16 views

Don't work placeholders in AngularJS

Im using this project (http://angular-google-maps.org/#!/) to work with AngularJS. I need consume the service ( service.latitude, service.longitude, service.id) app.js function ( $scope, ...
2
votes
3answers
21 views

AngularJS binding response from server not updating in view

I am developing a mobile application. I encountered a problem while trying to relay messages in the view that was returned from the server after an ajax call. The idea is to display the message in the ...
0
votes
0answers
4 views

jasmine.clock().tick() does not work with $timeout and debounce, but works fine with setTimeout

Below I have 3 functions that do exactly the same thing. Each one uses a different way of calling setTimeout, delay1() uses setTimeout directly, delay2() uses angularjs $timeout and delay3() uses ...
2
votes
1answer
24 views

How to use AngularJS without custom HTML tags?

I’m trying to use UI Bootstrap’s inline datepicker, but it works with a custom tag: <datepicker ng-model="dt" min-date="minDate"></datepicker> My template processor doesn’t support ...
0
votes
0answers
13 views

Equivalent of angularjs interceptor in jquery

I would like to intercept response from REST request as $httpProvider.interceptors does in agularjs : https://docs.angularjs.org/api/ng/service/$http I am making a very little interface with jQuery ...
0
votes
1answer
16 views

Angular and code mirror

I've been trying to add some features to a javascript tool, and I need to highlight a line in codemirror. I'm using AngularJs. First I tried to follow a tutorial function highlightLine(lineNumber) { ...
0
votes
2answers
24 views

angularJS get value from a textarea inside a ng-repeat

How can I get the value of textarea inside a ng-repeat? <div class="container" ng-repeat="data in dataList.dataCatalog | filter:{sea:season}"> <img ...
0
votes
1answer
25 views

Angular routing with bootstrap carousel issue

I currently have an issue which im unsure of how to solve or if it even can be solved. I am currently using Angular JS and Bootstrap 3.0. Within my Angular project I am using routing but on my page ...
0
votes
2answers
23 views

How to add HTML contents Dynamically on Button Click Event with AngularJS

I need to add HTML content on Button Click event using AngularJS. Is it possible?? My index.html <div class="form-group"> <label for="category"> How Many Questions Want You Add ? ...
0
votes
0answers
30 views

AngularJS directive with template having ng-repeat and ng-bind-html

I have created a directive with template having ng-repeat and ng-bind-html as below app.directive('customField', function ($compile) { var getTemplate = function (customType) { return '<span ...
0
votes
0answers
21 views

angularjs load status promises

I created factory and i load data in controller. I want to create status of load data, just like normal text status. How can i do it ? var myApp = angular.module('myApp',[]); ...
0
votes
0answers
19 views

AngularJS, Going back and forth from listing to item while saving scollposition and not doing $http over and over

First of, very new to AngularJS. Second, i'm creating a mobile web using angularJS. It's basically a listingpage of clickable items. When you click an item you go to a more detailed view of the item. ...
0
votes
2answers
22 views

AngularJS specifying multiple values for attribute of custom directive

I am creating a directive <chart> in AngularJS. I want to add a attributes x-series and y-series to it. A requirement is that these attributes should take multiple parameters like ...
0
votes
1answer
11 views

Use Highcharts-ng with JSON

For display the chart, y use the tipical way: var myapp = angular.module('myapp', ["highcharts-ng"]); myapp.controller('myctrl', function ($scope) { $scope.highchartsNG = { options: { ...
0
votes
2answers
49 views

What is the best practice for multiple $http request in AngularJS?

For example, I have a controller to show user a list view, some columns need data comes from another endpoint, so I wrote these with intuition, could you tell me how do I re-factory them? ...
0
votes
1answer
27 views

Set an element's attribute text/value through an angular directive?

How do I set the text of an attr? Trying to set the values of meta tags description through it's content attr. <title update-title></title> <meta name="description" ...
1
vote
1answer
21 views

angularjs and ng-init scope when data changes

So I have a calendar application where right now the user chooses start/end dates and clicks update calendar. This populates a calendar. However, I'm having trouble including new elements in the ...
0
votes
2answers
19 views

angularjs handling $resource $promise errors

Could somebody help me figure out how to return hard-coded data in my AngularJS factory if there is an error connecting to my API. My hard-coded data are located in another factory called ...
0
votes
0answers
18 views

AngularJS: Zeus Slider Doesn't activate after first visit to page

I have a ZeusSlider on a site I'm doing for a guy in AngularJS, it loads the first time I visit the homepage, but not if I go back to the home page. The script is firing, so I'm not sure why the ...
0
votes
3answers
32 views

Angular directive for customized html tag in table

I got a solution to use AngularJS directive to let html understand my tag bold as the html tag b. So <bold>{{testWorks}}</bold> will style the text as bold when I have textWorks in the ...
0
votes
1answer
17 views

Toggle a class on an element click in Angular.js

In angular.js how can I toggle a css class active on and off on click of the element? I know I can use ng-class and ng-click but how do I reference itself? For example, let's say I have three buttons: ...
0
votes
1answer
32 views

how do I create a factory that uses http.get and passes it to multiple controllers in angular

I have an angularjs app that is getting more complex so I need to break out thing into more than one controller. I need to create a factory to fetch my data using http.get and share that data between ...
2
votes
1answer
23 views

AngularJS - Angular way of binding on parent to trigger child

I have the following markup: <div class="parent"> <div class="child"> and I have two directives, one for parent and one for child. Now, on an event (say click) on parent, I want ...
0
votes
1answer
12 views

Isolated scope member updated within link/controller but is undefined when passed to controller

I have the following code: HTML: <body ng-controller="MainCtrl"> <main-dir data="data" on-update-map="updateMap(datalength)"></main-dir> </body> JS: ...
0
votes
0answers
13 views

Angular orderby with custom function + array for multiple values

I am using angular orderby with the custom function. It looks like this: Objects: $scope.array = [{'field1': some_value, 'field2': some_value, ... ...
4
votes
0answers
59 views

Sharing code between AngularJS and Nodejs

What is the best way of sharing code between frontend and backend using javascript, specifically saying between nodejs and angularjs? Thing is that we are using same enums and constant values such as ...
1
vote
2answers
24 views

Angular ui-router fails to load let alone resolve factory dependencies [SOLVED]

Empty strings in the factory definition was the issue. Though the framework should define an error for this case as it'll help new comers. Thanks Sylwester & Marplesoft for answers. UI router ...
0
votes
1answer
24 views

Add Controller to index.html in an Angular SPA

My Angular app has several views. The index.html file which has the <div ng-view></div> also has a header/navbar that has links to each of these views. The $routeProvider is configured to ...
0
votes
0answers
26 views

angular - How can jQuery inside a custom directive respond to a $scope change?

How can jQuery in a custom directive respond to a $scope change? <div id="wrapper" scrolldirective> <div id="scroller">Hello this is a test<div> </div> note: ...
0
votes
1answer
29 views

ng-repeat does not update table display when changed

The table in my html form does not display values when it is updated. Here is the code: <div ng-controller='PersonalActionFieldController'> <table> <thead> ...
0
votes
0answers
9 views

What are the exceptions to depth-first directive linking?

So for the most part, I find that AngularJS has a depth first approach to directive linking. For example, if we had the following markup: <custom-outer> <custom-inner> ...
0
votes
1answer
4 views

How do I properly include textAngular in meanjs?

I'm writing an angular app that requires a wysiwyg editor, and while doing some research, I came across textAngular. It looks like what I want, but when I insert the ...