In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.
1
vote
1answer
7 views
Angular Directive for keydown breaks other functionality
I'm trying to listen to keydown events on a formfield. To do this I've built a directive with a "keydown" attribute as follows:
var keydown = function() {
return {
restrict: 'A',
...
0
votes
0answers
14 views
Call method on Controller after dialog closes
I am trying to open a dialog where user can enter a name and then call a method on controller passing the result from the dialog.
class MyController {
constructor(public $scope, public $dialog) ...
0
votes
0answers
21 views
ng-model does not recalculate length of array on single keypress for a textfilter
I've got a table which uses a filtered textarea to construct a filtered table and list a count. The DOM is as follows.
<div filter-input></div>
<table>
<tr ng-repeat='item ...
1
vote
1answer
19 views
Angular data in dropdown not set the second time
I've something weird going on here with Angular.
I have a details view with an edit button. When I press the edit button, I pass the object to the edit view. On the edit form there are a few dropdown ...
1
vote
0answers
46 views
Angular JS Scaling & Performance
We are pounding our heads against performance issues with an Angular app we are building for a bank.
Unfortunately, it is a breach of contract to show snippets of the code. Regardless, I can describe ...
0
votes
0answers
13 views
How do I communicate to the page controller's scope from a recursively-created child/isolate scope?
I thought I had this figured out since the first level through works... In building a kind-of treeview using only AngularJS, I have gotten as far as creating a directive that binds to data on the ...
0
votes
2answers
20 views
How do I set a selected option for select in Angular
I have an object
$scope.colleges = [{"CollegeCode":"40","CollegeName":"College1"},
{"CollegeCode":"35","CollegeName":"College2"},
{"CollegeCode":"32","CollegeName":"College3"},
...
1
vote
0answers
23 views
Angular.js - does form validation emit any events?
The problem is, I'm using ui-router and I have two views, one is kind of a toolbar, second is content with a form.
Now I'd like to have a save button in the toolbar, which would be disabled if form ...
0
votes
0answers
13 views
Extend rootScope with alert service?
I can easily envision myself injecting my alert service into almost every one of my controllers:
myApp.factory('AlertsList', function () {
return [{ type: 'info', msg: 'Welcome!'},
...
0
votes
2answers
47 views
Angular Directive not updating
I am having an issue refreshing/updating an angular directive. Basically there is a Flag button which will make an async call to server and if it's successful, change the property userFlags which ...
1
vote
0answers
23 views
promise-tracker in AngularJS
I have problems when using promise-tracker.
What I want is to track a conversation. And part of my code is following:
js:
angular.module('myModule', ['ajoslin.promise-tracker'])
...
1
vote
2answers
33 views
$rootScope as event aggregator
I am using angular-js. I have a service that need to trigger event each time something occurs. For doing it I need an object that will act as event aggregator.
Do I need to build one? Or should I ...
0
votes
2answers
28 views
Get trailing white space from input type password to scope?
I have an input password field. I want to be able to warn the user that they cannot have any white space in there password. The trouble I'm finding is that I cant pass the trailing white space to the ...
0
votes
1answer
23 views
AngularJS: Redirecting to a login page but remember the initial location?
I have managed to get working security authentication so basically I do a redirect to the login route is the user isn't logged in.
This is working great, but i was wondering if anyone is doing ...
0
votes
1answer
18 views
Passing variable from controller scope to directive
In my controller I've defined $scope.worker which is a plain JS object:
{
name: 'Peter',
phone: 601002003
}
I've created a directive:
.directive('phoneType', [function () {
return {
...