You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
I've finally set up Meteor to use Angular2 and Typescript, but when importing zone.js both Visual Studio Code and Meteor's typescript compiler complain about zone.js.d.ts not being a module.
The application works fine and it's just a minor development error, but it persists every time a change is made to the project, which may be annoying when looking at logs.
The code that I've used:
import'reflect-metadata';import'zone.js';import{Component}from'@angular/core';import{bootstrap}from'@angular/platform-browser-dynamic';
@Component({selector: 'app',templateUrl: '/client/app.html'})classSocially{constructor(){console.log("Hi from inside the constructor");}}bootstrap(Socially);
I have tried to install a zone.js typings file (with typings) but it did not work.
The text was updated successfully, but these errors were encountered:
you should not import zone.js from your application like this. If you do, you are loading the prolyfill too late which means that part of your environment (module loader) won't be under the oversight of zone.js - things might seem to work for a while but sooner or later you'll run into issues when updates to the ui stop happening and you won't know why.
For this reason it's better to always include all polyfills before any module loader (systemjs) or application code. This is why we recommend loading zones as the first script in index.html.
I've finally set up Meteor to use Angular2 and Typescript, but when importing zone.js both Visual Studio Code and Meteor's typescript compiler complain about zone.js.d.ts not being a module.
The application works fine and it's just a minor development error, but it persists every time a change is made to the project, which may be annoying when looking at logs.
The code that I've used:
I have tried to install a zone.js typings file (with typings) but it did not work.
The text was updated successfully, but these errors were encountered: