-
-
Save Wandersonjack/dac15ca130ad89ec23b59a9c8b276228 to your computer and use it in GitHub Desktop.
Quickstart with Angular 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Angular 2 - School of Net</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="node_modules/core-js/client/shim.min.js"></script> | |
<script src="node_modules/zone.js/dist/zone.js"></script> | |
<script src="node_modules/reflect-metadata/Reflect.js"></script> | |
<script src="node_modules/systemjs/dist/system.src.js"></script> | |
<script src="systemjs.config.js"></script> | |
<script> | |
System.import('app').catch(function(err){ console.error(err); }); | |
</script> | |
</head> | |
<body> | |
<my-app>Loading...</my-app> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "angular2-quickstart", | |
"version": "1.0.0", | |
"scripts": { | |
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", | |
"lite": "lite-server", | |
"postinstall": "typings install", | |
"tsc": "tsc", | |
"tsc:w": "tsc -w", | |
"typings": "typings" | |
}, | |
"license": "ISC", | |
"dependencies": { | |
"@angular/common": "2.0.0", | |
"@angular/compiler": "2.0.0", | |
"@angular/core": "2.0.0", | |
"@angular/forms": "2.0.0", | |
"@angular/platform-browser": "2.0.0", | |
"@angular/platform-browser-dynamic": "2.0.0", | |
"core-js": "^2.4.1", | |
"reflect-metadata": "^0.1.3", | |
"rxjs": "5.0.0-beta.12", | |
"systemjs": "0.19.27", | |
"zone.js": "^0.6.23" | |
}, | |
"devDependencies": { | |
"concurrently": "^2.2.0", | |
"lite-server": "^2.2.2", | |
"typescript": "^2.0.2", | |
"typings":"^1.3.2" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* System configuration for Angular 2 samples | |
* Adjust as necessary for your application needs. | |
*/ | |
(function (global) { | |
System.config({ | |
paths: { | |
//alias para a pasta node_modules | |
'npm:': 'node_modules/' | |
}, | |
// mapeamento para carregamento das dependências | |
map: { | |
//pasta do código-fonte da aplicação | |
app: 'app', | |
// angular bundles | |
'@angular/core': 'npm:@angular/core/bundles/core.umd.js', | |
'@angular/common': 'npm:@angular/common/bundles/common.umd.js', | |
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js', | |
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js', | |
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js', | |
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', | |
// other libraries | |
'rxjs': 'npm:rxjs', | |
}, | |
// como carregar os arquivos quando não declaramos nomes ou extensões | |
packages: { | |
app: { | |
main: './main.js', | |
defaultExtension: 'js' | |
}, | |
rxjs: { | |
defaultExtension: 'js' | |
} | |
} | |
}); | |
})(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"removeComments": false, | |
"noImplicitAny": false | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"globalDependencies": { | |
"core-js": "registry:dt/core-js#0.0.0+20160725163759" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment