Tagged Questions
0
votes
1answer
31 views
Angular.js return value from directive to controller
I have a problem with directive. I found this plugin: http://allensarkisyan.github.io/VideoFrame/, now I have this plugin implementation in my controller:
HTML
<div class="row" ...
0
votes
1answer
26 views
How correctly make a select ng-repeat into another ng-repeat
I have to write something like that
<table>
<tr ng-repeat="pers in persons">
<td>
<select id="person{{pers.id}}">
<option ng-repeat="city in ...
0
votes
1answer
11 views
Highlight currently selected node in expandable tree angularJS
I want to highlight currently selected node in the tree. That means I want to unhighlight previously selected node (if any). I don't want to visit whole tree and deselect the node if already selected.
...
0
votes
0answers
39 views
Is AngularJs the right choice for Scalable Applications? [on hold]
I have been researching for weeks now on the right architecture for creating a web page/ form builder solution ( something similar to this: http://www.formassembly.com/service-overview.php) and after ...
0
votes
0answers
13 views
Old data showing before new data loaded when re-visiting page
I have an angularjs system which displays a candidate profile and document against that profile which are managed & accessed by the users. We are encountering a problem whereby when viewing the ...
0
votes
1answer
13 views
Pass Services to Application Config in angularjs
I am developing an application with angularjs I have this piece of code for checking if the user is logged in at the end of the routers I also define a function in a Service in order to have a ...
0
votes
0answers
20 views
ngClass is not updated successfully in a directive
I have created a directive, that creates a popup with a ul element, but ng-class = isVisible is not returning the correct value. It works, if I only have one use of the directive at my page, but when ...
-2
votes
1answer
21 views
angular is not correctly binding anymore
I'm starting to have problems binding data to a select using angular 1.2.18.
CHecking with batarang ,I have those data in the scope:
ComuniNascitaList:
[ {
id:
descrizione: Selezionare il ...
0
votes
2answers
29 views
AngularJS: $watch not firing when value changed in directive
I've got custom directive that add's a property to the scope in side the link function, then it add's a watch to it. If i changed the value of the scope property from the controller the watch gets ...
9
votes
4answers
1k views
When to use $scope directly?
I just started out with Angular and have been reading through a lot of Tutorials.
Now the free one at CodeSchool which was my starting point doesn't mention $scope at all.
From what I've gathered, ...
0
votes
1answer
17 views
Angular how to get route id at resolve block?
How can i get "pageid" inside resolve block?
For every url change i had to request the server, along with the "pageid"?
My code:
app.config(function($routeProvider){
$routeProvider
...
0
votes
0answers
17 views
how to know last child scope in hierarchy - angularjs
The $viewContentLoaded event iterates though all the available scopes in the page, I'm wondering how can I know when the I'm accessing the last scope in the hierarchy
...
0
votes
1answer
34 views
How can I detect if an Angular app has been initialized from outside Angular?
While developing the lift-ng plugin, I have noticed an issue where sometimes the server sends events via comet to the client prior to angular initialization. This causes events to be silently missed ...
2
votes
1answer
6k views
angularJS $broadcast and $on
is there a way to make the $broadcast propagate the variable to the $on during initialization phase?
<div ng-app='test'>
<div ng-controller='testCtrl'> ...
0
votes
1answer
24 views
Getting the Angular Typeahead to work with JSONP and JSON with properties
I've been pulling my hair out trying to get the $http.json() to properly return a result set of objects. I have locally stored examples of the same response and they work fine.
Can anyone look at ...
-2
votes
0answers
31 views
Angular JS Controller not working
I am new to AngularJS, and unable to figure out why this basic controller is not working given the following code. It should take in two numbers and run a simple calculation(addition or ...
0
votes
1answer
36 views
Update AngularJS Controller Scope from Another Controller/Scope
Hopefully this hasn't been asked.. I looked around and haven't found anything yet.
I have a single view that provides the user with a modal dialog (wizard) to create a few things and then save them. ...
0
votes
2answers
26 views
Can't access attribute of Angular Promise
I'm trying to write a JS function using Angular such that I can have it return a value, then set a variable on the scope equal to that value. I return a promise object that according to the chrome ...
0
votes
0answers
8 views
Transitions when changing background-image inside ng-style
I have angular background-image url as a scope variable.
ng-style="image && {'background-image':'url(' + image + ')'}"
And a transitions set on it, but it doesn't seem to work. is there a ...
0
votes
1answer
10 views
Force disable directive cache or reload angularjs directive
How do I force re-render my directive
Template
<div ng-if="showDirective">
<my-directive attr="value"></my-directive>
</div>
<button ...
0
votes
2answers
17 views
How to assign models to $scope in AngularJS
According to best practices I read about, in my controller, I assign a model to the $scope rather than assignging multiple separate values to $scope:
.controller('TestCtrl', function ...
1
vote
2answers
36 views
AngularJS Accordion Expand All Collapse All
I am trying to get the accordions to toggle correctly through the directive ng-click. If I have Item one open how do I get it to expand all the accordions? Item two and Item three will continue to ...
3
votes
2answers
2k views
AngularJS directive link function not being called
I am trying to use angular-http-auth library with bootstrap modal window. Modals are working fine but I have problems with directives.
Here is a jsfiddle link - http://jsfiddle.net/jCUSh/85/ . I am ...
1
vote
1answer
31 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 ...
1
vote
1answer
35 views
Angular architecture for a sorting directive
Being quite new to angular, I am searching the best way to achieve a quite simple task.
My aim is to update in a database, through angular $resource service, the order (I have a position attribute) ...
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 ...
1
vote
1answer
11 views
Angularjs Bind Custom Attribute Once (like bindonce)
I like Bindonce a lot but I noticed it's attribute bindings are limited. I want to bind a custom attribute like data-form="school._id" and I want it only bound once. I know I can do something like ...
0
votes
2answers
34 views
Multiple AngularJS apps on page
I'm a noob in AngularJS, therefore sorry for stupid questions.
What I'd like to do is to use the same application in two (or more) places on a page. For that I've created two HTML elements and have ...
0
votes
1answer
26 views
AngularJS directive: Updating the isolated scope
I want to create a directive which displays changing data. For simplicity let's say I want to display the current time. This means that once a second the directive needs to refresh itself.
In the ...
0
votes
1answer
11 views
Double data binding with angularjs controller as style
I am searching how to use double data-binding in angularjs respecting controller as style recommended by Google. It looks like:
hello.mainpage.HomeCtrl = function() {
/**
* @type {string}
* ...
1
vote
1answer
27 views
AngularJS scope issue with a UI-modal window
I'm using the UI-bootstrap modal window in my Angular application and I'm running into some kind of a scope problem.
I've got a modal dialog which basically has two modes. At first, it displays a ...
0
votes
1answer
20 views
Angular.js. Advice on building an app wide 'modal' that needs dynamic templates/controllers
I need some ideas on how to best approach this.
In my app I have a dom element, that acts like a modal but pops in from the right side of the viewport. In the numerous controllers in the app, I need ...
0
votes
0answers
34 views
AngularJS: $scope.array.push() does not update the view, even with $apply
I'm trying to learn AngularJS and there is this thing that I don't understand, which seems like all the internet solved by using $scope.$apply, but I already use it and it does nothing.
Basically, I ...
0
votes
0answers
57 views
Angularjs Service Scope + Bindings
I am looking to run the following controller but im having trouble with scope.
I have a service that calls two functions that retrieve meta data to populate scope variables.
The issue is that ...
1
vote
1answer
38 views
AngularJS routing with id parameter ends in white page
var app = angular.module('application', [ 'ngRoute', 'ui.bootstrap' ]);
// configure our routes
app.config(function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
...
1
vote
2answers
25 views
angular .then() is not recognized
I try to use .then() in my angular controller
angular.module('n2goApp')
.controller('MainCtrl', function($scope, Products) {
Products.get(). then( function ( ...
0
votes
1answer
31 views
AngularJS websockets too fast
I am using AngularJS to power my webapp. Recently I've decided to introduce Stomp over websockets in the mix with RabbitMQ. One problem that I keep hitting is that sometimes the messages sent from the ...
0
votes
0answers
29 views
Angular.js - Scope join error
sorry I'm a total noob in Angular, I'm having a problem adding user model to todo list app:
http://yeoman.io/codelab/write-app.html
Here is my controller:
'use strict';
angular.module('test3App')
...
4
votes
1answer
1k views
Angular - Using one controller for many coherent views across multiple HTTP requests
I have a simple Angular JS scenario. I show a list of experts in one view, and that list contains actions to edit an expert, which would be done in another view. These views are coming from server and ...
0
votes
0answers
27 views
What are the advantages/disadvantages to a declarative template? ViewModel approach?
When talking about a declarative syntax in angularjs we usually always bring up directives, and how we can pass $scope properties down into these directives for processing, DOM manipulation, data ...
0
votes
0answers
24 views
Directive template unable to reference a scope object's properties (even though link() can)
In my application I've got a directive, table-panel which sets up another sortable-table directive. The HTML looks like this:
<table-panel data="table.data" search="search.s" ...
-1
votes
1answer
20 views
Using jade in angularjs, on include loosing the scope
I am using node with sails as my server. My problem is when I am trying to include a jade file using include I am not able to access the scope.
Please go through the below code
...
30
votes
1answer
9k views
Scope issues with Angular UI modal
I'm having trouble understanding/using the scopes for an angular UI modal. I've searched high and low, and read the docs over and over. Now, I'm turning to the community.
I'm hoping that I'm just ...
0
votes
1answer
27 views
Invoking Main Controller function from Modal Controller - AngularJS
Problem Summary
I want to invoke getCost function present in main controller, from modal controller.
Pseudo-Code for this to explain the problem follows.
I am am opening modal dialog as follows:
...
0
votes
1answer
22 views
Angular is returning “TypeError: Cannot read property” when using regular expressions
I am trying to extract a youtube id form the input provided. the output is fine but i am receiving this error TypeError: Cannot read property '2' of null
$scope.Message.color = 'green';
...
0
votes
1answer
12 views
how I can pass html text to angularjs template
how I can pass html text to angular js template.
for eample for the below template I want to pass task.data as "this is task xyz status of task"
now on web page I can see html tags . please help ...
3
votes
1answer
30 views
How to get width of an element from an ng-click without Jquery in AngularJS?
I would like to get dynamically the width of the div.progress-bar from the ng-click.
My function move($event) on the element div.progress-bar returns the event with the element div.progress-bar. But ...
2
votes
0answers
14 views
Angularjs create scope object using Object.create
I am learning AngularJS by building a web application. Have a prototype object in my service module (in the fiddle, I have mocked it within the controller).
Now when I try to update the child element ...
0
votes
0answers
36 views
Angular loaded html scope and bind
I have a controller which does a search and returns some pre-rendered HTML from the server.
The HTML happens to contain some paging, the pages are wired up with ng-click="page(4)"
If I do the ...
1
vote
1answer
34 views
Angular $rootScope.$on Undefined
I have the following in a controller.
$rootScope.$on('progressbarEvent', function (event, data) {
$rootScope.progresscurrent = data.currentprogress;
console.log('Event listening: ' + ...