• This indicates that if a user checked this checkbox, all the other checkboxes should also be checked.
  • Now what I want is if a particular user clicks on a checkbox on thead, all the checkboxes of td also be check and all the data of {{data.sonvinid}}

    should be stored in the array in my controller of angularjs.

  • Stack Overflow works best with JavaScript enabled
  • html angularjs checkbox html-table checked
  • var app = angular.module(‘app’,[]) // the app module app.controller(‘tableCtrl’,function($scope){ $scope.storeall = []; $scope.selectAllFlag = false; $scope.getdataintable = [ {sonvinid:1, date : “string” , venuename: “String Name” }, {sonvinid:2, date : “string” , venuename: “String Name” } ]; $scope.checkAllToggle = funciton(){ if(!$scope.selectAllFlag){ $scope.selectAll(); $scope.selectAllFlag = true; }else { $scope.deselectAll(); $scope.selectAllFlag = false; } }; $scope.selectAll = function(){ for (var i = 0 ; i < $ ; i++){ $scope.getdataintable[i].selected = true; $scope.storeall.push($[i].sonvinid); } }; $scope.deselectAll = function(){ for (var i = 0 ; i < $ ; i++){ $scope.getdataintable[i].

This is my table,
here I have this line(

Add All Invoice

Continue reading “html”


  • Is a more detailed, official description of what the ticker does and what you should (and should not) do when using the ticker.
  • length is the number of cells for the ticker
  • A copy of the demo code is inside the demo folder of this repository.
  • While nicely written and documented, this code was developed just for fun and is not tested (not in an automated fashion, at least).
  • When parameters are omitted default values from the MslTickerDefaults service are used.

An AngularJS component for tickers.
Continue reading “angular-ticker”

SOLVED Jersey-Spring-Hibernate Maven Project Setup

Jersey-Spring-Hibernate Maven Project Setup  #angularjs #reactjs

  • Customer; public interface CustomerService { String getStringTest(); Customer addCustomer(Customer customer); Customer updateCustomer(int id, Customer customer); Customer deleteCustomer(int id); Customer getCustomerById(int id); List getAllCustomer(); }
  • Autowired; @Path(“customers”) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public class CustomerResource { @Autowired CustomerService customerService; @GET public List getCustomers(){ return customerService.getAllCustomer(); } @GET @Path(“/{customerId}”) public Customer getCustomer(@PathParam(“customerId”) int id){ return customerService.getCustomerById(id); } @POST public Customer saveCustomer(Customer customer){ return customerService.addCustomer(customer); } @PUT @Path(“/{customerId}”) public Customer updateCustomer(@PathParam(“customerId”) int id, Customer customer){ return customerService.updateCustomer(id, customer)
  • Autowired; public class CustomerServiceImpl implements CustomerService { @Autowired private CustomerDao customerDao; @Override public String getStringTest() { return customerDao.getStringTest(); } @Override public Customer addCustomer(Customer customer) { return customerDao.addCustomer(customer); } @Override public Customer updateCustomer(int id, Customer customer) { return customerDao.updateCustomer(id, customer); } @Override public Customer deleteCustomer(int id) { return customerDao.deleteCustomer(id); } @Override public Customer getCustomerById(int id) { return customerDao.getCustomerById(id); } @Override public List getAllCustomer() { return customerDao.getAllCustomer(); } }
  • Autowired; public class CustomerDaoImpl implements CustomerDao { @Autowired SessionFactory sessionFactory; @Override public String getStringTest(){ String save = “Got it”; return save; } @Override public Customer addCustomer(Customer customer) { Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); try{; tx.commit(); return customer; }catch(Exception e){ tx.rollback(); return null; } } @Override public Customer updateCustomer(int id, Customer cust) { Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); try{ Customer customer = cust; customer.setId(id); session.update(customer); tx.commit(); return customer; }catch(Exception e){ tx.rollback(); return null
  • If you dont want to implement HIBERNATE, than you can omit this two files and in the applicationContext.xml file DELETE the bean with id’s “dataSource” and “sessionFactory”.

I am placing this request, because i couldn’t find any complete solution for JERSEY-SPRING-HIBERNATE setup and configuration. As i went through a lot to problem to find the solution. I thought of sharing my knowledge on creating basic setup, to give a kick start to your project.
You can also refer to my Github project Jersey-Spring-Hibernate-Project
Continue reading “SOLVED Jersey-Spring-Hibernate Maven Project Setup”

Don’t blame the framework: my experience with AngularJS and ReactJS

Don't blame the frameworks! #React vs #AngularJS - Choose your favorite poison.

  • what still counts the most for a maintainable project is the developers’ commitment to write good and organized code.’
  • Most things that I complained about in the beginning were either because I was forcing the React way of doing things to Angular code or because I wasn’t experienced enough.
  • React components get data from the store directly and change the state by calling actions: it’s simple, elegant and prevents you from becoming insane.
  • When you meet redux/react together, the data communication between components is crazy simple you never think.
  • For me the main benefit of using these frameworks in a team is that you are all sticking to the same conventions.

Here are the key impacts in the long run of choosing between AngularJS and ReactJS, from a seasoned developer’s perspective.
Continue reading “Don’t blame the framework: my experience with AngularJS and ReactJS”

Exchange Data Between Directive and Controller in AngularJS

  • To do this we will pass the variable as an attribute to the directive and use it to initialize the scope of the directive
  • This boils down to the fact that you need to access the scope of a Directive from a page Controller and access the scope of a page Controller from a Directive.
  • So in order to do this we need to emulate the ng-model behavior of an input in our Directive.
  • We can also remove the initialization of the internalCount variable in the directive.
  • The project required me to write a directive for a canvas, get the Base64 image data when a user draws on it, and make it available to the controller of the page which contains the directive.

In this Quick Tutorial we will look at How to Exchange Data Between Directive and Controller in AngularJS and bind the scopes to each other.
Continue reading “Exchange Data Between Directive and Controller in AngularJS”