All Questions
Tagged with angularjs-controlleras angularjs-controller
27 questions
0
votes
0
answers
209
views
Angular 1.5 component doesn't call parent controller method
I'm using angular 1.5 component and I want to call controller's method which is bind to scope from component's method call. Please find below code
<table-pagination previous="getPageName()"><...
-1
votes
2
answers
199
views
What is key benefits of using controllerAS in angularJS
ng-controller="invoiceController as invoice" create new invoiceController constructor and assigned the same to scope behind the scene, which the similar thing $scope injection does in controller ...
2
votes
1
answer
60
views
Why are my controllers methods not available?
after a long time I have to concentrate an angular again.
But I fail...
... ng-repeat="n in DataController.getObjects"
myApp.controller('DataController', [function () {
console.log('test 1');
...
1
vote
2
answers
413
views
updating variable in http request callback in angular
This is probably easy but nevertheless. I have a http call in my controller where I load a json file. I want to update a variable in my html based on a result. It updates apparently the variable (...
1
vote
2
answers
604
views
AngularJS - Data is not populating in table while using http service
I have a Web API which retrieves list of employees. Now when I call to $http service, I can get data from WebApi but it neither populated in table nor gives any error.
Note: I am using angular v1.5....
1
vote
1
answer
192
views
Angular app with ui-router not hitting controller unless its inline function
I am having trouble with ui-router. If I use an inline function it works, otherwise when I click on the route the controller is not used. I can debug the browser and the js is being delivered but no ...
1
vote
1
answer
808
views
angular directive controlleras and link
I have markup like this
<i class="fa-font icon-user" wd-user-profile></i>
to show / hide this div
<div id="user-profile" ng-show="vm.isVisible">
<h3>user name</h3>
&...
4
votes
1
answer
2k
views
Change a value inside ng-repeat cycle with ng-click
I want to change a value of an item inside an ng-repeat cycle using a function.
This for example won't work.
HTML
<ul class="unstyled">
<li ng-repeat="todo in todoList.todos">
&...
2
votes
3
answers
204
views
AngularJS: code not working when iterating through object [duplicate]
I am trying to populate a list of employee objects from my controller empctrl in a template.
Here's the controller:
app.controller('employeeController', function ($scope, employeeService) {
...
0
votes
1
answer
729
views
Pass $scope data from controller to view
I want to display $scope.predicate and $scope.reverse values into my view(in the <p> tag ). It seems that using {{ }} expression is not working.
app.js:
var app = angular.module('testApp', [])...
0
votes
1
answer
40
views
Angular controller functions are both constructors and a decorators?
If one writes a controller as ctrl for the following code:
function Controller($scope) {
$scope.abc = "123";
}
angularApp.controller("controller", Controller);
Does the pseudo code below ...
1
vote
2
answers
108
views
What is the issue with this sample code in Angular Js
I am learning angularJS. I have tried a calculator using angularJS. Two combo boxes having inputs and the other combo box is having the operations. When the user clicks the button then it has to show ...
1
vote
3
answers
459
views
Ng-Click not firing
whenever I click my submit button nothing happens, currently all I want it to do is print out the username and password to test there bindings.
And I am able to talk to the controller and print out ...
0
votes
2
answers
63
views
why is this controller instantiated only once?
I have the following (also in Plunker):
<!doctype html>
<html
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
&...
6
votes
2
answers
2k
views
Using this instead of $scope inside controller
I am trying to follow style guide for angular and there wrote we should use this insted scope...
Styleguide
Could someone explain me when I am able to use this?
Here is my try..... What I am doing ...