diff --git a/docs/app/src/tutorials.js b/docs/app/src/tutorials.js index 7f86546f9..4b3c43c7d 100644 --- a/docs/app/src/tutorials.js +++ b/docs/app/src/tutorials.js @@ -31,28 +31,18 @@ angular.module('tutorials', []) .directive('docTutorialReset', function() { - function tab(name, command, id, step) { - return '' + - '
\n' + - '
    \n' + - '
  1. Reset the workspace to step ' + step + '.

    ' + - '
    ' + command + '
  2. \n' + - '
  3. Refresh your browser or check the app out on Angular\'s server.

  4. \n' + - '
\n' + - '
\n'; - } - return { - compile: function(element, attrs) { - var step = attrs.docTutorialReset; - element.html( - '
' + - '

Workspace Reset Instructions ➤

' + - '
\n' + - '
\n' + - tab('Git on Mac/Linux', 'git checkout -f step-' + step, 'gitUnix', step) + - tab('Git on Windows', 'git checkout -f step-' + step, 'gitWin', step) + - '
\n'); - } + scope: { + 'step': '@docTutorialReset' + }, + template: + '
' + + '

Workspace Reset Instructions ➤

' + + '
\n' + + '
\n' + + '
  • Reset the workspace to step {{step}}.

    ' + + '
    git checkout -f step-{{step}}
  • \n' + + '
  • Refresh your browser or check the app out on Angular\'s server.

  • \n' + + '
    \n' }; }); diff --git a/docs/content/tutorial/step_00.ngdoc b/docs/content/tutorial/step_00.ngdoc index 1503622f5..e06ff40a4 100644 --- a/docs/content/tutorial/step_00.ngdoc +++ b/docs/content/tutorial/step_00.ngdoc @@ -11,65 +11,27 @@ with the most important source code files, learn how to start the development se angular-seed, and run the application in the browser. -
    -
    -
      -
    1. In angular-phonecat directory, run this command:

      -
      git checkout -f step-0
      -

      This resets your workspace to step 0 of the tutorial app.

      -

      You must repeat this for every future step in the tutorial and change the number to - the number of the step you are on. This will cause any changes you made within - your working directory to be lost.

    2. +In `angular-phonecat` directory, run this command: -
    3. To see the app running in a browser, do one of the following: -
        -
      • For node.js users: -
          -
        1. In a separate terminal tab or window, run npm start to start the web server.
        2. -
        3. Open a browser window for the app and navigate to `http://localhost:8000/app/index.html`
        4. -
        -
      • -
      • For other http servers: -
          -
        1. Configure the server to serve the files in the angular-phonecat directory.
        2. -
        3. Navigate in your browser to http://localhost:[port-number]/[context-path]/app/index.html.
        4. -
        -
      • -
      -
    4. -
    -
    +``` +git checkout -f step-0 +``` -
    -
      -
    1. Open Git bash and run this command (in angular-phonecat directory):

      -
      git checkout -f step-0
      -

      This resets your workspace to step 0 of the tutorial app.

      -

      You must repeat this for every future step in the tutorial and change the number to - the number of the step you are on. This will cause any changes you made within - your working directory to be lost.

    2. -
    3. To see the app running in a browser, do one of the following: -
        -
      • For node.js users: -
          -
        1. In a separate terminal tab or window, run node scripts\web-server.js to start the web server.
        2. -
        3. Open a browser window for the app and navigate to `http://localhost:8000/app/index.html`
        4. -
        -
      • -
      • For other http servers: -
          -
        1. Configure the server to serve the files in the angular-phonecat directory.
        2. -
        3. Navigate in your browser to http://localhost:[port-number]/[context-path]/app/index.html.
        4. -
        -
      • -
      -
    4. -
    -
    -
    +This resets your workspace to step 0 of the tutorial app. +You must repeat this for every future step in the tutorial and change the number to the number of +the step you are on. This will cause any changes you made within your working directory to be lost. + +If you haven't already done so you need to install the dependencies by running: + +``` +npm install +``` + +To see the app running in a browser, open a *separate* terminal/command line tab or window, then +run `npm start` to start the web server. Now, open a browser window for the app and navigate to +`http://localhost:8000/app/index.html` You can now see the page in your browser. It's not very exciting, but that's OK. @@ -114,7 +76,7 @@ __`app/index.html`:__ * AngularJS script tag: - +