Please clone this repo into your github.com account, and then when you are done with the exercise, open a pull request with your changes back into this repo.
- Make sure you have NodeJS installed, https://nodejs.org/en/download/ and then install the dependencies from within the directory
npm install
<-- from within this repo directory on your computer
- Install Bower
npm install -g bower
- Get Angular and the other libraries added locally
bower install
- Run the local web server, which is pre-configured in package.json within
scripts
npm run dev
Once you have the app running in your browser, you're ready to start.
The HTML is divided into 2 sections, each using the same controller definition:
<div class="app" ng-app="interviewExercise" ng-controller="genericController">
<h1>I am the main set of items</h1>
<ul>...</ul>
<div ng-controller="genericController">
<h2>I'm a 2nd instance of the controller</h2>
<ul>...</ul>
</div>
</div>
Controller.js
is already hooked up to ng-app and is the default controller- Can you get the controller to load data from
items.json
and populate the scope? - Can you make it so that the data is only loaded once the user clicks the
<a>
link on the page (in index.html) - Can you get the controller's
memoryCleanup
method to get called when the scope is destroyed?
This should only require editing index.html at this point