Start tour
This commit is contained in:
Родитель
8e0abab1b5
Коммит
0e9c6070cd
47
README.md
47
README.md
|
@ -1,14 +1,41 @@
|
|||
## angular2-seed
|
||||
# Angular 2 in Visual Studio Sample Project
|
||||
|
||||
A simple starter project demonstrating the basic concepts of Angular 2.
|
||||
### Introduction
|
||||
|
||||
This repo is a sample project that shows off Angular 2 Language Service support in Visual Studio.
|
||||
|
||||
### Usage
|
||||
- Clone or fork this repository
|
||||
- Make sure you have [node.js](https://nodejs.org/) installed version 5+
|
||||
- Make sure you have NPM installed version 3+
|
||||
- `WINDOWS ONLY` run `npm install -g webpack webpack-dev-server typescript` to install global dependencies
|
||||
- run `npm install` to install dependencies
|
||||
- run `npm start` to fire up dev server
|
||||
- open browser to [`http://localhost:3000`](http://localhost:3000)
|
||||
- if you want to use other port, open `package.json` file, then change port in `--port 3000` script
|
||||
|
||||
**Prerequisite:** Visual Studio 2017 Update 5 or later
|
||||
|
||||
To use this project:
|
||||
* `git clone https://github.com/Microsoft/angular2-in-visual-studio.git`
|
||||
* `cd angular2-in-visual-studio`
|
||||
* `npm install`
|
||||
* In Visual Studio, "Open Folder" (Ctrl-Alt-Shift-O or File -> Open -> Folder...)
|
||||
* Select the cloned directory (*not* `src`)
|
||||
|
||||
# Tour
|
||||
|
||||
Once the project is opened, you can observe these new behaviors
|
||||
|
||||
### Semantic Warnings
|
||||
|
||||
Open `src\app\app.component.ts`. The Angular2 language service warns you that the `InlineComponent` class doesn't belong to a module:
|
||||
|
||||
![Error about missing module](tour_images/no_module_error.png)
|
||||
|
||||
|
||||
### Inline Templates
|
||||
|
||||
### .ngml Files
|
||||
|
||||
### Errors
|
||||
|
||||
### Completions
|
||||
|
||||
### Navigation
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Angular 2 Seed
|
||||
</h3>
|
||||
<nav>
|
||||
<a [routerLink]="['/']" title={{pro1.toLowCase}}>
|
||||
<a [routerLink]="['/']" title={{prop1}}>
|
||||
Home
|
||||
</a>
|
||||
|
|
||||
|
|
|
@ -2,7 +2,7 @@ import {Component} from '@angular/core';
|
|||
|
||||
@Component({
|
||||
selector: 'app',
|
||||
template: '<span>{{prop1.tolower}}</spa>',
|
||||
template: '<span>{{prop1.toLower()}}</spa>',
|
||||
})
|
||||
export class InlineComponent {
|
||||
prop1 = 'hello';
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 11 KiB |
Загрузка…
Ссылка в новой задаче