shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 242 forks source link

Build expected error. readonly modificator problem #240

Closed Andranik-89 closed 7 years ago

Andranik-89 commented 7 years ago

Hi,

This is bug reporting I guess. Trying to make this - http://embed.plnkr.co/mbPzd8/ work in VS 2015

after adding all files and installing libs, I run the application, getting these errors: "Build: '=' expected or Build: ';' expected. All these errors appear where there is 'readonly' modificator in the angular2-modal files. I remove these 'readonly' everywhere and then the build succeeds. The page is opened in Chrome and there again errors:

localhost/:42 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:50821/traceur Error: XHR error (404 Not Found) loading http://localhost:50821/traceur at XMLHttpRequest.wrapFn as _onreadystatechange at ZoneDelegate.invokeTask (http://localhost:50821/node_modules/zone.js/dist/zone.js:265:35) at Zone.runTask (http://localhost:50821/node_modules/zone.js/dist/zone.js:154:47) at XMLHttpRequest.ZoneTask.invoke (http://localhost:50821/node_modules/zone.js/dist/zone.js:335:33) Error loading http://localhost:50821/traceur Unable to load transpiler to transpile http://localhost:50821/node_modules/angular2-modal/plugins/bootstrap/index.js Error loading http://localhost:50821/node_modules/angular2-modal/plugins/bootstrap/index.js as "angular2-modal/plugins/bootstrap" from http://localhost:50821/app/testModal/app.module.js at XMLHttpRequest.wrapFn as _onreadystatechange at ZoneDelegate.invokeTask (http://localhost:50821/node_modules/zone.js/dist/zone.js:265:35) at Zone.runTask (http://localhost:50821/node_modules/zone.js/dist/zone.js:154:47) at XMLHttpRequest.ZoneTask.invoke (http://localhost:50821/node_modules/zone.js/dist/zone.js:335:33) Error loading http://localhost:50821/traceur Unable to load transpiler to transpile http://localhost:50821/node_modules/angular2-modal/plugins/bootstrap/index.js Error loading http://localhost:50821/node_modules/angular2-modal/plugins/bootstrap/index.js as "angular2-modal/plugins/bootstrap" from http://localhost:50821/app/testModal/app.module.js

... though actually in config.js I set the paths for this bootstrap/index.js:

  'angular2-modal': 'npm:angular2-modal',
  'angular2-modal/plugins/bootstrap': 'npm:angular2-modal/plugins/bootstrap'
},

// packages tells the System loader how to load when no filename and/or no extension
packages: {
  app: {
    main: 'gridToList/app.main.js',
    defaultExtension: 'js'
  },
  'angular2-modal/plugins/bootstrap':  { 
      defaultExtension: 'js', 
      main: 'index' 
  },
  'angular2-modal': { 
      defaultExtension: 'js', 
      main: 'bundles/angular2-modal.umd' 
  },

I use RC6.. Maybe in the end I did smth wrong with the bootstrap/index.js, but why the 'readonly' doesn't work? Thanks everyone in advance for help!

Gbacc commented 7 years ago

The readonly property is a Typescript 2.0 property.

What is your installed version ?

shlomiassaf commented 7 years ago

I'll close this stale issue, please re-open with a comment if it still an issue.