Q4 widgets are currently built with jQuery's Widget Factory. To better understand this technology, you will re-implement common features found in Q4 Widgets using a starter app as an example.
To start, run npm i and then npm run start and on your browser open localhost:1234.
-
Pull Data from a Q4 API
Sample AJAX request for press releases
To see other APIs: Q4 Web API Docs
-
Render the
Headlineof each item pulled with mustachejs -
Create a
beforeRenderoption (Use the _trigger method shown in_destroy) HINT -> Check the scope ofthisin the ajax's.done -
Prepend "HEADLINE: " to all headlines with your
beforeRendermethodEx. "Cat Stuck on Bookshelf" to "HEADLINE: Cat Stuck on Bookshelf"
HINT -> You'll need three parameters for your _trigger method
-
Add a
limitoption where you can pass a number, "x", to limit items rendered to "x" items -
Allow user to toggle between showing the
limititems and all items by pressing the#clickMeButtonbutton
Styling is not expected.