Tags

Node.js

Quickly Generate Test Data Using Angular

I needed to generate 10,000 lines of some random test data, that still needed to make sense. Usually I would use some db technique, but I thought, being a front-end developer, why not use the browser. It truly demonstrates the power of using javascript libs. This is how I set it up.

Today you will see no screenshots because somehow my instance of WordPress gives a jQuery error when accessing my Media library. This is no real blocker, as I usually only display code with highlighting. For now, plain text just have to do.

Contents

  • Set up Angular and Bootstrap
  • Add UI Grid
  • Add the module
  • Add the controller
  • Add the factory
  • Conclusion

Set Up Angular and Bootstrap

The quickest way to set up Angular is to use CDN links, not having to download any code, just one html file with this contents:    


Add UI Grid

Just the same as adding angular and bootstrap, you can add the ui-grid, that will show the results in a table.


 

Add the module

Angular modules are somehow called ‘app’. We need to initiate the module by using the angular.module statement. No need to create variables, just this line will do. Not that there’s no semicolumn at the end. This will allow chaining.



    
    

Angular Project

 

Thanks to Praveen Kumar for being our guest writer this week.

Who Are Ronald James?

We are a leading niche digital & tech recruitment specialist for the North East of England. We Specialise in the acquisition of high-performing technology talent across a variety of IT sectors including Digital & Technology Software Development.

Our ultimate goal is to make a positive impact on every client and candidate we serve - from the initial call and introduction, right up to the final delivery, we want our clients and candidates to feel they have had a beneficial and productive experience.

Contact our Team

If you’re looking to start your journey in sourcing talent or find your dream job, you’ll need a passionate, motivated team of experts to guide you. Check out our Jobs page for open vacancies. If interested, contact us or call 0191 300 6501 for a quick chat with our team.

Let's be Friends!

Follow us on our blog, FacebookLinkedInTwitter or Instagram to follow industry news, events, success stories and new blogs releases.

 

Back to Blog

</Follow Us>