Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(quickstart): QuickStart reboot #2762

Merged
merged 3 commits into from
Nov 22, 2016

Conversation

wardbell
Copy link
Contributor

@wardbell wardbell commented Nov 6, 2016

A complete overhaul of the QuickStart and setup process ... an overhaul intended to make discovering Angular quicker, easier, less frightening and more pleasant.

This PR was merged and then reversed for further review. Successor PR is #2854

Todos:

  • Complete draft of "Setup Anatomy" for SystemJS (Ward)
  • Add "Setup ..." for Web Pack (need @Foxandxss help)
  • Full review for tone, typos, coverage, and substance.
  • Approval from Angular team leads.

@wardbell wardbell self-assigned this Nov 6, 2016
@wardbell wardbell force-pushed the quickstart-reboot branch 2 times, most recently from 149a496 to cd73078 Compare November 6, 2016 20:33
template: `<h1>Hello Angular!</h1>`,
selector: 'my-app'
})
export class AppComponent { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the one hand, exporting this here for a hello world can be confusing but on the other hand, removing it could confuse users as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went back and forth on this. I decided to keep export even though not needed rather than have this be a difference later or make you wonder why AppModule is exported and AppComponent is not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is extra, and if you truly want minimal, then I think removing the export is smart. Otherwise, the the educated eye it will make them look for where it is used. This is not a tool to build on, right? If it was, we would make multiple files in the first place. I think, rather, that we want a simple starting point to explain A2 at the most simplest level. In that case, I think removing export works. Thoughts?

Copy link
Contributor

@johnpapa johnpapa Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two votes to remove export on component class to my one; you both win.

Copy link
Member

@Foxandxss Foxandxss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely brilliant Ward. That Setup guide is a masterpiece.

On the other hand, I feel like the quickstart is too short. Shortstart? :P


- var _package_and_config_files = _docsFor == 'dart' ? 'pubspec.yaml' : 'configuration files'
The `AppModule` tells Angular<br>
&nbsp;&nbsp;***what you need*** &mdash; _imports_ the `BrowserModule` to display the application in the browser.<br>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to display. What do you think about "To use the application in the browser".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree needed better verb. I went with "run" instead of "display" or "use"

As much fun as this is
* you can't ship your app in plunker.
* development in the browser is slow.
* you aren't always online
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing dot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed all periods from these bullets for consistency (rather than make them all sentences.)

* you aren't always online
* the type support, refactoring, and code completion only work in your local IDE.

# Setup a local develoment environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

development

.l-sub-section
:marked
### Next step
[The _Tour of Heroes_ tutorial](../tutorial)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We trigger a "next step" automagically for the basic guides so this will trigger two next steps. No bueno.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrote:

.l-sub-section
  :marked
    ### Next step
    [The _Tour of Heroes_ tutorial](../tutorial)

The forced magic generated "next step" bothers me. I want to say what the next step is. Can't control it now. Would have modified the magic but didn't have time. This was a placeholder. But I think I'll delete it for now

@wardbell
Copy link
Contributor Author

wardbell commented Nov 7, 2016

Thanks @Foxandxss. Will fix typos. I feel QuickStart is appropriately brief but let's find out what others think

* you aren't always online
* the type support, refactoring, and code completion only work in your local IDE.

# Setup a local develoment environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will all devs know what an IDE is?

1. [install the `npm` packages](#install-node "What if you don't have node?")
1. run it

## What's different?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought at first this was telling me what's different between the zip and the git. May want to be more specific about what this is referring to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it

:marked
## Prerequisites: _node_ and _npm_

Node.js and npm are essential tools in modern web development. Angular developers need them too.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say why we need node and npm in one sentence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In two short sentences, yes

template: `<h1>Hello Angular!</h1>`,
selector: 'my-app'
})
export class AppComponent { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is extra, and if you truly want minimal, then I think removing the export is smart. Otherwise, the the educated eye it will make them look for where it is used. This is not a tool to build on, right? If it was, we would make multiple files in the first place. I think, rather, that we want a simple starting point to explain A2 at the most simplest level. In that case, I think removing export works. Thoughts?

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app.module';
// #enddocregion import

const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not platformBrowserDynamic().bootstrapModule(AppModule); ?

less code, simpler.

Copy link
Contributor Author

@wardbell wardbell Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed platformBrowserDynamic().boot..
Dropped "!". Now just "Hello Angular"

template: `<h1>Hello Angular!</h1>`,
selector: 'my-app'
})
export class AppComponent { }
Copy link
Contributor

@johnpapa johnpapa Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@wardbell wardbell force-pushed the quickstart-reboot branch 3 times, most recently from a6b2365 to ea164e6 Compare November 11, 2016 04:03
@filipesilva
Copy link
Contributor

I like it. Was quite surprised at how small the new quickstart and the new setup chapter are combined.

@naomiblack
Copy link
Contributor

This is on hold until @IgorMinar can approve the code / workflow. It would be nice to post soon but not urgent.

@wardbell wardbell force-pushed the quickstart-reboot branch 2 times, most recently from 7fe1345 to 371fc82 Compare November 18, 2016 22:43
@wardbell wardbell force-pushed the quickstart-reboot branch 2 times, most recently from 1ad3b42 to 80a811a Compare November 19, 2016 03:21
wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Nov 19, 2016
…ule and boots it.

For specific plunkers, e.g. "QuickStart (reboot edition)" PR angular#2762, that shouldn't have AppModule or main.ts
Rescinds the automatic bootstrapping and exclusion of `main.ts` in angular#2786 and angular#2756
Only autoBootstraps when `window.autoBootstrap === true`.
<body>
<my-app>Loading...</my-app>
<my-app><!-- content managed by Angular --></my-app>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content of the root component element is actually completely ignored, and so in that sense it would be more accurate to write "content is not managed by Angular" :). Maybe the intent was to write that the content generated by the Angular app gets inserted in the DOM below the root component element? So the remark could be changed to:

<my-app><!-- app generated content gets inserted here --></my-app>

Or

<my-app><!-- app generated content will appear here --></my-app>

If this is updated, then index.1.html will need to be updated (actually, it would be nice to be able to get rid of index.1.html altogether).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done.

wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Nov 20, 2016
wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Nov 20, 2016
wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Nov 21, 2016
## Setup a local development environment
The <live-example name=quickstart>QuickStart live-coding</live-example> example is an Angular _playground_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think that quotes are needed, i.e.: <live-example name="quickstart">.

@wardbell wardbell force-pushed the quickstart-reboot branch 6 times, most recently from 72e3e92 to 8fd0235 Compare November 21, 2016 07:27
wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Nov 21, 2016
@wardbell wardbell force-pushed the quickstart-reboot branch 2 times, most recently from 4f227c4 to ef05be8 Compare November 21, 2016 20:15
@wardbell wardbell force-pushed the quickstart-reboot branch 2 times, most recently from ab6b667 to 01c62b6 Compare November 22, 2016 01:09
@wardbell wardbell merged commit 8ccc33e into angular:master Nov 22, 2016
@wardbell wardbell deleted the quickstart-reboot branch November 22, 2016 01:13
wardbell added a commit that referenced this pull request Nov 22, 2016
@wardbell wardbell restored the quickstart-reboot branch November 22, 2016 01:29
@wardbell wardbell changed the title [WIP] docs(quickstart): QuickStart reboot docs(quickstart): QuickStart reboot Nov 22, 2016
wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Nov 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants