JeffLL
JeffLL

Reputation: 1905

Testing AngularJS without having to build?

I'm a beginner to Angular, and am just starting some development.

I've taken the code from https://github.com/angular-app/angular-app, but am having to 'grunt build' every time to see my front end code changes on the browser. I've tried a variety of methods but am failing.

Is there a way to make changes, hit save, refresh your browser and see the changes, without having to build all the time?

Upvotes: 1

Views: 50

Answers (2)

user3614935
user3614935

Reputation: 1

Being a beginner, you might as well start from scratch.

This post by Leon Revill contains pretty much step-by-step guides on the basics, structure, MVC, data-binding, events and filters. Regarding your build dilemma, just use your favorite IDE. I prefer you use WebStorm or PHPStorm and install the AngularJS plugin. This way, all you need to do is just include the Angular CDN or a local copy of angular.js then you are good to go just by coding and refreshing the browser.

Cheers!

Upvotes: 0

Marc Kline
Marc Kline

Reputation: 9409

Try grunt watch instead of grunt build. The gruntfile for that project seems to indicate that it will run the build task for you automatically by watching targeted files (e.g. .js, .less, etc.) for changes and then firing.

Note that you have to let it continue to run while you work, although you can run it as a background task and either hide the output or log it to a file.

Upvotes: 1

Related Questions