0
votes
0answers
2 views

AngularJS - Show a div if date is within last six months

I have a simple ng-repeat that displays a list of names and icons: <div ng-repeat="data in MyData"> <p>Name: {{ data.Name }}</p> <span ...
0
votes
0answers
10 views

Assign included JS function to AngularJS scope

I am including a function from my webserver, and I need to include this existing function to my AngulerJS scope so I can use it in my view. I have tried this: $scope.getSymbolName = get_symbol_name ...
0
votes
2answers
13 views

Accessing the value from controller in directive when the value changes in the controller

I created this jsfiddle to illustrate my issue. http://jsfiddle.net/RmDuw/84/ HTML : <button ng-click="toggleAwesome()">My awsomw button</button> <br /> ...
0
votes
0answers
28 views

Ok to use element.addClass in angular?

Loving using angular but want to keep to the "best practices" and not get into bad habits. Currently making a desktop application which is also available on mobile devices and found the bindonce ...
1
vote
3answers
27 views

Angular does not update bound property

Fiddle HTML: <div ng-controller="MyCtrl"> <button my-event-directive>Click me</button> <div>{{secret}}</div> </div> JS: var myApp = ...
3
votes
1answer
26 views

AngularJS Directive Binding link: has no access to scope variables

I'm trying to write my first AngularJS Directive; it's basically a piece of code that blurps out a number of stars (badges) out of a maximum number of stars. The link: function() code in the ...
0
votes
1answer
15 views

Angular.js: Store div content in scope variable

I have an editable div and I want to store the HTML content in scope variable scope.myText: <div id="editor" contenteditable="true" ng-model="myText"> <p>HTML Text</p> ...
0
votes
3answers
19 views

AngularJs Injector Module Error

i'm new in AngularJs (started an couple hours ago) and i'm trying to complete the AngularJs in 60 minutes'ish tutorial. But i got stucked on the first controllers example. This is my code: ...
0
votes
2answers
14 views

Directive at angularjs and custom method/html

I have this code: <body ng-controller="testController"> <div test-directive transform="transform()"> </div> <script type="text/ng-template" ...
0
votes
3answers
29 views

why my ajax success data is not display in angular js

I am trying to call ajax and get my HTML contend .But I want to show that data on tooltip/or pop over .I am getting the data on console I don't know why it showing black data tooltip it is showing ...
0
votes
0answers
12 views

How to unit test spy on $emit in a directive?

