Created
November 22, 2013 17:07
-
-
Save spacerockzero/7603382 to your computer and use it in GitHub Desktop.
Angular new app template
This file contains hidden or 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
'use strict'; | |
var app = angular.module("myApp", ['ngRoute']); | |
app.config(['$routeProvider', function($routeProvider) { | |
$routeProvider.when('/', { | |
templateUrl: 'partials/home.html', | |
controller: 'HomeCtrl' | |
}); | |
$routeProvider.when('/services', { | |
templateUrl: 'partials/services.html', | |
controller: 'ServicesCtrl' | |
}); | |
$routeProvider.when('/clients', { | |
templateUrl: 'partials/clients.html', | |
controller: 'ClientsCtrl' | |
}); | |
}]); | |
app.controller('HomeCtrl', ['$scope', function($scope){ | |
$scope.message = 'Welcome to Inspire'; | |
}]); | |
app.controller('ServicesCtrl', ['$scope', function($scope) { | |
$scope.message = 'Everyone come and see how good I look!'; | |
}]); | |
app.controller('ClientsCtrl', ['$scope', function($scope) { | |
$scope.message = 'These are clients'; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment