My name is pronounced like "shoe hey" ๐ ๐.
shuhei / babel-angular2-app Goto Github PK
View Code? Open in Web Editor NEWA super-simple skeleton Angular 2 app built with Babel and Browserify.
A super-simple skeleton Angular 2 app built with Babel and Browserify.
My name is pronounced like "shoe hey" ๐ ๐.
I read in the readme that parameter decorator support will be dropped. What would be the solution instead of it?
I found that a static getter is the most elegant way for it.
static get parameters() {
return [[TodoStore]];
}
Hi,
I just cloned the project and got a bug similar to the one reported a month ago:
$ make
mkdir -p public
cp src/index.html public/
cp node_modules/angular2/node_modules/zone.js/dist/zone.js public/
node_modules/.bin/webpack
Hash: 9a56cc72acac2de6f40c
Version: webpack 1.9.11
Time: 583ms
+ 1 hidden modules
ERROR in ./src/app.es6
Module build failed: TypeError: /Users/ivan/www/babel-angular2-app/src/app.es6: undefined is not a function
at AssertionInjector.insertImport (/Users/ivan/www/babel-angular2-app/node_modules/babel-plugin-type-assertion/index.js:89:31)
at AssertionInjector.run (/Users/ivan/www/babel-angular2-app/node_modules/babel-plugin-type-assertion/index.js:77:12)
at NodePath.Transformer.Program.enter (/Users/ivan/www/babel-angular2-app/node_modules/babel-plugin-type-assertion/index.js:152:43)
at NodePath.call (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/path/context.js:122:26)
at NodePath.visit (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/path/context.js:146:8)
at TraversalContext.visitSingle (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/context.js:105:12)
at TraversalContext.visit (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/context.js:117:19)
at Function.traverse.node (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/index.js:67:17)
at traverse (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/index.js:50:14)
at TransformerPass.transform (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/transformation/transformer-pass.js:39:32)
at File.transform (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/transformation/file/index.js:590:12)
at /Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/transformation/transformer-pipeline.js:100:19
at File.wrap (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/transformation/file/index.js:604:16)
at TransformerPipeline.transform (/Users/ivan/www/babel-angular2-app/node_modules/babel-core/lib/babel/transformation/transformer-pipeline.js:97:17)
at transpile (/Users/ivan/www/babel-angular2-app/node_modules/babel-loader/index.js:10:22)
at Object.module.exports (/Users/ivan/www/babel-angular2-app/node_modules/babel-loader/index.js:65:12)
Blocked by router's change. Still not sure how to use it properly.
Also, need to update make copy
to copy zone.js from zone.js/dist
dir.
Thanks for this repo ! As I don't want to use TS it will help me a lot ^^
Does it work with server rendering with angular-universal ? That would be awesome :)
Also is there any limitation to use this instead of TS ?
Are there any plans to add test examples for karma/protractor?
Any chance of providing a configuration for jspm?
Thanks.
It seems like angular-new-router is available only for Angular 1.x.
Hi shuhei,
I clone your app, and It work good.
But I wants build app to many files for debug, not one file bundle.js.
Could you please help me ???
Thanks.
I built the app and tried to load the page, but I get this error message on app.js:1033:
Uncaught (in promise)
InstantiationError
message: "Error during instantiation of Token(AppComponentAnnotatedType)! (Token(AppView) -> Token(AppElement) -> Token(AppComponentAnnotatedType)). ORIGINAL ERROR: Error: No Directive annotation found on HelloApp"
I'd like to point folks to a Babel alternative for their TypeScript projects. I noticed you cover the feature gaps-and-fills here. Do you see a benefit to breaking out the preset into a TypeScript preset instead of scoping it to just Angular2?
2MB without minification. With a quick look, it seems that angular2, (literally) cryptographic stuff and polyfills have huge portions. Track down unnecessary modules.
Excellent intro to Angular2 and Babel so thanks for that! Just cloned the project to mess around with it and noticed when trying to build that babel seemed to be missing. Investigating further I noticed there was no reference in the package.json. With that, I just added this to the top of the list:
"babel": "^6.5.2",
"babel-core": "^6.9.0",
Outside of that, thanks again! I think I'm going to fork your project and modify it for express.js and livereload.
On mu machine the build time takes 18 seconds, is there any way to speed it up?
in this project template work but templateUrl doesn't work ,
can anyone help me?
Is there any way to use gulp-babel to transpile es6 instead browsify?
reason: on my dev environment, i need to transpile only change file not all files.
I got an error on line app.js:68. Any ideas?
HelloApp.annotations = [new _Component$Template$bootstrap.Component({
selector: 'hello-app',
services: [_Greeter.Greeter]
}), new _Component$Template$bootstrap.Template({ <------------undefined is not a func
inline: '\n <p>{{message}}</p>\n '
})];
HelloApp.parameters = [[_Greeter.Greeter]];
<script>
I'm trying to run this app on Windows 7 and running into problems with the make
command.
Could you clarify, is this app unix/linux only or is there an intaller for make
that should work on windows?
Have you considered using a cross-platform javascript build tool like Grunt or Gulp?
Can we use TemplateLoader?
Hey, thanks for making this, it's an interesting project.
I'm trying to build it after following the instructions, and getting this webpack error:
Unfortunately, the error has no line numbers for what is triggering the problem in app.es6.
max@ionitron:~/git/babel-angular2-app$ make
mkdir -p public
cp src/index.html public/
cp node_modules/angular2/node_modules/zone.js/zone.js public/
node_modules/.bin/webpack
Hash: 9a56cc72acac2de6f40c
Version: webpack 1.9.5
Time: 625ms
+ 1 hidden modules
ERROR in ./src/app.es6
Module build failed: TypeError: /Users/max/git/babel-angular2-app/src/app.es6: undefined is not a function
at AssertionInjector.insertImport (/Users/max/git/babel-angular2-app/node_modules/babel-plugin-type-assertion/index.js:85:13)
at AssertionInjector.run (/Users/max/git/babel-angular2-app/node_modules/babel-plugin-type-assertion/index.js:75:10)
at TraversalPath.module.exports.Transformer.Program.enter (/Users/max/git/babel-angular2-app/node_modules/babel-plugin-type-assertion/index.js:151:41)
at TraversalPath.call (/Users/max/git/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/path/index.js:831:28)
at TraversalPath.visit (/Users/max/git/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/path/index.js:864:10)
at TraversalContext.visitSingle (/Users/max/git/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/context.js:78:43)
at TraversalContext.visit (/Users/max/git/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/context.js:89:19)
at Function.traverse.node (/Users/max/git/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/index.js:64:17)
at Object.traverse [as default] (/Users/max/git/babel-angular2-app/node_modules/babel-core/lib/babel/traversal/index.js:50:14)
at TransformerPass.transform (/Users/max/git/babel-angular2-app/node_modules/babel-core/lib/babel/transformation/transformer-pass.js:42:27)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.