How do I check if $emit has been called in an unit test of a directive? My directive is fairly simple (for the purpose of illustration): angular.module('plunker', []) .directive('uiList', [function ...
0
votes
3answers
28 views

Watch element on directive

I have the next code: angular.module("Test", []) .directive("testDirective", function () { return { restrict: "A", scope: { model: "=" } link: function(scope, element) { ...
0
votes
1answer
25 views

angular js: module is not available and scope is not defined

I am still relatively new to angular, I am trying to build something but I keep getting the error that module 'ngDirTest is not available', I have put it in the body tag: <!DOCTYPE html> ...
0
votes
1answer
17 views

Angular JS : Unknown Provider

I am having issues trying to minify my Angular app. The error I am receiving is: Error: [$injector:unpr] Unknown provider: $scope, dataServiceProvider <- $scope, dataService My App: ...
-1
votes
0answers
19 views

AngularJS - Adding CSS classes to siblings

I am trying to add a CSS class of open a DIV's sibling. Here's my HTML: <div id="profile-information"> // Code </div> <div class="profile-info"> <div ...
-1
votes
1answer
16 views

retrieving specific object from array and printing value from it

I am trying to look through an array for an object with the value 'Title' = 'Title'. Then I want to print a second value on that object, in this case the value sitting at the key Value. When I use ...
0
votes
2answers
40 views

$on event, set a variable to true

This is a dumb scoping issue and I'm bad at javascript. Pretty sure I dont know how to return the value of a variable up to parent scope (ex. look for the **** in AppCtrl)` I have 2 controllers. ...
0
votes
1answer
20 views

AngularJS: ngInclude with custom scope

I have an existing directive that creates a generic wizard that will be used across my current organization. This wizard will have steps, and each step has an HTML template to be loaded as the "body" ...
1
vote
1answer
31 views

I need to put a space inside ng-true-value=“fa-li ” Angularjs

The plunker shows my list working the way I want. but I am unable to put a space between my list items. It would be ideal if ng-true-value="fa-li " read that space but it doesnt. I thought about ...
1
vote
0answers
16 views

How to do a javascript profile of angular $digest

I have a web app with portions written in angular, I have been using debugging tools to get information about how many times $digest is called and how much time it is taking. How can I get this ...
0
votes
2answers
22 views

Angular Print Checked boxes to an area

I have a list of checkboxes... when any of them are checked I want them to print in the area where I use the {{}}... If it is not checked then I want there to be no visual sign that there is anything ...
0
votes
1answer
16 views

Angular Form Post

I have the following code and when I submit the request; I get request failed. The data is not going to the server. Any idea why? All I need is a simple form submission with the code below. I think ...
0
votes
0answers
42 views

TypeError: Cannot call method 'then' of undefined

This is part of the code that shows the error. I tried to add modal functions (pop up input page) from Ionic framework and thats where all the errors start coming in. The error is a long list of ...
0
votes
1answer
19 views

Angular controller within partial is not updating when form button in main template is clicked

I have a form in my main/base template which uses a Angular controller to get a JSON data response. Upon clicking the submit button, the JSON is retrieved and the JSON data is then sent to another ...
-3
votes
0answers
24 views

how to pass json object between different controllers in angular js? [duplicate]

Like in asp.net mvc, we use ViewBag, ViewData, to pass in objects between different views. How do i pass in a Json Object between 2 different controllers using angular js?
0
votes
1answer
27 views

Scope not updating inside a function in a different state

I have two states using the same controller, when I trigger a function from State 1, I want it to go to state 2 and changes its title as well, here's my code: $scope.page2Title = "Testing"; ...
1
vote
1answer
37 views

Should angular $watch be removed when scope destroyed?

Currently working on a project where we found huge memory leaks when not clearing broadcast subscriptions off destroyed scopes. The following code has fixed this: var onFooEventBroadcast = ...
2
votes
1answer
57 views

Why doesn't the latest version of angular support global controller functions?

With the AngularJs new version 1.3.0 don't but with 1.2.9 the old version work. Whats the new in the new version ? <html ng-app> <head> <meta charset="UTF-8"> ...
2
votes
1answer
44 views

Controller not a function, got undefined, while defining controllers globally

I am writing a sample application using angularjs. i got an error mentioned below on chrome browser. Error is Error: [ng:areq] ...
-1
votes
1answer
45 views

Query not working for me

I am using angularJs ng-resource.I have tried this angular.module('app.services', ['ngResource']) .factory('AngularIssues', function($resource){ return $resource('../test.json',{},{ ...
1
vote
1answer
21 views

Angular js api url call not working

app.controller('Ctrl', function ($scope, $http) { $http({method: 'GET', url: "/api/v1/coupons-dunia/coupons-by-website?websiteId=1"}).success(function(data) { $scope.onlinedata = ...
1
vote
0answers
25 views

How to rerun controllers after global data is resolved?

I resolve data on application load in a run block... .run(function($rootScope, $q, teams, schools, news, games){ // go out and grab all the relevant data $rootScope.showSplash = true; $q.all([ ...
0
votes
2answers
19 views

Binding Input to Angular controller function

I have a shopping cart that shows the name of the flavor and quantity, then the total $ of each flavor. Then at the bottom of all the flavor, I have the calculation of the entire shopping cart. HTML: ...
0
votes
2answers
29 views

How can I get a change to the Model (from within a Directive) to update in the View? $apply?

There are a lot of questions/answers here on stackoverflow and out on google about this topic ($apply), and I feel like I have read every one and followed them, but to no avail. All my searches on ...
0
votes
1answer
23 views

Generate new $index for array items per specific key:value in Angular

Please be patient if I don't understand something and need clarification as I'm still new to Angular, and please simplify explanations for an Angular newbie if you can, thanks! I am working on a ...
0
votes
2answers
35 views

Pass a input field value into angularjs $resource undefined and error shows unknown scope provider

=========================================================================== Update 1 Fixed code produce new error of ReferenceError: inputName is not defined on the line of ...
0
votes
0answers
29 views

Have $watch trigger other function in object

I want to have an object which can listen to certain parts of it using $watch but then call another member function whenever the watch is triggered. I'm not sure if the way I am currently approaching ...
-1
votes
2answers
34 views

AngularJS get data from json

I'm trying to get from Json data but it doesn't worked for me. I'm not sure what I'm doing wrong. Angular Ajax API call : <script> function PostsCtrlAjax($scope, $http) { $http({ ...
2
votes
3answers
28 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
2answers
14 views

How do you call a parent directive controller from a child controller (not link method)

I would like to access my parent directive from within my child. I know that if you use the require property, then the link method has the parent controller passed as a parameter, but how can i ...
0
votes
0answers
17 views

AngularJS - Filter HTML character references

I have a set of JSON responses/results that i display to the front-end. Some of these contain HTML character codes, for example: <b>Some Text</b> Rather thank using ngSanitize, can i ...
0
votes
1answer
22 views

Preserve scope values while moving template in ng-repeat

I have two collections binded to ui that populate through ng-repeat In that I have included ng-include="template.html" <div> <div ng-repeat="item in items1"> <ng-include ...
0
votes
0answers
23 views

angularjs ajax call wrapped by $scope.$apply function preventing ng-click from being executed

I have and custom validation directive which triggers on change to validate user input: link: function(scope, elem, attrs) { elem.on('change', function() {$scope.$apply(function(){ ...
1
vote
1answer
26 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
32 views

AngularJS: scope change in ngClick gets lost

I have ngClick and ngClass on an element duplicated by ngRepeat: <li ng-class="{'active': $parent.mem.A == $key, 'not-active': $parent.mem.A && $parent.mem.A != $key}" ...
0
votes
1answer
21 views

Detect if a function is bounded to the scope with &

I have a directive popup that has an isolated scope with only a function binding in it: Template <popup> <div class="confirm-button" ng-show="showConfirmButton" ...
3
votes
3answers
30 views

Using $scope.$watch when using `this` scope in controller

I have a controller in my Angular app: (function (angular) { function MyController() { this.name = 'Dave'; // I want to have code like this: /* ...
0
votes
1answer
40 views

Angular JS Use modal in ng-repeat list

I am displaying a list using AngularJS's ng-repeat... Below is the template per list item; It all works except for the {{...}} that are used inside bootstraps modal. It 'almost' works the way it ...
-1
votes
0answers
13 views

Change module config data from controller - AngularJS

I have implemented Session timeout using AngularJS Below is code: var user = angular.module('user', ['ui.bootstrap', 'xeditable', 'ngIdle']); user.config(function($httpProvider, ...
0
votes
0answers
13 views

AngularJS - ngTouch Error: element.on is not a function

I have just added the mgTouch module into my application. The majority of the project is working as expected, however on page load where i have the following 2 buttons, i see the following error: ...