Reputation: 435
I am evaluating web Storm 7.0. I am using the default localhost:63342. I am using my default browser the latest chrome.
Problem: While in debug mode, the Console tab (to the right of debugger tab) has a window where the cursor blinks but editing is disabled. Nothing is ever displayed regardless of whether I step into or let the program run.
I need a simple guide on how to use the web Storm console. The line console.log("adding item to shopping cart"); does not seem to execute.
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Shopping List AngularJS Tutorial</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"> </script>
<!--<script src="js/appctrl.js"></script>-->
</head>
<body>
<h1>Shopping List</h1>
<div ng-controller="AppCtrl">
<p>Using a controller: data.message={{data.message}}!</p>
</div>
<h1>Shopping List</h1>
<form ng-submit="addItem()">
<input type="text" placeholder="item to add" ng-model="itemToAdd" />
<input type="submit" value="add">
</form>
<br>
<hr>
</div>
var myApp = angular.module('myApp', []);
function AppCtrl($scope) {
$scope.data={message:'I am a java object data with this message in MyCtrl'};
$scope.addItem = function() {
console.log("adding item to shopping cart");
};
}
For complete code google:learnwebtutorials angularjs-tutorial-seriesBatarang.I am embarrased to ask such a simple question but have been stuck for days now.
EDIT: This works:
<button onclick="tryConsole()">Try it</button>
<script type = "text/javascript">
function tryConsole() {
console.log("hello world");
}
</script>
Apparently the problem may be within the angular tutorial code :-(
Upvotes: 1
Views: 1499
Reputation: 93728
Upvotes: 2