Comments (10)
I got the same issue, did anyone fixed it?
from ngx-pagination.
Hi, you mean you get the error as soon as you add the pagination service/pipe/component to your component, without even using it in the template?
Where is the error reported? Browser console? Is there anything more to that error message?
from ngx-pagination.
Hi, yes, the error was reported in browser console, this is the error i got:
ng2-pagination:1 Uncaught SyntaxError: Unexpected token <
angular2-polyfills.js:1243 Uncaught SyntaxError: Unexpected token <
from ngx-pagination.
Thanks. What do you use to bundle your app? Webpack/Browserify/Systemjs etc? Also can you tell me what versions you are using for Angular2, ng2-pagination.
from ngx-pagination.
here is my package.json, hope it can help you reproduce the errror:
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "concurrent "npm run tsc:w" "npm run lite -c lite-config.js" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.9",
"angular2-google-maps": "^0.8.1",
"angular2-modal": "0.0.3",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"moment": "^2.11.2",
"ng2-bootstrap": "1.0.7",
"ng2-file-upload": "^1.0.0-beta.1",
"ng2-pagination": "0.0.1-beta.2",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"typescript": "^1.8.0",
"zone.js": "0.5.15"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0"
}
}
And here is my index file:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.8/angular2-polyfills.js"></script>
<script src="https://code.angularjs.org/tools/system.js"></script>
<script src="https://npmcdn.com/[email protected]/lib/typescript.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.8/Rx.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.8/angular2.dev.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.8/router.dev.js"></script>
<script src="node_modules/angular2/bundles/http.dev.js"></script>
<!-- ## ADD THE FOLLOWING LINE ## -->
<script src="node_modules/ng2-bootstrap/bundles/ng2-bootstrap.min.js"></script>
<script src="node_modules/angular2-google-maps/bundles/angular2-google-maps.js"></script>
<script>
System.config({
transpiler: 'typescript',
typescriptOptions: { emitDecoratorMetadata: true },
packages: {
'app': {defaultExtension: 'ts'},
'angular2-modal': {defaultExtension: 'ts'},
'ng2-file-upload': {defaultExtension: 'ts'},
'config': {defaultExtension: 'ts'}
},
map: {
'moment': 'node_modules/moment/moment.js',
'angular2-modal': 'node_modules/angular2-modal',
'ng2-file-upload': 'node_modules/ng2-file-upload'
}
});
System.import('app/app.module')
.then(null, console.error.bind(console));
</script>
</head>
<body>
<app-container><center>Loading...</center>/app-container>
</body>
from ngx-pagination.
@sangdao-dirox I notice you are using the angular2-quickstart
seed. I came across this issue: http://stackoverflow.com/questions/34387174/angular-2-quickstart-unexpected-token - does that apply in your case?
@dottodot Is this also the case with you?
from ngx-pagination.
thanks alot
from ngx-pagination.
I'm using angular 2.0.0-beta.9
from ngx-pagination.
rebuild ng2-pagination with System module
from ngx-pagination.
After follow the System.register example I got it working.
from ngx-pagination.
Related Issues (20)
- Add note for SASS:/SCSS: replace /deep/ with ::ng-deep HOT 5
- Adding overflow height to bottom HOT 8
- Feat: Angular 13 Update | Enable Ivy HOT 2
- Duplicate items when pagination begins HOT 2
- Unable to paginate card(with each card has datatable which is displayed by model) using ngx-pagination.
- Angular 14 npm install error HOT 2
- Moving the previous and next buttons HOT 2
- error TS2345: Argument of type 'IQuestion[] | null' is not assignable to parameter of type 'Collection<unknown>'. HOT 2
- InvalidPipeArgument Error in pagination-controls
- NGX pagination search filter is not working after page change in angular HOT 1
- Can't bind to 'ngForPaginate' since it isn't a known property of 'li' (used in the 'ListingComponent' component template). HOT 2
- When build project, do not create /dist/ngx-pagination. Error: Uncaught (in promise): Error: NG0203 HOT 3
- Error while using the package in the Angular 10 HOT 1
- No license available on NPM package HOT 2
- When navigating through the page numbers, the paginators gets stuck in the 3 points " ... "
- Space at the bottom and scroll is shown, overflow: hidden can't be done
- Error Module Not found
- Page numbers are not displayed correctly when we have multiple pagination using pagination-template HOT 2
- PaginatePipe: Argument is missing the following required properties: currentPage HOT 1
- the specified id "mlistPaging" does not match any registered PaginationInstance HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-pagination.