Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


<!-- load bootstrap and our stylesheet -->
	<link rel="stylesheet" href=""> <!-- \ lets you continue url on next line -->
		body {padding-top: 50px;}

	<!-- load angular and our custom application -->
	<script src=""></script>
<!-- declare our angular application and angular controller -->
<body class="container" ng-app="firstApp" ng-controller="mainController as main">

<div class="jumbotron">
	<!-- display the list using ng-repeat -->
	<h2>This is my list</h2>
	<table class="table table-bordered">
        	<tr ng-repeat="item in main.shoppingList">
        		<td>{{ }}</td>
        		<td>{{ item.brand }}</td>
        		<td>{{ item.quantity }}</td>

	<!-- form to add grocery to the list -->
	<form class="form-inline" ng-submit="main.addItem()">
		<input type="text" class="form-control" placeholder="Peanut Butter" ng-model="">
		<input type="text" class="form-control" placeholder="Skippy" ng-model="main.shoppingData.brand">
		<input type="number" class="form-control" placeholder="2" ng-model="main.shoppingData.quantity">

		<button type="submit" class="btn btn-success">Add</button> 




                angular.module('firstApp', [])

//information in this controller will be bound to itself using vm
.controller('mainController', function(){

	//It is a good practice to bind the parent this in the controller to vm
	//bind this to vm (view-model)
	var vm = this;

	//define variables and objects on this
	//this lets them be available to our views

	//define a list of items
	vm.shoppingList = [
	{name: 'Yogurt', brand: 'Chobani', quantity: 7},
	{name: 'Orange Juice', brand: 'Tropicana', quantity: 6},
	{name: 'Soy Milk', brand: 'Silk', quantity: 5},
	{name: 'Strawberry Jam', brand: 'Smuckers', quantity: 4}

	//information that comes from our form
	vm.shoppingData = {};

	vm.addItem = function(){

		//add a grocery to the list
			brand: vm.shoppingData.brand,
			quantity: vm.shoppingData.quantity

		//after our grocery has been added, clean the form
		vm.shoppingData = {};