I want to inject the same variables with different values multiples times to the same controller. This is what I tried. What is a way to get different values in each call?>
Try this... As @tymeJV pointed out you need to use semicolons to separate the variable names in the HTML. You also need to use the $scope
to reference the variables in the controller.
html
javascript
var app = angular.module("myApp", []);
app.controller("myCtrl", ["$scope",function($scope) {
console.log($scope.test);
console.log($scope.test1);
}]);