Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated version

  • Loading branch information...
commit 7767f70d093513dfd1c61ce5e40273aa1c1f3817 1 parent d6ef185
@twilson63 authored
View
8 package.json
@@ -1,6 +1,6 @@
{
"name": "ng",
- "version": "0.0.2",
+ "version": "0.0.3",
"description": "AngularJS Command-Line Tool",
"main": "index.js",
"scripts": {
@@ -22,10 +22,10 @@
"ng": "./bin/ng"
},
"generator": {
- "bootstrap": "//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.no-icons.min.css",
+ "bootstrap": "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap.no-icons.min.css",
"fontawesome": "//netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css",
- "jquery": "//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js",
- "bootstrapjs": "//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/js/bootstrap.min.js",
+ "jquery": "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js",
+ "bootstrapjs": "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js",
"angularjs": "//ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"
},
"devDependencies": {},
View
18 template/app/scripts/app.js.ejs
@@ -1,6 +1,12 @@
-var app = angular.module('<%= name %>', [])
- .config(function($routeProvider){
- $routeProvider
- .when('/', { controller: 'Index', templateUrl: '/app/views/index.html' });
- });
-
+var routes = [
+// START ROUTES
+{ map: '/', controller: 'Index', templateUrl: '/app/views/index.html' }
+// STOP ROUTES
+];
+
+var app = angular.module('ngApp', [])
+ .config(['$routeProvider', function($routeProvider) {
+ routes.forEach(function(route){
+ $routeProvider.when(route.map, route);
+ })
+ }]);
View
2  template/index.html.ejs
@@ -7,7 +7,7 @@
<link href="<%= fontawesome %>" rel="stylesheet">
</head>
<body>
- <div ng-app="<%= name %>" class="container">
+ <div ng-app="ngApp" class="container">
<ng-view></ng-view>
</div>
<script src="<%= jquery %>"></script>
Please sign in to comment.
Something went wrong with that request. Please try again.