I have looked at several questions on this already and for the life of me, I can't figure this one out. I'm not using ng-route and I'm certain its getting the file I'm trying to learn some basic js, so I have been doing a couple of tutorials. One is throwing this error:
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.10/$injector/modulerr?p0=gemStore&p1=Error%…gleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.3.10%2Fangular.min.js%3A17%3A350)
EDITED
Here's my code: HTML
//index.html <!doctype html> <html ng-app="gemStore"> <head> <title>myTestApp</title> <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script> <script type="text/javascript" src="app.js" /> </head> <body ng-controller="StoreController as store"> <div ng-repeat="product in store.products" ng-hide="store.product.soldOut"> <h1>{{store.product.name}}</h1> <h1>{{store.product.price}}</h1> <h1>{{store.product.desc}}</h1> <button ng-show="store.product.canPurchase">Add To Cart</button> </div> </body> </html> Javascript:
var app = angular.module('gemStore', []); app.controller('StoreController', function() { this.products = gems; }); var gems = [ { name: 'Gem', price: 2.95, desc: '. . .', canPurchase = false, soldOut = true, }, { name: 'Gem2', price: 3.95, desc: '. . .', canPurchase = false, soldOut = true, } ]