Skip to main content

Questions tagged [angularjs-controller]

The AngularJS controller exposes the data that is to be displayed into the HTML view. It plays the essential role of the ModelView in the MVVM design pattern. The view is a part of the HTML template.

angularjs-controller
3 votes
1 answer
41 views

Get data between two controller that there are no any relation them in angular.js

I have two controller that they aren't any relation and want to know smtg in controller1 when happen a change in controller2. like this: Update smtg in controller2 after changing controller1 to ...
Omid Sotooni's user avatar
0 votes
1 answer
75k views

Angular.js unable to change scope variable value just after a different function call

I'm trying to implement a Refresh button for fetching latest search results from an external index. When I click on the Refresh button the icon is supposed to spin. My plan was to have a scope ...
cmgchess's user avatar
  • 9,286
0 votes
0 answers
36 views

Why the value of my service is undefined when it's called out of $http

This is my service app.factory('checkMembership', function ($http) { var membership; return { setIsMembership: function () { $http.get('api/User/checkMembership').then(...
user10863293's user avatar
1 vote
1 answer
75k views

In an Angular.js controller's scope function code doesn't run below a $timeout statement inside

I have a button for which I have set ng-click="refresh()". The console logs before the timeout function logs correctly but the console log inside the $timeout block and after the block doesn'...
cmgchess's user avatar
  • 9,286
0 votes
2 answers
71 views

How to make directive use the controller specified in directive attribute?

So I have a directive: <directive data="user" templateUrl="./user.html" controller="UserController"></directive> I want that directive to use the controller ...
stealz's user avatar
  • 544
0 votes
1 answer
53 views

Passing service call from directive to controller in angularJS

I have a directive, who receive a file to upload in httpPostFactory service and php code <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.3/angular.min.js"></script> ...
Andres CC's user avatar
1 vote
1 answer
117 views

How to pass data with Angularjs

How do i pass data from the controller to a component to show to the user? app.js (function(angular) { 'use strict'; angular.module('app', []).controller('MainCtrl', function MainCtrl($scope, $...
Harry Bosh's user avatar
  • 3,741
1 vote
1 answer
173 views

AngularJS - How to change components controller dynamically?

I have an angularJS component and I manually set the url for a link. But I want to change this url after blogposts is loaded in a different method. HTML: <a ng-href="{{ $ctrl.readMoreUrl }}&...
Jimmy Tudesky's user avatar
0 votes
0 answers
620 views

Angular JS controller is not working in IOS 14

Angular JS controller is not working in IOS 14. But its working below IOS 14. App shows white or blank screen. I don't have any issue with splash screen. Controllers and templates are working fine in ...
Saravana's user avatar
  • 278
1 vote
0 answers
40 views

Unable to pass data to a controller inside a component in AngularJS

I have following component componentsModule.component('detailComponent', { templateUrl: 'detailTemplate.html', scope: {}, bindings: { textParam: '=' }, controller: ['$...
Umair Aamir's user avatar
  • 1,644
0 votes
1 answer
320 views

In Angularjs to assign ng-model for dynamically and read the values in Controller function

I am trying to create a new rectangle when the user clicks add button. This rectangle would also have an input field and select for these fields I am trying to assign the ng-model dynamically and read ...
BATMAN_2008's user avatar
  • 3,310
0 votes
1 answer
922 views

how to make certain options bold in select using angularjs filter and ng-options

I am using the AngularJS ng-options to populate certain select element. I would like to make some options bold and make them disabled. I am trying to achieve this using the filter along with ng-...
BATMAN_2008's user avatar
  • 3,310
-1 votes
1 answer
296 views

How to enable CORS in AngularJs? [duplicate]

I am trying to consume a ZOOM API POST method using angularJS: /webinars/{webinarId}/panelists When I run the solution locally, my angular controller, returns an error: Zoom provides the code to be ...
erasmo carlos's user avatar
1 vote
1 answer
111 views

How to call an angularJS function from javascript?

I need to call an angularJS function from a javascript function. This is my javascript function: function callAngularFunction(userid, serviceid, system) { angular.element(document.getElementById('...
Araf's user avatar
  • 273
0 votes
1 answer
91 views

AngularJS expression not working with adding controller

When i added ng-controller to my index.html, the expression show up as {{name || "Hello"}} and {{ age || "my friend" }}. After i removed the ng-controller, expressions aslo cannot work. it is the ...
user avatar

15 30 50 per page
1
2 3 4 5
83