Advertisement
timonte

skrip2

Apr 19th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. var app = angular.module('siswa',[]);
  2. app.controller('siswaController',function($scope){
  3. var siswanya = [];
  4. $scope.murid = siswanya;
  5.  
  6. $scope.tambah = function(){
  7. alert('Data berhasil di tambah');
  8. $scope.murid.push(
  9. {
  10. no:$scope.no,
  11. nama:$scope.nama,
  12. alamat:$scope.alamat,
  13. tgl_lahir:$scope.class,
  14. foto:$scope.foto
  15. }
  16. );
  17. };
  18. });
  19.  
  20. app.controller('PanelController',function($scope){
  21. $scope.tab = 0;
  22. $scope.selectTab = function(setTab){
  23. $scope.tab = setTab;
  24. };
  25. $scope.isSelected = function(checkTab){
  26. return $scope.tab === checkTab;
  27. };
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement