Sharing Top Content from the Angular-sphere.

Building an angular application · Rahul Bhola

  • // app/controllers/index.js var app = require(‘angular’).module(‘application’); app.controller(‘testController’,require(‘.
  • // app/app.js var angular = require(‘angular’); var ngRoute = require(‘angular-route’); var app = angular.module(‘application’, [ngRoute]); require(‘.
  • Put some actual content in angular app
  • Well first you need to start the build, Simply go to root folder of npm project and run grunt from terminal.
  • This is the file that was imported in app/app.js , we need to include all controllers .

Personal blogging website of Rahul Bhola

@theRahulBhola: Post on building #angularjs apps on #grunt with #browserify

so you can build apps that are easy to maintain in the long run and manageable.

globally here is what you do next. Install packages that you would be needing for live reload and building the apps.

are your usefull friends. Let us add build tools needed for them also. You can remove this step if you think you want to use html and css.


In last step we only added dependencied needed for the build, its time to install angular and ngRoute.

Note that i have not added them in dev-dependencies.

folder in my npm project.

and put in the following content.


I am just going to make a simple app that imports nav.

and would reload the page when you change anything in your code.

as you can see from the tree structure.

in that directory and go to that url in browser, where you can see the application running.

Building an angular application · Rahul Bhola