import { Component, OnInit } from '@angular/core';
import {FormsModule} from '@angular/forms';


@Component({
  selector: 'app-fees-master',
  templateUrl: './fees-master.component.html',
  styleUrls: ['./fees-master.component.scss']
})
export class FeesMasterComponent implements OnInit {
  model: any = {};
  a;
  msg = 'Hello world';
  constructor() { }

  ngOnInit() {

  }
  onSubmit() {
  
   alert('SUCCESS!! :-)\n\n' + JSON.stringify(this.model))
  // alert('SUCCESS!! :-)\n\n' + JSON.stringify(this.model.Feesdes))
  // alert('SUCCESS!! :-)\n\n' + JSON.stringify(this.model.active))

   var agesArr = [{a:1}, {a:2}, {a:3},
    {a:4}];
    
    var roots = agesArr.filter(function(ages){
      return ages.a>2;
   
     
    });
    function root()
    {
    var agAr=[1,2,3,4];
    var abc = agAr.map(Math.sqrt);
    return abc; 
     }
     





    var playersArr = [
    {name: 'Jason', footedness: 'left', position: 'forward'},
    {name: 'Blake', footedness: 'right', position: 'defense'},
    {name: 'Philip', footedness: 'right', position: 'goalie'},
    {name: 'Logan', footedness: 'left', position: 'defense'},
    {name: 'Will', footedness: 'right', position: 'forward'}
];
var leftFootArr = playersArr.filter(function(player){
    return player.footedness === 'right';
});
console.log(leftFootArr);
  
   
  
  }
  
}
