0
votes
1answer
7 views

sharing ajax data form 1 controler to another in angularJS

Im learning Angular JS im using a REST api in slim that returns JSON data objects. I have a search controler where i have a submitform method wich gets data. But now i have another controler that also ...
0
votes
1answer
12 views

$watch doesn't work when using the UI bootstrap(angular)

I have problem when I want to using my select part with the "tab" in the UI-bootstrap. The view part: 請選擇全國稅基佔市價比例 <select class="btn btn-default" ...
-1
votes
0answers
12 views

Ping on regular intervals in angularjs $stateProvider.state

In one of my state, I am requesting for data through resolve. Basically there are two parameters in resolve as shown below. First Resolve acts as a parameter for 2nd resolve parameter. All this ...
0
votes
1answer
26 views

AngularJS a service is not a function

This current code when ran returns TypeError: Services.updateUserData.set is not a function Controller Services.updateUserData.set($rootScope.user); Services.js this.updateUserData = function() ...
-1
votes
1answer
15 views

$route.reload() not fetching updated data

I am new to Angular JS and i am facing an issue. I have a HTML page , where there are two groups A & B and under each group i have 4 people name each. I am trying to move a person from B to A. ...
1
vote
1answer
31 views

Adding and removing a class from parent div AngularJS

I have 3 boxes each with it's own button. The button is used to collapse it's parent div by adding a class of 'collapsed' to the parent. I have go the classes being added but I need to get them ...
1
vote
2answers
12 views

$window.print() executing before lines above it

My problem with the code below is that $window.print() is executing before $scope.loading_status=false which doesn't allow me the hide certain DOM elements before printing the page out. How can i ...
0
votes
1answer
24 views

AngularJS modal window scope

I have problem with scopes of controllers. I'm using controller as directive and I have code similar to this example: <div ng-controller="ItemsController as itemCtrl"> <table> .. some ...
0
votes
1answer
12 views

accessing $scope from unit test file when using the vm “ControllerAs” syntax from AngularJS HotTowel

See here for example: http://www.johnpapa.net/angularjss-controller-as-and-the-vm-variable/ As the title suggests, I'm following along on this tutorial ...
0
votes
1answer
21 views

Data binding in directive template doesn't work with ng-repeat

I created this simple plunker to demonstrate the problem: http://plnkr.co/edit/xzgzsAy9eJCAJR7oWm74?p=preview var app = angular.module('app',[]); app.controller('ctrl',function($scope){ ...
0
votes
0answers
28 views

why is parent scope function always overriding function parameter of child scope angularjs

question summary: how do i make a directive child function use the parent function definition, but while using the variable that's defined within the child directive scope. i basically perform the ...
-1
votes
3answers
34 views

Calculate average from list of values in JSON

I have a simple ng-repeat that displays a list of values (financial income). How can i calculate the average from this list? <div ng-repeat="data in MyData"> {{ data.income }} </div> ...
0
votes
1answer
32 views

Hide and show radio button using angular js

<div class="filter_hide"> <div ng-cloak ng-repeat="web in website" > <label ng-show="filter[web.websiteId]"><input type="radio" id="{{web.websiteId}}" ...
0
votes
1answer
36 views

How to watch the size of an element?

I am trying to watch the width of a directive's element (the directive itself). In the demo below I set the element style to 100%, in the real world app the element resizes through media queries. ...
0
votes
0answers
21 views

view not refreshed when $scope is updated inside $http

I have the following HTML: <select class="selectpicker" id="inputSystemLoggingId" data-html="true" ng-init="initDataSources()" ng-options="a.id for a in systemLoggingIds" ...
0
votes
1answer
13 views

AngularJS force validation or wait for $scope.myForm.$valid to refresh

I update the $scope in my Javascript and I would like to know if the form is now valid or not. How can I force validation to occur or wait for Angular to run the validation? This is some sample code. ...
0
votes
1answer
15 views

AngularJS: Difference between Custom directive type Attribute and type Element

Assuming that a Custom Directive: define a custom tag or attribute that is expanded or replaced can include Controller logic, if needed and that the Directive can be of type Element ...
0
votes
1answer
9 views

AngularJS views rendering issue - blank page

I have small problem, my AngularJS app doesn't work properly. Everything seems to be fine... but when I open project's page, it's blank... AngularJS works properly on this page, cause I've checked ...
0
votes
1answer
19 views

Render specific element in input from a list - AngularJS

I am rendering select options as follows: <select ng-model="curUserId" ng-options="u.id as u.name for u in users"></select> In Controller code: $scope.users = [{"id":1, ...
0
votes
2answers
25 views

Dynamic way to pass url pamars in angular js

$http({method: 'GET', url: '/asas/asasa'}).success(function(data) { $scope.website = data.websites; $scope.topoffer = data.coupons; $scope.webcall = function () { ...
1
vote
0answers
21 views

Referring to nested object in controller through Angular expression

A quick challenge for all you angular wiz out there. Say in my controller I have something like app.controller('testController', function ($scope) { preWrittenFunction1 (function callBack () ...
1
vote
4answers
37 views

Create Isolated Scope using Directive

I have a set of clients, displayed on a form, which must have individual scopes (per client): View plunker here. Naturally, I would expect that creating a new directive, with isolate scope, would ...
0
votes
0answers
24 views

Restoring Custom Directives that Manipulate the DOM

I have two custom element directives: <my-directive-parent></my-directive-parent> //only one and <my-directive-child></my-directive-child> //variable count The ...
0
votes
1answer
18 views

AngularJS $rootScope function ng-change

html <input type="text" data-search="type" placeholder="Search a Candidate, Job, Certificate or Location" ng-model="searchMain" ng-change="$root.updateSearchField(searchMain)"/> Above is an ...
1
vote
1answer
18 views

AngularJS accessing isolated scope in child directive

Here is my HTML part: <div data-my-question="" data-question="Question text?"> <div data-yes=""> YES! </div> <div data-no=""> NO! </div> ...
0
votes
1answer
24 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
27 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
16 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
36 views

Should you use element.addClass in angular? [on hold]

Loving using angular but want to do things the "angular way" 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
34 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
50 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
2answers
34 views

Angular.js: How to store div HTML 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> ...
-1
votes
3answers
26 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
15 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
2answers
33 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
1answer
24 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
31 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
24 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
19 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
45 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
2answers
29 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
33 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
18 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
23 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
18 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
44 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
21 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?