Tagged Questions
0
votes
0answers
9 views
AngularJS directive scope property doesn't render in directive view
I have a problem with scope property of directive that doesn't render want to render in directive view.
app.js
.config(function ($routeProvider) {
$routeProvider
.when('/', {
...
0
votes
3answers
22 views
AngularJS scope of variable [duplicate]
I'm trying to get a json file within a a controller with $http.get. All well until I try to access the property which holds the response. If I try console.log(property) inside the $http.get() it ...
1
vote
1answer
37 views
AngularJS ui.router won't load template
I'm still learning AngularJS and having trouble with UI Router.
It just won't load the template.
Here's my code:
<body class="top-navigation" ng-app="mixcontainer">
<div id="wrapper"&...
0
votes
1answer
35 views
How to refresh data in angularjs kendo-multi-select
I am new to angularjs. i am using kendo multiselect i am adding data by default when loading the view. and i have one save button when click that button i am calling Success method inside that method. ...
0
votes
1answer
40 views
Data getting overwritten or corrupted. What is the reason?
Here is my code for the controller and the service. I am using AngularJS v1.6
app.controller('ServicesCtrl',['$scope','$http','DataService',function($scope,$http,DataService){
$scope.returnedData =...
0
votes
0answers
24 views
Using an Array.prototype.forEach in AngularJS not updating to the view
I have a piece of code inside an angular controller that requests three services for data. Once the last service returns, I'm taking the data from all and merge it into a dataset. Out of the nested ...
0
votes
0answers
11 views
Angular get information binded to a cookie
I've got these codes.
HTML
<div id="agregarpedido_table" ng-init="zero = 0">
<div id="agregarpedido_table_item" ng-repeat="entrada in entradas">
<input type="text" ng-model="...
0
votes
1answer
41 views
Change angular $scope value when different radio button is clicked
I am doing an angular project, I have tried to change scope values and element values by changing radio button. When radio button 1 is clicked I am getting value from server and saving it in scope and ...
0
votes
0answers
14 views
Angular Modal not showing value on re opening
I am opening a modal window which has a button to start timer for 2 minutes (using $interval).
I have keep timer running in background if i close this model and show on re opening updated timer value....
1
vote
2answers
35 views
How to format a date in AngularJS (Datefilter)
I need to format a date with the AngularJS date-filter. Unformatted the date looks like this:
2017-03-02T00:00:00.000Z
What I want to achieve:
03/02/2017
I use the date-filter like this:
<p ...
0
votes
4answers
29 views
how to disable or enable button on angularjs?
I have used 2 button in the form. I want to disable button1 on initialisation though I have given ng-disabled="true" but whenever user clicks on button2, button1 get enabled. Can anyone tell me how to ...
0
votes
1answer
17 views
How to store obtain an md-select ng-model value within a dialog in AngularJS?
I have this template I am using to pass into an md-dialog box:
The showDialog function:
$scope.showDialog = function(element) {
var parentEl = angular.element(document.body);
$mdDialog.show({
...
0
votes
0answers
22 views
While Creating $mdToast Service, function not calling
Creating the custom service, in that using $mdToast.show() method to display the toast message. This service is injected in another controller and calling this service function from that controller. ...
0
votes
0answers
44 views
AngularJS controllers mixed up each other
I am building a Single Page Application via AngularJS all of my controllers working just fine one by one but when I put them side by side inside tabs the problem is starting.
Firstly here my tabs
&...
1
vote
1answer
21 views
How to count Angular Watchers on Page?
How do I accurately count the number of watchers on a page?
I found a few different articles on how to do it, but they all give me different counts, so I'm struggling to find which is the correct ...
0
votes
1answer
23 views
Undefined value in ng-model. Error: Expression 'undefined' in attribute … non-assignable
I have a page called index.html and I embedded a component called add-circle-form in the page. What I want to do:
I want to save the user choices in add-circle-form.js and pass the data to index.js,...
0
votes
1answer
55 views
Angular $scope variable is empty and not updated after setting it in HTTP GET
I have $scope.participants = [] as a global variable. My problem is when I used this variable in another function after calling the function below. $scope.participants is empty. However, it isn't when ...
1
vote
1answer
19 views
Why is a scope's $$watchers length not equal to the scope's $$watchersCount
What is the difference between a scope's $$watchers field and $$watchersCount? Why are they not always the same?
On the angularjs.org homepage, running angular.element('body').scope() in Chrome's ...
1
vote
0answers
75 views
element height watcher is not working properly inside the angular directive?
<div ng-app="app" ng-controller="myCtrl" style="border:1px solid;height:300px;width:100%">
<my-movie>
Movie Title :
</my-movie>
</div>
<...
0
votes
2answers
32 views
Give URL with ID in Angular UI Router
I have a problem, when I edited data, my url not showing id example : /answer/1 or /answer/2 or /answer/3 etc. Im confused because Im using UI ROUTER
I'm a beginner use UI ROUTER angularjs. Can you ...
0
votes
3answers
37 views
angularjs variable after http call has null value
i have define the variable ttest defined before $http call.
after that i assign data to this variable .
the value ttest[0] has value in $http function but outside there is no value available there
...
0
votes
1answer
20 views
AngularJs-$Injector an Object?
I've been trying to understand to core of angular. I'm having trouble understanding the way things are structured after angular has compiled. I know the Injector contains/keeps track of Angular ...
-3
votes
1answer
26 views
AngularJS - How to store the value of an input field of a particular Controller in session storage & retrieve that value in another Controller?
I have an Angular app which have 4 different parts in the app folder. I want to store a scope variable in Controller 1(say this part is for normal users) using session storage & retrieve that ...
0
votes
2answers
59 views
How to compile Angularjs nested directive with javascript
I have a nested directive that has nested hierarchy.
angular.module("app", []);
angular.module("app").directive("hero", function () {
return {
restrict: "E",
template: "<div>Hero {{...
0
votes
2answers
25 views
How to give input to an angular controller
I am new to AngularJs. I've worked on KnockoutJs which has MVVM methodology. You define your data in ViewModel and data-bind it to the View. That way, you can create modular and single-purpose ...
0
votes
2answers
31 views
angularjs custom messages and logging
What is the best way to store and access custom messages in Angularjs ?.
Example:
$scope.alert.msg = "Delete successful !!";
$scope.alert.msg = "Error deleting record.";
Instead of hard coding the ...
0
votes
2answers
26 views
I am trying to get all selected values in the list of checkbox using angularjs
**i need to get selected checkbox values in folder array so i have used ng-model. but it seems to be not working.
**i need the array in "columnname:"columnvalue" format. but that would be the next ...
1
vote
2answers
39 views
How to access the form object on a angular 1.6 / es6 application?
I am working on a app that uses angular 1.6 with es6.
I have a form :
<form name="foobar" ng-submit="$ctrl.submitThat()" novalidate>
in the submitThat() function I would like to access the ...
0
votes
1answer
17 views
AngualrJS filter records that being with
I have a field in my AngularJS scope called rid
This is always a 4 letter code such as 1A22 or 4D23 (number, letter, number, number)
I want to filter out (i.e not show) any that meet certain ...
1
vote
2answers
15 views
Switch Button Not Working From API Handling
I have a problem. I made switch button based on API. Just change "on"/"off" in my view. But When I clicked button "off", my button changed to "on" but when i clicked "on" its not working. And then ...
0
votes
1answer
12 views
Angularjs how to loads required js files home page index.html
We have angularjs app with lot of js getting loaded during the initial page load. Which are not required as part of home page. How we can void these. Is requieedjs solve this. How and when other js ...
0
votes
1answer
16 views
Scope is not filling when I try to set it after a ajax request
I'm trying to get data from an API and using this data to make up Google Maps.
But unfortunatly it's not working when I set data in side of .then().
This is my controller
var alertController = ...
0
votes
0answers
18 views
How to drag and arrange images with Angular.js with Orderid persisted in database
I am having a trouble with rearranging the order of images. I am using angular js v1. Now there is an order_id column in images table in the database. So when I drag and change the position of images ...
0
votes
1answer
41 views
Angularjs error, Module 'testApp' is not available
<html>
<head>
<script type="text/javascript" src="js/angular/angular.js"></script>
<script type="text/javascript" src="js/angular/angular-route.js"></script>
<...
2
votes
2answers
26 views
When I set angularjs directive templateUrl $rootScope event does not populate
I have two directive that one of them broadcast a message to get another one like this: (demo)
angular.module('app', []);
angular.module('app').directive('foo',
function($rootScope) {
...
0
votes
3answers
39 views
why is the following Angular 1.6 code not filtering to lowercase this way?
this is my controller code
myApp.controller('MainController',['$scope','$filter',function($scope,$filter){
$scope.handle = '';
$scope.lowercasehandle = $filter('lowercase')($scope.handle);
}]);...
0
votes
1answer
11 views
module.value not updating across app and $provide injection breaks app
This problem is very confusing even for me, and so I am going to try and simplify it step by step as best as I can.
1
I start off with the app by simply calling angular.module('app', []). Then in ...
0
votes
1answer
39 views
How can we use $scope.$apply method in angular like javascript apply method like function.apply(elem)?
I created a page with dynamic content in pure javascript and angular in similar.
I used apply method in javascript to reuse the function assigned to other element. It works perfectly. I am unable to ...
0
votes
2answers
44 views
How can I change URL from $scope in AngularJS?
I have made access navigation with $scope and I used them based on click and I did. I can't set URL in variable accommodate. The correct URL is http://www.example.com/base/index or http://www.example....
0
votes
3answers
50 views
Promise Angularjs 1.6 How can I force function to wait for api response
Im using this plugin: http://www.codingdrama.com/bootstrap-markdown/
I want to hook the onPreview
So on onPreview i try to make my api call:
app.directive("markdowntextarea",function ($http, $q) ...
-1
votes
3answers
25 views
Bind the Unique values from json array into dropdown in angularjs [closed]
Array is this and the unique name: DomicileName
$scope.domicile = {};
$scope.domicile.users = [{
DomicileName: 'European',
PortFolioName: 'nternational Select x EM ADR',
Alias: 'ADR x EM'...
0
votes
1answer
18 views
angularjs, needs to make json object property values in string format to be rendered as actual templates
I have the following json array of which each object is accessed on a specific tab click. Each json object of the array has different templates like they can represent ui-grid, or c3 chart directive (...
0
votes
3answers
28 views
Does ng-src also add src attribute to image tag?
I had an angular code for an image like <img class="testClass" ng-src="{{ImagePath}}" alt="{{imageName}}" />
However when after the page loads, I see an src attribute to the img tag as shown ...
0
votes
1answer
38 views
How to make one form but can use with two necessity (Angular JS)
I have a problem. Not much different with templating angularjs. But im still confused. I have made one form and used in two necessity. The necessity is update form and add form. If heading update data(...
1
vote
3answers
28 views
How to assign data returned from function to $scope variable
Here is my code,
$scope.output=abc(1,2);
function abc(mid, type) {
$http({
...
}
}).then(function (response) {
return response.data;...
0
votes
2answers
30 views
AngularJs: how http get data.column variable
Hi I want to combine the singleton data coming with http get with the model from the selection box.
$scope.ShowResult = function() {
$http.get('http://otm.dev/carPrice?modelId=' + $scope.model_id)....
1
vote
2answers
39 views
Make two layouts share the same $scope
I want to propose two layouts (ie, horizontal and vertical) for my contents. So switching in the selector will lead automatically to the corresponding layout. Here is the JSBin:
<html ng-app="...
0
votes
2answers
53 views
Select multiple display names instead of IDs using AngularJS
I have a multiple select like this :
<select ng-model="listProds" multiple>
<option value="10">product 1</option>
<option value="25">product 2</option>
<option ...
0
votes
1answer
25 views
Angular Check location from index page
I'd like to hide navBar if i'm on some locations. A have the index page:
<navbar ng-show="showNavbar"></navbar>
<div ng-view></div>
with js:
scope.showNavbar=(window....
0
votes
0answers
31 views
Very significant issue about Component and bindings
Let's consider the following code:
angular.module('app').component('foo', {
bindings: {
callback: '&'
},
controller: function() {
// ...
this.callback();
}
});
and the ...