This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row" ng-controller="main"> | |
<ul> | |
<li ng-repeat="screen in screens" ng-class="{'active': screen == currentScreen}" | |
ng-click="setScreen($index)" | |
class="button">{{screen}}</li> | |
</ul> | |
</div> | |
<div ng-include="getScreenView()"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("sportsStoreAdmin") | |
.constant("authUrl", "http://localhost:5500/users/login") | |
.controller("authCtrl", function($scope, $http, $location, authUrl) { | |
$scope.authenticate = function (user, pass) { | |
$http.post(authUrl, { | |
username: user, | |
password: pass | |
}, { | |
withCredentials: true | |
}).success(function (data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("sportsStoreAdmin") | |
.constant("authUrl", "http://localhost:5500/users/login") | |
.controller("authCtrl", function($scope, $http, $location, authUrl) { | |
$scope.authenticate = function (user, pass) { | |
$http.post(authUrl, { | |
username: user, | |
password: pass | |
}, { | |
withCredentials: true | |
}).success(function (data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="sportsStoreAdmin"> | |
<head> | |
<title>Administration</title> | |
<script src="./static/js/angular.js"></script> | |
<script src="./static/js/ngmodules/angular-route.js"></script> | |
<script> | |
angular.module('sportsStoreAdmin', ['ngRoute']) | |
.config(function ($routeProvider) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gajus@web tap]$ node debug tapTrack.js | |
< debugger listening on port 5858 | |
connecting... ok | |
break in tapTrack.js:1 | |
1 var exec = require('child_process').exec, | |
2 util = require('util'), | |
3 io = require('socket.io')(3000), | |
debug> c | |
[..] | |
break in tapTrack.js:218 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var [..] | |
tw.stream('statuses/filter', {track: 'JavaScript,html5,angularjs,d3js,webdev'}, function (stream) { | |
stream.on('data', function (data) { | |
// big chunk of code that somewhere causes an error | |
}); | |
stream.on('error', function (data) { | |
debugger; | |
console.log('ERR', util.inspect(data)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular | |
.module('store') | |
.constant('productUrl', 'https://api.parse.com/1/classes/Product/') | |
.constant('orderUrl', 'https://api.parse.com/1/classes/Product/') | |
.controller('storeController', function ($scope, $http, $location, productUrl, orderUrl, cart) { | |
$scope.data = {}; | |
$http | |
.get(productUrl, { | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="place-order" class="row"> | |
<h2>Check out now</h2> | |
<p>Please enter your details, and we'll ship your goods right away!</p> | |
<form name="shippingForm" novalidate> | |
<h3>Ship to</h3> | |
<div class="form-group"> | |
<label>Name</label> | |
<input name="name" class="form-control" ng-model="data.shipping.name" required /> | |
<span class="error" ng-show="shippingForm.name.$error.required"> | |
Please enter a name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input name="street" class="form-control" ng-model="data.shipping.street" required /> | |
<span class="error" ng-show="shippingForm.street.$error.required"> | |
Please enter a street address | |
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input name="street" class="form-control" ng-model="data.shipping.street" required /> <span class="error" ng-show="shippingForm.street.$error.required"> | |
Please enter a street address | |
</span> |