Skip to content
Find file
d072d15
@itzsaga @Rafase282 @bugron
10 lines (8 sloc) 823 Bytes
>> yo angular-fullstack:route newpage 


Typing the above into your command-line will generate a newpage/ route for your app! It automatically generates all the necessary files within your /client/app/newpage folder, like your /client/app/main folder, with a newpage.controller.js, newpage.controller.spec.js, newpage.js, and newpage.html. These all pretty much behave like the ones in the main/ route. If you’re accessing the database in your newpage controller, you’ll want to add $http to the list of dependencies in newpage.controller.js the same way it’s included in main.controller.js:

angular.module('myApp')
  .controller('MainCtrl', function ($scope, $http) { ...

PREVIOUS NEXT

Something went wrong with that request. Please try again.