In AngularJS, a scope is an object that refers to the application model. It is an execution context for expressions.
-1
votes
2answers
18 views
How to Load local images in Angular JS?
I am new to ANGULARJS.
How to load image from web-content folder?
I am using like below.
$scope.img_source = "../WebContent/Welcom2Iquote.gif";
In index.html I am using like below.
0
votes
2answers
14 views
AngularJS Controller Display error
I am new to AngularJS and stuck with an output.
Here is the code snippet:
<html ng-app>
<body>
<div class="container" data-ng-controller="simpleController">
<ul>
...
0
votes
1answer
46 views
Angularjs Concatenate $scope
I like to know if it is possible to concatenate several $scope to make that one.
For example the address of the orginal scope is:
$scope.templates.webapp.dc01[0].value
I would like the DC01 ...
0
votes
1answer
27 views
How to show the full list of data from json using Angular JS?
Am having a json Data from getArticalMediaHomePageData.json and the data inside this json is
{
"articalMediaList" : [ {
"code" : "KLSG0001",
"codeDescr" : "Buzz",
"sectionArticleList" ...
0
votes
2answers
32 views
Push form data to firebase not working
Hi i am having problem with push data to firebase from angular. I am newbie in this so i need help to check what is wrong with my code
this is my code:
addrestaurant.html
<h4>Nama Restaurant&...
0
votes
0answers
32 views
Challenges using scope (Angular.js)
I am working on an assignment and have found some challenges with my angular app. I have a folder, which contains dishtail.html and app.js but I have found some challenges in the view, that is the ...
2
votes
2answers
29 views
Angular directive parent scope
I'm building a directive that decorates a table header item and sort the data upon the click event. I cannot apply the changes on the data model to the parent scope using the directive scope.
vm.data ...
0
votes
1answer
27 views
AngularJS orderby sorts number and dates treating them as string
I need to develop a table in angular js to show a third party data (and hence data cannot be changed).
Data to be shown is completely dynamic in that number or sequence of columns can change anytime.
...
0
votes
0answers
22 views
how to send the client login data to the server using angularjs
I'm working on project which i need the client to send the data to the server
using my server that has some users that only allowed to log in the problem
that I can't send this information to my sever
...
0
votes
1answer
16 views
Data in angular is getting displayed and disappearing when used $scope
My ejs file is :
Express App
</head>
<body data-ng-app="indexHomepage" data-ng-controller="indexController">
<div style="...
0
votes
1answer
27 views
How can I update a parentScope array when it changes in the childScope in Angular?
I have a main controller with a nested child controller
<div class='main' ng-controller='mainController'>
<div class='search' ng-controller='searchController'>
<input type='...
78
votes
7answers
170k views
AngularJs: Reload page
<a ng-href="#" class="navbar-brand" title="home" data-translate>PORTAL_NAME</a>
I want to reload a page.How can add to do this?
0
votes
1answer
53 views
Unable to get property 'length' of undefined or null reference at ctrl.getplaceholder in ui-select.js
Hello I am implementing ui-select angular directive for multiple auto complete. with angular version 1.2.18 it workes fine but when i used with angular 1.5.5 getting an Error like :
Unable to get ...
1
vote
3answers
5k views
Where do I put event listener code in AngularJS that all controller use?
I want to have some event listener code in my AngularJS app which will apply to the scope of all controllers.
I basically want to define the following somewhere:
document.addEventListener("...
-1
votes
0answers
8 views
AngularJS converting code from $scope to this keyword in controller does not work
I update my code to see effect of this keyword instead of $scope,
but the code no longer works and it does not give any error in chrome console
Here is my code:
Link to code
<!DOCTYPE html&...
8
votes
2answers
9k 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'> <span>{{testContent}}</...
0
votes
1answer
22 views
Promise not updating my variables
i have in my controller a function that executes some tasks, one of them is to check using my service if some prices or valid, and if there exist any errors stop from executing the rest of the code, ...
0
votes
1answer
38 views
angularJS: Error: $scope is not defined
I want to run a service that read total unread message when user visits a few particular page. I'm using resolve for this. I set up a factory which communicates with the backend through a http call ...
0
votes
0answers
34 views
Angular: View is not rendering after POST and GET
I am very new to Angular.js, and I am starting to learn it by building a small project alone the way. I am really excited that it works properly for sending out POST request and Get data from server ...
-1
votes
0answers
30 views
Angular js not working properly
I am creating a web page using Angular js. But in my browser console it is showing me an error:
TypeError: Object doesn't support property or method 'highcharts'
at e (http://ajax.googleapis.com/ajax/...
1
vote
3answers
13k views
How to remove deleted row in ng-table
I have a grid developed using ng-table and I need to remove selected item from grid table after removing from server-side. Already tried to call the grid loading ajax again, but it's not working.
My ...
5
votes
4answers
44 views
$scope not working in my nav bar controller?
My Angular app is developed using a boilerplate of this yeoman generator.
Routing and all things working fine but I could not get to working $scope only on navbar-controller.js and footer-controller....
1
vote
0answers
60 views
Dynamically display form data using AngularJS
I would like to dynamically display Person and Address data using label and input value in Summary Section. As the user edits the form fields, a list items with label + value should display in the ...
0
votes
0answers
17 views
Pager not navigiating through pages in $scope
I'm building this application that shows a modal popup of past contact event details when you click on a person - this part works.
I have set up a pager on the contact details (as they're are several ...
0
votes
0answers
31 views
directive without scope setting value undefined
In my angular app, I've to use different directives on a single field.
here are my directives
angular.module('app')
.directive('focusMe', function ($timeout) {
return {
scope: { ...
0
votes
8answers
89 views
how to return console data in angularjs
This console log is working properly. How to get this data for the html.
ProductController.js
$scope.selectedProduct = function(product)
{
console.log(product.post_title);
console.log(...
0
votes
1answer
11 views
Change in $document.on('click') not reflected in view
I have an angular directive ngx-notifications, it sits inside a controller MenuBarController.
View
<div class="row" ng-controller="MenuBarController">
...
<span ng-click="...
0
votes
1answer
24 views
Is it mandatory to use $scope.$apply for non-angular event
Is it a good practice to always update scope variable(s) using $scope.$apply when the control returns from a non-angular event?
I have a use case where same method is used by both angular and non-...
0
votes
3answers
36 views
TypeError: Cannot read property 'push' of undefined at products.js:25
angular.js:13920 TypeError: $scope.products.push is not a function
angular.module("exampleApp", [])
.constant("baseUrl", "http://localhost:2403/dashboard/products/properties/")
.controller("...
0
votes
0answers
19 views
Isolated scope on elements with multiple directives
Long story short, I have a directive that does permission checks by an attribute on the element using the directive a simple example:
Demo: https://jsfiddle.net/suunyz3e/285/
app.directive('test', ...
-2
votes
0answers
23 views
How much variables can be bind on $scope in angular? [duplicate]
$scope.a = "1";
$scope.b = "2";
$scope.c = "3";
...
1.How much variables can I bind on $scope, is that limited?
2.What's the max size of the $scope to be bind on?
-1
votes
1answer
28 views
Call function from Directive to Controller [AngularJs]
i have an app that can will send a message with attachment.
I am using this kind of module called angular-media-preview
here is the link
screenshot 1
I have a reset button in my app. Now, I cant ...
145
votes
4answers
80k views
AngularJS - losing scope when using ng-include
I have this module routes:
var mainModule = angular.module('lpConnect', []).
config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/home', {template:'views/home....
2
votes
3answers
195 views
Angular write into nested scope properties
I have multiple "input field and a button" couples in my app.
The button opens up a dialog to write something into the text field.
[ input ] [ button ] ---> [ dialog ( ok ) ( cancel ) ]
I've ...
0
votes
1answer
21 views
Inheritance in AngularJs Directives link function
I'm currently using a custom directive in Angular to resize my angular-nvd3 charts by watching for a resize on the parent div. This works but I have to redraw every chart on even a single chart being ...
2
votes
1answer
27 views
AngularJS google chart dynamic data
Example
Try it on Plunker
I'm trying to put together the graphics with dynamic data, because I get the webservice and looks like this:
var avaliacoes_descTipo = [];
var avaliacoes_quantidade = [];
...
0
votes
0answers
41 views
Angular filter search multiple values using comma separated input
I need to implement an angular search directive where I can list down results for multiple values of same type (suppose search on multiple merchantId values). By default the table will show the ...
0
votes
2answers
22 views
AngularJS Directives - linking attribute value to scope property
I'm using angular-nvd3 for charting in my application. I created a custom directives to pass the options from the directive instead of setting them in the controller.
View:
<nvd3-bar-chart><...
2
votes
2answers
3k views
AngularJs $compile finish / end event
Hi I would like to know,
if there is a way to get something like promise (i guess it will be postLink in this case) on $scope.
i an unanswered question here: AngularJS: how to know when the $compile ...
1
vote
2answers
47 views
Why ng-repeat is not working correctly?
I am looping an array with ng-repeat but it only displays what is write in {{ }}.
There is not any error in the console though it's not displaying properly...
Here is the code
<html ng-app="...
0
votes
0answers
19 views
$scope variable not binding with view under <ng-view> directive
I want to hide certain menu items for a logged in user. In my code I've substituted the asyn calls for fb login with timeout functions with promises. I use a scope variable isAuth for this purpose and ...
0
votes
1answer
63 views
beforeEach not called via Karma/ Jasmine in an angularjs/ requirejs scenario
Running my unit tests locally works fine but on the build server the most stupid thing happens: Sometimes they pass, sometimes they don't. The main code:
define(['angmock', 'someMore'], function () {
...
1
vote
1answer
18 views
How to access Angular 1.5 component property inside a template
I am trying to implement a simple component in Angular 1.5 I am trying to access binded(bound) properties 'compTitle' in component mycomponentheader'.
var mycomponentheader = {
....
...
0
votes
2answers
18 views
Assigning $scope variables in Angular after service function call
I'm trying to assign values to $scope variables after a particular function call is over. But since JS engine processes requests asynchronously it assigns the variables before the function call is ...
576
votes
23answers
272k views
AngularJS : Prevent error $digest already in progress when calling $scope.$apply()
I'm finding that I need to update the my page to my scope manually more and more since building an application in angular.
The only way I know of to do this is to call $apply() from the scope of my ...
2
votes
1answer
31 views
How to use custom directive on Input fields in Angular 1.x?
I'm trying to modify the input element using a custom AngularJS directive. Basically I want to replace any <input type="country"> fields with a country drop-down.
But the directive doesn't seem ...
35
votes
3answers
9k views
Accessing inherited scope with Controller As approach
With the original way to define controllers, accessing the parent's scope was fairly trivial, since the child scope prototypically inherits from its parent.
app.controller("parentCtrl", function($...
0
votes
1answer
29 views
How to share variables across components in Ionic 2?
In Ionic 1 (With Angular 1), I can create a $scope.abc on the ngApp layer and other ngControllers can inherit $scope.abc with ngModel, so that when a text area in one controller changes, the others ...
0
votes
0answers
21 views
Angular Scope function is undefined on window load, but still works afterwards with button click
I've looked at many questions, however it's obviously something wrong with my specific case.
I'm new to Angular JS, and working on a project built by other people with very little documentation (...
1
vote
2answers
15 views
Angular post request not working not working
Here is my module:
angular.module('ngDetails', ['])
.constant('API', 'http://myserver.com/dir/api')
.controller('carDetails', carDetails)
Here is my controller:
function carDetails($scope, ...