Tutorial - changing order and deleting from phone list

46 views
Skip to first unread message

JJ Hesse

unread,
Jun 25, 2014, 12:56:06 PM6/25/14
to ang...@googlegroups.com
Hello,

This is my first time programming with AngularJS so please forgive me. This issue probably an obvious answer.

I have been trying to modify the phone list. I simply went into phones.json and changed the order of the some of the phone items. Then I deleted most items from the array so I would only have five phones appear.

Then in git bash I write the command $npm start and go to localhost8000/app/index.hmtl 
But nothing changes! For some reason all the phone records still appear and the order was not changed. It even lets me view some items I deleted.

Update: I have deleted and reinstalled the angular-phonecat-master many times. Tried many things still with no success. I used both chrome and IE and both browsers have different errors and don't update properly.

Can someone please help?
Thanks

JJ Hesse

unread,
Jun 26, 2014, 1:43:13 AM6/26/14
to ang...@googlegroups.com
for example: 

in phones.json I deleted all but two phones:

[
    {
        "age": 0, 
        "id": "motorola-xoom-with-wi-fi", 
        "imageUrl": "img/phones/motorola-xoom-with-wi-fi.0.jpg", 
        "name": "Motorola XOOM\u2122 with Wi-Fi", 
        "snippet": "The Next, Next Generation\r\n\r\nExperience the future with Motorola XOOM with Wi-Fi, the world's first                         tablet powered by Android 3.0 (Honeycomb)."
    }, 
    {
        "age": 1, 
        "id": "motorola-xoom", 
        "imageUrl": "img/phones/motorola-xoom.0.jpg", 
        "name": "MOTOROLA XOOM\u2122", 
        "snippet": "The Next, Next Generation\n\nExperience the future with MOTOROLA XOOM, the world's first tablet powered by                       Android 3.0 (Honeycomb)."
    }
]

I run npm install, then npm start, then go to localhost8000/app/index.html --- and it only shows two phones!


then in phones.json I add another phone to the list:

[

    {

        "age": 0, 

        "id": "motorola-xoom-with-wi-fi", 

        "imageUrl": "img/phones/motorola-xoom-with-wi-fi.0.jpg", 

        "name": "Motorola XOOM\u2122 with Wi-Fi", 

        "snippet": "The Next, Next Generation\r\n\r\nExperience the future with Motorola XOOM with Wi-Fi, the world's first tablet powered by Android 3.0 (Honeycomb)."

    }, 

    {

        "age": 1, 

        "id": "motorola-xoom", 

        "imageUrl": "img/phones/motorola-xoom.0.jpg", 

        "name": "MOTOROLA XOOM\u2122", 

        "snippet": "The Next, Next Generation\n\nExperience the future with MOTOROLA XOOM, the world's first tablet powered by Android 3.0 (Honeycomb)."

    },

{

        "age": 2, 

        "carrier": "AT&T", 

        "id": "motorola-atrix-4g", 

        "imageUrl": "img/phones/motorola-atrix-4g.0.jpg", 

        "name": "MOTOROLA ATRIX\u2122 4G", 

        "snippet": "MOTOROLA ATRIX 4G the world's most powerful smartphone."

    } 

]

So now there should be 3 phones when I run npm start

However it still shows only 2 phones:


Can someone please explain why the app is not updating the phones. I've tried so many things. 

Thank you very much.



Sander Elias

unread,
Jun 26, 2014, 2:19:24 AM6/26/14
to ang...@googlegroups.com
Hi Jesse,

First tough, browser cache!. did you try cleaning out the cache of your browser?
(not the only probable cause, but the most likely one!)


Regards
Sander

JJ Hesse

unread,
Jun 26, 2014, 5:00:55 AM6/26/14
to ang...@googlegroups.com
It works now!  cache cleared!

Thanks Sander
Reply all
Reply to author
Forward
0 new messages