Binding problems using Angularjs - angularjs

I am trying do a dynamic bind a < tabset> based on the selected value of dropdownlist.
Here is my app.js
var app = angular.module('app',['ui.bootstrap']);
app.controller('tabCtrl',function($scope,$http){
$scope.countryList=[{name:'Canada',id:'ca'},{name:'United States',id:'us'}];
$scope.selectedCountry =$scope.countryList[1].id;
$scope.init = function() {
$scope.countries =[{countryName:"ca"},{countryName:"us"}];
$scope.countries[0].tabs=[{title:"CA Title 1"},{title:"CA Title 2"}];
$scope.countries[1].tabs=[{title:"US Title 1"},{title:"US Title 2"}];
};
$scope.switch = function(){
console.log($scope.selectedCountry);
}
});
And this is my jsp page.
<%#taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%# page contentType="text/html;charset=UTF-8" language="java" %>
<html ng-app="app">
<head>
<script src="<c:url value="/resources/javascript/angular.min.js" />"></script>
<script src="<c:url value="/resources/javascript/ui-bootstrap-tpls-0.12.0.min.js" />"></script>
<script src="<c:url value="/resources/javascript/app.js"/>"></script>
<link href="<c:url value="/resources/style/bootstrap.min.css" />" rel="stylesheet">
<title></title>
</head>
<body>
<br />
<div ng-controller="tabCtrl" >
<!--<select ng-model="selectedCountry" ng-options="c.id as c.name for c in countryList" ng-change="switch()" />-->
<form name="frm" ng-submit="submit()" data-ng-init="init()">
<div ng-repeat="c in countries|filter:{countryName:selectedCountry}">
<tabset>
<tab ng-repeat="t in c.tabs" heading="{{t.title}}">
</tab>
</tabset>
</div>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
</div>
</body>
</html>
I have two bindings, one is for dropdownlist, one is for tabset.
My problem is if I add < select >, then my tabset does not show up..
Please help.
Thank you

