Here is my packages dependencies
Code: Select all
"dependencies": {
"angular2": "2.0.0-beta.17",
"systemjs": "~0.19.25",
"es6-promise": "^3.1.2",
"es6-shim": "^0.35.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.6",
"zone.js": "~0.6.9",
"breeze-client": "~1.5.6",
"handlebars": "^4.0.5",
"primeng": "^1.0.0-beta.4",
"primeui": "^4.1.9"
},
Code: Select all
gulp.task('moveToLibs', function () {
gulp.src([
'node_modules/angular2/bundles/js',
'node_modules/angular2/bundles/angular2.*.js*',
'node_modules/angular2/bundles/angular2-polyfills.js',
'node_modules/angular2/bundles/http.*.js',
'node_modules/angular2/bundles/http.js',
'node_modules/angular2/bundles/router.*.js*',
'node_modules/es6-shim/es6-shim.min.js*',
'node_modules/angular2/es6/dev/src/testing/shims_for_IE.js',
'node_modules/systemjs/dist/*.*',
//'node_modules/jquery/dist/jquery.*js',
//'node_modules/bootstrap/dist/js/bootstrap*.js',
'node_modules/rxjs/bundles/Rx.js',
'node_modules/angular2/platform/browser.js',
'node_modules/breeze-client/build/breeze.min.js'
]).pipe(gulp.dest('./scripts/lib'));
gulp.src([
'node_modules/primeng/**/*.js',
]).pipe(gulp.dest('./scripts/lib/primeng'));
gulp.src([
'node_modules/primeui/**/*.js',
]).pipe(gulp.dest('./scripts/lib/primeui'));
gulp.src([
'node_modules/primeui/themes/bluesky/theme.css',
'node_modules/primeui/primeui-ng-all.min.css'
]).pipe(gulp.dest('./content/lib'));
});
Code: Select all
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
<base href="/" />
@Styles.Render("~/Content/css")
<link rel="stylesheet" type="text/css" href="~/Content/lib/theme.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="~/Content/lib/primeui-ng-all.min.css" />
<!-- 1. Load libraries -->
@*@Scripts.Render("~/startup");*@
<!-- IE required polyfills, in this exact order -->
<script src="~/Scripts/lib/breeze.min.js"></script>
<script src="~/Scripts/lib/es6-shim.min.js"></script>
<script src="~/Scripts/lib/system-polyfills.js"></script>
<script src="~/Scripts/lib/shims_for_IE.js"></script>
<script src="~/Scripts/lib/angular2-polyfills.js"></script>
<script src="~/Scripts/lib/system.src.js"></script>
<script src="~/Scripts/lib/primeui/primeui-ng-all.min.js"></script>
<script src="~/Scripts/lib/Rx.js"></script>
<script src="~/Scripts/lib/angular2.dev.js"></script>
<script src="~/Scripts/lib/http.js"></script>
<script src="~/Scripts/lib/router.min.js"></script>
<!-- 2. Configure SystemJS -->
<script>
System.config({
meta: {
'*.js': { scriptLoad: true } //this allows TS debugging in VS
},
packages: {
app: {
format: 'register',
defaultExtension: 'js'
},
'primeng': {defaultExtension: 'js', format: 'register'}
},
map: {
'primeng': 'scripts/lib/primeng'
}
});
System.import('app/main')
.then(null, console.error.bind(console));
</script>
</head>
<body>
<div class="container body-content">
@RenderBody()
</div>
@RenderSection("scripts", required: false)
</body>
</html>
I get the following error
require is not a function: priming.js:5
and
http://localhost:32532/scripts/lib/primeng/primeng.js did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support." angular2-polyfills.js:349
I'm sure its something simple but not sure why its saying its not registered.