I am a novice.I have a line of code like this that was written for me.
<a class="pull-right btn btn-primary" ng-click="addWidget()"><i class="glyphicon glyphicon-plus"></i> Add Widget</a>
Which works perfectly (it adds the widget which is a box element to the page). The function is defined in the controller DashboarCtrl like this
$scope.addWidget = function() {
$scope.dashboard.widgets.push({
name: "New Widget",
sizeX: 1,
sizeY: 1
});
};
How do invoke that same function in the console? I have tried angular.element('#DashboardCtrl').scope().addWidget();