Giter Site home page Giter Site logo

Comments (10)

sdfullstack avatar sdfullstack commented on August 11, 2024

I got the same issue, did anyone fixed it?

from ngx-pagination.

michaelbromley avatar michaelbromley commented on August 11, 2024

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.

sdfullstack avatar sdfullstack commented on August 11, 2024

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.

michaelbromley avatar michaelbromley commented on August 11, 2024

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.

sdfullstack avatar sdfullstack commented on August 11, 2024

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.

michaelbromley avatar michaelbromley commented on August 11, 2024

@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.

sdfullstack avatar sdfullstack commented on August 11, 2024

thanks alot

from ngx-pagination.

dottodot avatar dottodot commented on August 11, 2024

I'm using angular 2.0.0-beta.9

from ngx-pagination.

shuchangbing avatar shuchangbing commented on August 11, 2024

rebuild ng2-pagination with System module

from ngx-pagination.

dottodot avatar dottodot commented on August 11, 2024

After follow the System.register example I got it working.

from ngx-pagination.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.