1

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?

2
  • sure,just dont use grunt at all during development. Commented May 8, 2014 at 5:10
  • @mpm I would, but the server code is hardcoded to point to the 'dist' directory. I tried having it point to the source code, but that would break may app. Commented May 8, 2014 at 5:18

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

My pleasure. Grunt is worth a closer look, as is Yeoman (which packages Grunt with other tools that make life easier).
I'm coming from a j2ee background, and took a lot of things for granted. Figuring out which tools are recommended to do what is taking some time. Thanks!
0

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!

1 Comment

Thank you, I'm reading it right now! For now I'm using eclipse although I do like sublime. Is WebStorm the go to IDE for Angular?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.