AngularShowcase / angular2-seed-ng2-material

An example showing an integration with ng2-material. https://github.com/justindujardin/ng2-material
MIT License
19 stars 8 forks source link

integrating in angular 2 beta faild. #2

Open rumes opened 8 years ago

rumes commented 8 years ago

I have install ng2-material using npm install and import material_provider in boot.ts and bootstrap it. and I have use material_directive in app.component and map it as below in index.php

index.php

<!doctype html> <html>

<head> <base href="/"> <title>Angular 2 QuickStart</title> <!-- 1. Load libraries --> <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="node_modules/angular2/bundles/angular2-polyfills.js"></script> <script src="node_modules/rxjs/bundles/Rx.js"></script> <script src="node_modules/angular2/bundles/angular2.dev.js"></script> <script src="node_modules/angular2/bundles/router.dev.js"></script> <script src="node_modules/angular2/bundles/http.dev.js"></script> <link rel="stylesheet" href="node_modules/ng2-material/dist/ng2-material.css"> <link rel="stylesheet" href="node_modules/ng2-material/dist/font.css">
<!-- 2. Configure SystemJS --> <script> System.config({ packages: {
app: { format: 'register', defaultExtension: 'js' }, 'ng2-material': { format: 'register', defaultExtension: 'js' } }, map: { 'ng2-material': 'node_modules/ng2-material' } }); System.import('app/boot') .then(null, console.error.bind(console)); </script>

</head>

<!-- 3. Display the application --> <body> <my-app>Loading...</my-app> </body>

</html>

and i get error as below

Uncaught ReferenceError: require is not defined(anonymous function) @ all.ts:1 2016-02-03 23:20:50.428 angular2-polyfills.js:143 Uncaught TypeError: Cannot read property 'split' of undefinedreadMemberExpression @ system.src.js:1456(anonymous function) @ system.src.js:3224(anonymous function) @ system.src.js:3749complete @ system.src.js:2487run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111

how i can integrate it in my app?.

oettaib commented 8 years ago

hi @rumes can show me the tsconfig