Please make sure that you close select tag
<select ng-model="selectedCountry" ng-options="c.id as c.name for c in countryList" ng-change="switch()"></select>
Working demo below
var app = angular.module('app', ['ui.bootstrap']);
app.controller('tabCtrl', function($scope, $http) {
$scope.countryList = [{
name: 'Canada',
id: 'ca'
}, {
name: 'United States',
id: 'us'
}];
$scope.countries = [{
countryName: "ca"
}, {
countryName: "us"
}];
$scope.selectedCountry = $scope.countryList[1].id;
$scope.init = function() {
$scope.countries[0].tabs = [{
title: "CA Title 1"
}, {
title: "CA Title 2"
}];
$scope.countries[1].tabs = [{
title: "US Title 1"
}, {
title: "US Title 2"
}];
};
$scope.switch = function() {
console.log($scope.selectedCountry);
}
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js"></script>
<div ng-app="app">
<div ng-controller="tabCtrl" data-ng-init="init()">
<select ng-model="selectedCountry" ng-options="c.id as c.name for c in countryList" ng-change="switch()"></select>
<hr/>
<form name="frm" ng-submit="submit()">
<div ng-repeat="c in countries|filter:{countryName:selectedCountry}">
<tabset>
<tab ng-repeat="t in c.tabs" heading="{{t.title}}">
</tab>
</tabset>
</div>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
</div>

This is because ng-options tracks by object reference by default. If you want to track by id then you should add the following track by clause:
ng-options="c.id as c.name for c in countryList track by c.id"
Then, when you initialize the selectedCountry you need an object with an id property:
$scope.selectedCountry = { id: $scope.countryList[1].id }
Otherwise, your filter ({countryName:selectedCountry}) is not matching anything in the countries array. This causes <tabset> not to render.

Related

how to show different images when selecting the different options in drop down list using ionic ,angular JS

when we selecting the list from dropdown i want to show the different images.If we have option like this Option1, Option2 when selecting the option1 i want show option1.img and selecting the option2 i want show option2.image.
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<script>
angular
.module('myApp', [])
// controller here
.controller('myCtrl', function($scope) {
$scope.selectables = [
{ label: 'A', value: 'C:/Users/sp/OneDrive/Pictures/logo.jpg'},
{ label:'B', value:'C:/Users/sp/OneDrive/Pictures/spt logo.jpg'}
];
// this is the model that's used for the data binding in the select directive
// the default selected item
})
</script>
<div ng-controller="myCtrl">
<select
ng-model="selectedItem"
ng-options="S.value as S.label for S in selectables" ng-change="fun()">
</select>
{{selectedItem}}
<img src='{{selectedItem}}'/>
</div>
</body>
</html>
I am write this code but i am not able to showing the option first. Can you anyone please help me how to do that.
Everything is fine in your code it's just you didn't define your module name
ng-app='myApp' the moment I have added it, it worked !
below is the code snippet.
angular
.module('myApp', [])
.controller('myCtrl', function($scope) {
$scope.selectables = [{
label: 'A',
value: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEBUSEBMWFhUWGBUVFhYXGBcYGBoWFxgYFxUXGBcYHSggGR8lGxUVITEhJSorLy4wGB8zODMtNygtLisBCgoKDg0OGxAQGy4lHyUyMC81LS0tLy0vLS8zLy0tLS0vLS0tLS0vLS03LS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAKkBKQMBIgACEQEDEQH/xAAcAAABBAMBAAAAAAAAAAAAAAAFAAMEBgECBwj/xABNEAACAQIEAQYICwUGBQQDAAABAgMAEQQFEiExBhMiQVFhBxQyVHGBkZMXI0JSU2KSobHS4hUWotHTM3KzweHwNDVjdIJDRHPCJIPx/8QAGgEBAAMBAQEAAAAAAAAAAAAAAAECAwQFBv/EADARAAICAQIDBQgCAwEAAAAAAAABAhEDEiEEMVETFEFSsQUVYYGRodHwIsEyceFC/9oADAMBAAIRAxEAPwDpFqhY3M4YgS7gW7/9ih3LmZ48KXjYgggeo93X11yqednN3Yse839nZWGXNodUelwPs58StWqly+J0iXlxAG69F9Ove2q17Xtbh/8A2jeBziCUXRxv3j8RtVMzDIwuAjw5tzxVpiOvWbW+6y1QIJmQ3Rip7QSD66jtZRrUi8eBxZdSxt7Px8fj8z0FalaqhyCzFjhHmxMnRUElm2AVSbk224DjVuwuISRFkjYMjAMrKbgg8CDW6dqzzckHCTi/AzalatMJjI5QxjdWCM0bWN9Lr5SnvFCpOWOXK+g4yAMNj0xa/pG1SU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ufKImcyDUjnymjdkLW2GsKbNt2g1PpVFigemTxBw765GU3UyOzhT2qpOkHvtepGIwaO0buLmJi6bnZirIeHHosafpClk0IioOX5RDBG8cK6UdmZluSLsApAv5IsAABsLVPrFADIMjjRFRJJwqgKoE0lgALAceynMXl4MQX419DCRRzrKzMpuAXvuO47UQpGpsigPh8LK+LGIlQRhImiRdQZiXdWZmtsoGgAAE8TUj9kjqlnA7Oec/eST99EKVLFEXAZfHCCI1sWOpmJLMx4XZ2JLG225qVSpVBJ/9k='
}, {
label: 'B',
value: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAB/lBMVEX///8AcLQAKUDkKTm3KDOysrL/9+3gSS/x8fG5g0j88eH8/Py1fUCurq4AbbMAAAAAHDfe6/R1g4770sAzMzPe4+V1qM/ZMD76wq4AJTr6yLQAZ7D669ayuLgAJT0AZaMADjAlfrvgQiUlQFPfPBuorrWoxN63IS7/9+HkITPfPyAtLS399vVFRka4YGb55sy+vr7eNAoAACrLy8vd3d3uys0AMEq3GScATXvhUTkAYq7yvLXoeYC8vLzeLgD55OH20863MTvkZVLjCSXsnJLmc2LohHcAAA20d3u5oKLm1LUkIyP43drws6sAFzTjAB33r5uamprtoJeRuNizaitHisHDio6Hh4dcXFyCUiUAPGC2Rk5EWGjkaVb/68XK3ezqjYGDSgD/oobU5PCcazflQ1DnY2yzkZPsr7N1PgDaS1bOcHYXFxe2VlzYuYw+UGHRsJLDsKPHoHdWc4igf2HfybSNZD2mek3pjZPWVF7RZm2xdCe2P0jgx5/BkVzYjGeymIPaz8XIfoNsdHNiQjOzemYzY4xNLRE2JRNeQCB7VCuudVLNk4VCNylVLQAfEQT4zpiGbU/deVWaXSd1YlupgnS4kWrkq5L8voR2QTaLfm74qYXTdF2HpLpsZFhRSkD01ZxEHxVJPiS1ZUcvKB4ZAAAwHgBtUyXfwIf4364TpAEFAAAc50lEQVR4nO2dj18TV7bABzBhzCQEhQgCQUyjLEkwIF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J8rUC8yqJoqq3JaWIDRxmsvOZ/EuyNpHltIBaNXoC89H4pWkGOV08IHmJctQdiL5o6Bsy2HXvoAKhYtO2r2ecxXs8JtEK0CePkThK2o7vgKJAhbYe74igRQsUBB/goFUKEofvpVga/ltbyW17Id8v/hhB/fb0pVawAAAABJRU5ErkJggg=='
}];
})
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app='myApp' ng-controller="myCtrl">
<select ng-model="selectedItem" ng-options="S.value as S.label for S in selectables" ng-change="fun()">
</select>
<img ng-src='{{selectedItem}}'/>
</div>
</body>
</html>
<select
ng-model="selectedItem"
ng-options="S.value as S.label for S in selectables" ng-change="fun()">
</select>
{{selectedItem}}
<img src='{{selectedItem}}'/>
DEMO
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<script>
angular
.module('myApp', [])
.controller('myCtrl', function($scope) {
$scope.selectables = [{
label: '',
value: 'C:/Users/sp/Pictures/111.png'
}, {
label: 'CR00-1511-003352',
value: 'C:/Users/sp/Pictures/222.png'
},{
label: 'ED05-1511-003353',
value: 'C:/Users/sp/Pictures/333.png'
},{
label: 'ED05-1511-003356',
value: 'C:/Users/sp/Pictures/444.png'
},{
label: 'ED05-1511-003360',
value: 'C:/Users/sp/Pictures/666.png'
}, {
label: 'HL01-1511-003364',
value: 'C:/Users/sp/Pictures/777.png'
}];
})
</script>
<div ng-app='myApp' ng-controller="myCtrl">
<select ng-model="selectedItem" ng-options="S.value as S.label for S in selectables" ng-change="fun()">
</select>
<br><br><br>
<img src='{{selectedItem}}'/>
</div>
</body>
</html>

AngularJS: "$http.get" with input URL

I'm new to AngularJS and am trying to use it to link up with a simple web API I have in place. I already have URLs that return JSON data in the format: http://127.0.0.1:8000/posts/ followed by a date in the format YYYY-MM-DD. (example would be http://127.0.0.1:8000/posts/2015-07-28)
I have an input text box which I want to use to get the JSON data from my API and list it out, meaning if I enter 2015-07-28 into the input box, it should pull the JSON data from the API appropriately without a page refresh by appending the string value from the input box onto whatever URL I want (in this case that would be http://127.0.0.1:8000/posts/).
Here is what I have as of right now:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angular Test</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script>
var ListingApp = angular.module('ListingApp', []);
ListingApp.controller('PostCtrl', function($scope, $http) {
$scope.select = "";
var postJSON = "http://127.0.0.1:8000/posts/" + $scope.select;
console.log(postJSON);
$http.get(postJSON)
.then(function(res) {
$scope.posts = res.data;
console.log($scope);
});
});
</script>
</head>
<body ng-app="ListingApp">
<div ng-controller="PostCtrl">
<form name="dateForm">
<input type="text" id="dp" name="datepicker" ng-model="select" placeholder="Enter Date">
</form>
<span ng-bind="select" style="color: red">{{ dateForm.datepicker }}</span>
<ul>
<li ng-repeat-start="post in posts">
pk: {{ post.pk }}
</li>
<li>
author: {{ post.author }}
</li>
<li ng-repeat-end>
category: {{ post.category }}
</li>
</ul>
</div>
<!-- Importing jQuery -->
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
</body>
</html>
Use ng-change or watch your model. Depending on your input you may want to use the debounce in ng-model-options.
var ListingApp = angular.module('ListingApp', []);
ListingApp.controller('PostCtrl', function($scope, $http) {
$scope.select = "";
var postJSON = "http://127.0.0.1:8000/posts/" + $scope.select;
console.log(postJSON);
function getPost() {
$http.get(postJSON)
.then(function(res) {
$scope.posts = res.data;
console.log($scope);
});
}
// option #1 with ng-change="change()"
$scope.change = function() {
getPost();
}
// option #2 with watch
$scope.$watch('select', function (val, old) {
console.log(val);
getPost();
});
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angular Test</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
</head>
<body ng-app="ListingApp">
<div ng-controller="PostCtrl">
<form name="dateForm">
<input type="text" id="dp" name="datepicker" ng-model-options="{ debounce: 500 }" ng-change="change()" ng-model="select" placeholder="Enter Date">
</form>
<span ng-bind="select" style="color: red">{{ dateForm.datepicker }}</span>
<ul>
<li ng-repeat-start="post in posts">
pk: {{ post.pk }}
</li>
<li>
author: {{ post.author }}
</li>
<li ng-repeat-end>
category: {{ post.category }}
</li>
</ul>
</div>
<!-- Importing jQuery -->
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
</body>
</html>

Change ng-model in datalist

I want to get the ID of selected option in datalist, using select it is easy but I dont know how to get the ID of the option name.
I made one code snippet at JSBIN
var app = angular.module('app', []);
app.controller('getLocalityId', function($scope) {
$scope.localityList = [{
name: "Rome",
id: 1
}, {
name: "London",
id: 2
}, {
name: "Paris",
id: 3
}];
$scope.fetchId = function(id) {
console.log(id);
};
});
HTML goes like this
<!DOCTYPE html>
<html ng-app='app'>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="col-lg-6" ng-controller="getLocalityId">
<label for="locality">Locality</label>
<input class="input form-control" placeholder="Search By Name" list="locality" ng-model="obj.id" ng-change="fetchId(obj.id)" />
<datalist id="locality" name="locality">
<select>
<option ng-repeat=" obj in localityList" value="{{ obj.name }}" selected-value="{{ obj.id }}">{{ obj.id }}</option>
</select>
</datalist>
</div>
</body>
</html>
Use ng-options in your case:
<select ng-model="currentID" ng-options="obj.id as obj.name for obj in localityList"></select>
Demo

Loading image at the time of onclick event using angularjs is not working

I want to add data at the time of onclick event. Need to load image at the time of onclick event, after a small time interval add data. But my image is continuously loading. Any body give any suggestion.
My code is:
<!DOCTYPE html>
<head>
<title>Learning AngularJS</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js" type="text/javascript"></script>
<script language="javascript">
function ContactController($scope) {
$scope.contacts = [];
$scope.items = [ ];
$scope.add = function() {
setTimeout(function() {
$scope.$apply(function() {
$scope.items[0].lateLoader = ' xxxx ';
});
}, 1000);
$scope.count=$scope.count+1;
$scope.contacts.push($scope.newcontact);
$scope.newcontact = "";
}
}
</script>
</head>
<body >
<div ng-app="" ng-controller="ContactController">
<p>{{items.lateLoader}}
<i ng-hide="items.lateLoader"><img src="Filling broken ring.gif"></i>
</p>
{{ contacts.length }}
Content:<input type="text" ng-model="newcontact" />
<button ng-click="add()">Add</button>
<ul style="list-style-type: none;">
<li ng-repeat="contact in contacts"> <input name="" type="checkbox" value="">{{ contact }}</li>
</ul>
</div>
</body>
</html>
In your example I found a lot of mistakes. The HTML tag is not defined at the top, wrong use of angularJs and Angular module is not created properly etc.
I fixed all the mistakes. I hope it can help you.
Plunkr link: http://plnkr.co/edit/no8WOHdEc9wc3dHzzITv?p=preview
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>Learning AngularJS</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>
<script >
angular.module("app",[]).controller('ContactController',['$scope',
function($scope) {
$scope.contacts = [];
$scope.items = [];
$scope.add = function() {
setTimeout(function() {
$scope.$apply(function() {
$scope.items.lateLoader = 'xxxx ';
});
}, 1000);
//$scope.count=$scope.count+1;
$scope.contacts.push($scope.newcontact);
$scope.newcontact = "";
}
}
]);
</script>
</head>
<body >
<div ng-controller="ContactController">
<p>{{items.lateLoader}}
<i ng-hide="items.lateLoader">
<img src="https://encrypted-tbn1.gstatic.com
/images?q=tbn:ANd9GcQTaHe0F0J39SXbiRF43pz2wtyfD6kypCMrLxhWPkq9EACNgwO0iaMbJFM">
</i>
</p>
{{contacts.length}}
Content:<input type="text" ng-model="newcontact" />
<button ng-click="add()">Add</button>
<ul style="list-style-type: none;">
<li ng-repeat="contact in contacts">
<input name="" type="checkbox" value="">{{ contact }}
</li>
</ul>
</div>
</body>
</html>
And for more detail of angularJs please visit these links:(https://angularjs.org/)
(http://www.w3schools.com/angular/default.asp)

tabset prevents table update

I have a working table with a filter:
http://plnkr.co/edit/WnV7OUplcLHVOKbeTrSw?p=preview
After wrapping it in a tabset it stops working (the filter is still updated):
http://plnkr.co/edit/8uw2UhSC59txms5X563L?p=preview
But it worked with old versions before I updated:
http://plnkr.co/edit/eJvYtpc3efkydsQy8caL?p=preview
(angular 1.0.8 + bootstrap 2.0.3 + angular-ui-bootstrap-0.6.0)
Why did it stop working after the update?
http://plnkr.co/edit/70sLuA4gltgxhwTE0XT1
HTML (Just modified the filter usage)
<!doctype html>
<html ng-app="plunker">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.js"></script>
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js"></script>
<script src="example.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div ng-controller="TabsDemoCtrl">
<tabset>
<tab heading="broken filter">
<form class="form-inline" role="form">
<select id="okFilterbox" ng-model="okFilterBool">
<option>nothing</option>
<option>all</option>
</select>
</form>
<p>{{okFilterBool}}</p>
<div>
<table>
<tr ng-repeat="item in items | filterItem:okFilterBool">
<td>{{item.name}}</td>
</tr>
</table>
</div>
</tab>
<tab heading="tab2">
</tab>
</div>
</body>
</html>
JS (Changed the way the filter is defined to make a new 'Angular' filter)
angular.module('plunker', ['ui.bootstrap']);
var TabsDemoCtrl = function ($scope) {
$scope.okFilterBool = "all";
$scope.items = [
{ name: 'A'},
{ name: 'B'},
{ name: 'C'}
];
};
angular.module("plunker").filter("filterItem", function(){
return function(array, okFilterBool){
if(okFilterBool == "all"){ return array; }
return [];
}
})

Resources