Good day to all .... there is a standard Angular controller

var phonecatApp = angular.module('phonecatApp', []); phonecatApp.controller('PhoneListCtrl', function($scope){ $scope.name = ""; $scope.mod = ""; $scope.cena = ""; $scope.maysters = []; $scope.addToList = function() { this.maysters.push({ name: this.name, mod: this.mod, cena: this.cena }) } }); 

The mayster array contains an archive of orders ... the AddToList function adds the order to the archive

1. How can I let the administrator add a new array with the archive and a function to it (without using the code, via input)?

2. How to display the created array on the screen?

  • Questions are not very clear. Explain, please, what does it mean to dynamically add a new array with an archive and a function to it ? - Stepan Kasyanenko
  • @stepan via Inmut add an element to the array and then post it on the screen with an on-click event or the ng-click directive ... can you tell me where you can search for information on this topic, because I can't correctly put a question in Google - James Sorensen
  • oftopik: you answer in skype) ontopik: Search in google for directives ng-click and ng-repeat . - Stepan Kasyanenko

0