I have to use this jsfiddle code in my application, as I am going to enter all the code in one page company.html, it shows me only this instead of this
. Could anybody please explain me why is this problem occuring, i think the problem is with this
var app = angular.module('angularjs-starter', []);
app.controller('MainCtrl', function($scope) {
$scope.choices = [{id: 'choice1'}, {id: 'choice2'}];
$scope.addNewChoice = function() {
var newItemNo = $scope.choices.length+1;
$scope.choices.push({'id':'choice'+newItemNo});
};
$scope.removeChoice = function() {
var lastItem = $scope.choices.length-1;
$scope.choices.splice(lastItem);
};
});
regarding to module name or kind of that.
I am getting this error in browser console: