Tagged Questions
-1
votes
0answers
35 views
Angular custom element renders incorrect attribute value
This is my first Angular project.
I am trying to create a custom element using "Angular JS". I create a <div> using a template and assign attributes for <div> using scope.
The problem: I ...
1
vote
1answer
32 views
how do I hide the dynamic loaded template on click of the same button angular
Trying to show and hide the template on click of the same button, but unable to get the write thing..
Added plunker is the tried demo link:
Demo Link
Tried ng-click="cClick()=!cClick()", but it is ...
2
votes
1answer
23 views
Load template on click angular
Have tried loading the template on click of the button but some where approach is wrong templates are not loading.
Here adding the tried plunker:
Plunker
Can anyone let me know where had gone ...
0
votes
1answer
55 views
AngularJS scope not binding data in ng-repeat
I am developing a single page application which retrieves blog feeds from a website.
I got JSON using jQuery AJAX, and assigned the value to the "$scope.entries" variable, but its not reflecting the ...
0
votes
1answer
27 views
angular - ng-if - how to callback after ng-if template has been rendered
in Angular, I need to call a function after an element with certain class has been loaded.
Display of the element is controlled via ng-if='expr'. Value of $scope.expr is set after some ajax call has ...
1
vote
1answer
77 views
AngularJS - UI-Routing - how to use the route state as variable in controller?
I am using Angular JS and UI-Routing. The routing works fine. My problem is showing and hiding a slider depending on what page the user is on.
My index.html looks something like this:
<body ...
0
votes
2answers
50 views
Executing regex statements over object-array with Javscript/jQuery
I'm looking to use regex to do some form manipulation based on the user's credit card input (note: this is only front-end validation for the sake of UX, another service and API handles actual credit ...
1
vote
1answer
20 views
angularjs directive from jquery plugin
After looking through docs for Angularjs, I was hoping someone could help clarify an issue I'm facing. I'm looking to write a directive that incorporates a jQuery plugin, but I'm not sure of a best ...
0
votes
1answer
92 views
controller connect to directive for validation
Hi I was wondering how I can combine both a directive and controller function for validating a form?
Right now I'm validating a form separately with a directive, which highlights a field purple if ...
1
vote
3answers
140 views
AngularJS - Ordering and Parsing data in a ng-repeat, based on a parent ng-repeat
Im trying to write a fairly complex ng-repeat that potentially uses filtering and parseing.
What i am first doing is ng-repeating a table heading of 12 months from the current month.
I am then ...
0
votes
2answers
74 views
Counting number of occurances and incrementing value
I have a JSON file with some data, for example:
$scope.expenses = [
{
"amount": "100",
"SpentOn": "19/04/2014",
"IsExpensable": true,
},
{
"amount": "200",
...
2
votes
2answers
94 views
Using Angular, how can I show a DOM element only if its ID matches a scope variable?
I am relatively new to AngularJS.
I have a series of DIVs in a partial view. Each of the DIVs has a unique ID. I want to show / hide these DIVs based on a scope value (that matches one of the ...
0
votes
1answer
90 views
Angularjs select with ng-options calling a function?
here is my html
<select ng-model="selectedMarker" ng-options="shape.text for shape in Selects('shapes')">
</select>
and the code
angular.module('todo', ['ionic'])
...
0
votes
1answer
34 views
Angular accessing $scope objects with dynamic names
I have an angular controller whereby I'm trying to look through a list of strings, querying an ajax query for each string within the list. The code is as follows:
var itemsliststrings = ...
1
vote
2answers
109 views
AngularJS - Loading icon whilst waiting for data/data calculation
I have a simple Angular http.get:
app.factory('countriesService', function($http) {
return {
getCountryData: function(done) {
$http.get('/resources/json/countries.json')
...
0
votes
0answers
25 views
checkbox group directive showing this.ngModels is undefined error
I am using a checkbox group directive and here is the example: http://jsfiddle.net/Alien_time/pWQWG/3/
This checkboxGroup is used to add a ng-required condition so atleast 1 (or the number specified) ...
0
votes
1answer
35 views
angularjs scope two values keeping pointing to each other
Hi I'm trying to copy a scope value from one to another scope. For example:
var items=$scope.order.invoicewindow.items;
$scope.order.orderwindow.items=items;
However right both scopes are ...
0
votes
2answers
39 views
AngularJS.. http.get working, when splitting into its own service module its no longer working
I am new to angular and trying to integrate it within my application. In my first version i used a simple $http.get to a .JSON file, which was successful.
The $http.get was originally in my ...
1
vote
0answers
85 views
AngularJS ng-repeat - http.gs retrieving data, but not displaying
I am new to angular and trying to integrate it within my application. I am attempting to use a simple $http.get to a .JSON file, which displaying the matching contents in a ng-repeat
Here my get:
...
0
votes
2answers
87 views
angularjs if/else statement and window width
I am new to AngularJS and recently introduced it into my application. I am trying to re-write some of my existing jQuery code in my controllers, however, on one occasion, i am using:
jQuery:
if ...
0
votes
1answer
30 views
Check which field is not valid in form with Angular
I need to check which fields aren't valid after 5 seconds when form is rendered. I have a button and I set this ng-disabled="!step1Form.$valid" but I need to add some kind of CSS class maybe red to ...
1
vote
3answers
148 views
Angular promise not waiting for resolve
So it seems I still don't understand promises correctly. I am using the angular resolve to prevent controller loading the view before the promise is resolve but its not working as expected. What I am ...
0
votes
0answers
16 views
How can I show the actual file using the stream from my server-side in AngularJS?
I am returning a file Stream from my server-side. I want to get the stream and show the actual file in the AngularJS client side.
For eg. I am returning the stream of My_File.txt.
I have to get the ...
2
votes
1answer
59 views
AngularJS replace a list when clicked ng-click ng-repeat
HTML
<ul class="feature-list-1">
<li ng-repeat="(key, value) in features" ng-click="featureSelect(key)">{{key}}</li>
</ul>
ANGULARJS
$scope.features =
{
...
0
votes
3answers
82 views
AngularJS - Scope doesn't updates inside jquery ui dialog
For example,
I have two templates route_one and route_two.
In route_one, I have a link which open a jquery ui dialog. Inside the dialog, I can
push some values to a scope where the list of ...
0
votes
1answer
164 views
How can I assign ng-repeat item value to ng-model?
How can I assing the value of an item from items using ng-repeat in ng-model?
in below ng-repeat:
<ul ng-repeat="post in allposts" class="timeline">
I want to set value of ...
1
vote
2answers
48 views
Grab $viewValue from controller
How do I access $ngmodel.$viewValue in the controller? I have a ui-mask and it's not producing the correct value for the ng-model so I want to extract the value I see from my input field.
0
votes
0answers
53 views
Add multiple rows between drag and drop of table rows between two similar table in jquery with draggable and droppable
i am trying to drag a table row and to drop it in the similar table i.e, of same table structure. i am trying to implement with j query drag-gable and angularjs i found many example with single item ...
0
votes
2answers
123 views
Bind new html to controller after calling trustAsHtml Angularjs
I'm able to embed the new html once received from the server but later I need to bind it to the model. Even when I compile it 5 seconds after it's inserted and displayed the html does not bind to the ...
0
votes
1answer
120 views
AngularJS $scope won't update when ng-model is updated
I have the following html
<input id="zoom" name="zoom" style="width:100px" type="text" ng-model="user.zoomlvl">
When I run the below it updates the above html input field
...
0
votes
0answers
66 views
Manipulating classes from directive not working AngularJS
I am building a custom sliding menu toggle for a reasonably large app. I currently have two directives, slideTrigger, that will be placed on the and slideNav which will be placed on the "#main-nav" ...
0
votes
1answer
668 views
Angularjs passing parameter to a page from ng-click
I have following three buttons on top of my page with input box underneath it.
<div>
<form>
<div>
Enter Show Name<input type="text" ng-model="showName" ...
0
votes
1answer
26 views
Using jQuery $.ajax with Angular - the DOM isn't updated
I need to render different content based on a value obtained via an XHR to the server:
<div class="container">
<div class="header" ng-controller="MyController">
<div ...
0
votes
1answer
163 views
AngularJS: how to get form action attribute
I'm new to AngularJS, and may be doing something completely wrong, therefore, don't judge too strictly please.
I have a form:
<form method="post" action="/secured/login_check" id="login-form" ...
0
votes
1answer
134 views
Pass scope to a factory for use in Jquery animation
I want to run a bit of jQuery code on a form submit. I want it to be reusable, and I already have a factory set up for swapping data between Controllers.
HTML (jsfiddle)
<div ng-app="myApp">
...
0
votes
1answer
230 views
AngularJS directive for dependant select element
I'm trying to write a directive for dependant select elements. The relationship is Country > States > Cities. When element with class country get changed I should update element with class ...
1
vote
1answer
81 views
load modal using $http in angularjs
I want to load data in modal (ui.bootstrap.modal) with the help of angularJs.For Example i send request through post method and data retrieve successfully and now i want to load it into modal.Here is ...
0
votes
1answer
204 views
AngularJS: how to know when the $compile has finished?
http://plnkr.co/edit/GRVZl35D1cuWz1kzXZfF?p=preview
In the custom fancybox (aka lightbox, a dialog) I show contents with interpolated values.
in the service, in the "open" fancybox method, i do
...
2
votes
2answers
55 views
Checking whether something exists in a Javascript object with Jquery
So I have the following javascript object generated by the server. The object is called $scope.activityResults
[{
id: 2010,
updateId: 1,
userId: 2,
...
4
votes
1answer
67 views
Set css to $templateCache.get() html in link function
This directive is executed for everyday in a schedule table. After I have rendered the event I wanna be able to modify the css properties depending on some stuff.
The problem is that when the event ...
0
votes
1answer
69 views
HTML not updating after successful use of $filter(orderBy) in custom directive
I'm creating a custom directive called ngSortable that can use the orderBy filter on an array when the element is clicked. I've stepped through and confirmed the array is being sorted correctly, but ...
0
votes
0answers
81 views
How to expand a tree in javascript which is generated using a recursive directive in Angular?
I build a tree using a recursive directive:
app.directive('recursiveListItem', ['$http', 'RecursionHelper', function ($http, RecursionHelper) {
return {
restrict: 'E',
scope: {
...
0
votes
1answer
215 views
Changing colour of angularjs slider with pointer
Hi I'm building a slider in angularjs that changes color depending on where you move the pointer.
1.) if the pointer is on the rightside, the bar will be red
2.) if the pointer is on the leftside, ...
3
votes
1answer
488 views
Angularjs controller syntax
I am new in Angularjs javascript. Tell me what is difference between below code:-
app.controller("firstController", ['$scope', '$modal', '$log', 'HttpService', 'FisrtSharedService', ...
1
vote
3answers
195 views
Angular ng-repeat not loading
I have had this working in the past, I have moved the site about on localhost and now I can't seem to get ng-repeat to display results. Any ideas?
App:
var app = angular.module('Search', ...
0
votes
1answer
44 views
width within a directive not changing in IE
My directive works perfectly in chrome but not in IE8:
app.directive('barMax', function ($compile) {
return {
restrict: 'E',
scope: {
current: '=',
max: ...
0
votes
1answer
4k views
AngularJS: Bind event listener, using jQuery, to elements generated by ng-repeat
I'm starting with AngularJS and I need to bind "load" and "error" events to the iframes:
<ul data-ng-controller="WebServicesCtrl">
<li data-ng-repeat="webservice in webservices">
...
0
votes
0answers
296 views
Unbind ng-click for dynamic dom element in angular
I have a dynamic div which is conditionally pushed into the dom. I have an ng-click event bound to a child element inside the div which fires myfunc() . Now when that div is removed and re-added to ...
0
votes
1answer
410 views
Angularjs: How to read scope rendered value with Jquery
Im working on an angularjs project. And really want to know how can I access values that rendered by scope by jquery ( or other javascript codes). Here is a part of my template:
<div class="bars" ...
0
votes
2answers
1k views
Angular js / Typeahead - Delay call to $scope method
I have following input field code snippet from here I am calling Angular js $scope method in the following way
<input class="search-txt-input"
id="partner_name"
...