# Category: angular-controller

## i need to store the value in angularjs function

how to i need to store the value in angularjs function im having ng-change function in the name of myFunc() to store the response from html listitem. the respose value is getting saved in the local variable of the function but when i refresh the controller or page the values are deleted. i need to store the value during ng-change in myFunc() after multiple page or controller refersh the value will be stored in the […]

## add selected value from dropdown list to database angularjs php mysql

i have a dropdown list and i can access the selected name through ng_model directive(selectedName) but My problem is when i try to pass the selected option value to the database it pass a null value the query get executed and text box values are passing properly the issue is with the dropdown option values.. what went wrong .. in the controller or with the php code mysqli_real_escape_string part. it’s confused .. any help <select […]

## Angular 1 Error: [ng:areq] – Controller inside Controller

I’m trying to use angular rating from this http://plnkr.co/edit/kFKejRU0G2wmkD7GlNdH?p=preview Here is my angular code. var ProfileApp = angular.module(‘ProfileApp’, [‘ui.bootstrap’]); ProfileApp.controller(‘getprofile’, function($scope,$http) { //Some codes are here }) var RatingDemoCtrl = function ($scope) {$scope.myRate = 0; $scope.submit = function() { console.log($scope.percent) ; //null } $scope.rate = 1;$scope.max = 5; $scope.isReadonly = false;$scope.percent = 20; $scope.hoveringOver = function(value,object) { console.log(‘hoveringOver’, value);$scope.overStar = value; $scope.percent = (100 *$scope.overStar) / $scope.max; };$scope.hoveringLeave […]

## Displaying json data using angularJS in html page

I am trying to display data which is in json file in table using angularJS, but I get blank page as an output. The code is below. I have separate json file and separate js file in which I have defined angular controller. When I ran the application I got a blank page as an output. View: <!DOCTYPE html> <html xmlns=”http://www.w3.org/1999/xhtml” ng-app=”angularTable”> <head> <title></title> <link href=”content/bootstrap.min.css” rel=”stylesheet” /> </head> <body> <div role=”main” class=”container theme-showcase”> <div […]

## Routing issue with angular directives

I’m trying to setup one of my first angular projects and am having trouble getting to grips with the routing. On page load I see the initial template that has been set by the preferencesDirective, which is great. When I click the “Change Template” button I want it to change to another template but nothing happens. If I set the template url’s in the \$routeProvider to something invalid then I see a 404 error in […]