shyamseshadri / angularjs-up-and-running

All the source code for the AngularJS Up & Running Book for O'Reilly
MIT License
466 stars 438 forks source link

Chapter11: directive-broken-reference #29

Open dongbohu opened 7 years ago

dongbohu commented 7 years ago

I noticed that the source code of chapter11/directive-broken-reference/index.html here is a little more complex than the code on the book (pages 186-187). It has an extra List of Stocks Repeating Manually section:

    <h3>List of Stocks Repeating Manually</h3>
    <div stock-widget stock-data="mainCtrl.stocks[0]">
    </div>
    <div stock-widget stock-data="mainCtrl.stocks[1]">
    </div>

I am a little confused why when the button in this section is clicked, it will update both List of Stocks Using Repeaters and List of Stocks Repeating Manually. (The book explained why when we click the button in List of Stocks Using Repeaters, the text in List of Stocks Repeating Manually wouldn't be updated.)