GithubHelp home page GithubHelp logo

angular2-meteor's Introduction

angular2-meteor's People

Contributors

amadeutolentino avatar barbatus avatar bigsan avatar dab0mb avatar dotansimha avatar guillaumem69 avatar hongbo-miao avatar jcache avatar littlestudent avatar nkl3in avatar ozsay avatar sclausen avatar sebakerckhof avatar urigo avatar vamsi-innominds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular2-meteor's Issues

Support Ionic 2.0

It's more a question than an issue but did you guys try to get ionic 2 to works with meteor and if yes how did you proceed ?
Edit : The title is not relevant but I cannot edit it anymore

Nested directives using angular2 & blaze

Hi,

I've been trying incorporate Angular 2 in our system which is currently using blaze, step by step.

One of the major problems I encountered trying to replace one of the system pages from Blaze to Angular2 (while keeping all other pages working with blaze in a working order) is when I try to use on directive inside of another.

I getting what I think is a dummy exception from the browser, Uncaught SyntaxError: Unexpected token <. from what I can see in the browser dev-tools some part of the infrastructure try to use the concatenated html since the imported file of the nested directive files to either be transpiled or imported, I don't really know since I don't see any errors from the meteor CLI 'compilation' process.

Any clue what can cause this behavior?

ReferenceError when integrating CommonJS module

Firstly, I'm new to a lot of this and hope I'm just doing something silly. I'm trying to use an existing, unmodified, CommonJS module. This compiles fine with tsc v1.5.3 and runs with node.js v5.1.0 but meteor-angular2 throws the error below.

I made this test case in the directory server/example of my meteor-angular2 app. I have these three files:

myModule.js

module.exports = {
    "foo": "I am a string",
    "bar": function() {
        return "I came from a function";
    }
};

myModule.d.ts

declare module myModule {
    export var foo: string;
    export function bar(): string;
}
export = myModule;

test.ts

/// <reference path="./myModule.d.ts" />
import m = require("./myModule");
console.log(m.foo);

But when meteor-angular2 starts, it throws this error:

W20151124-16:22:54.783(0)? (STDERR) /home/drew/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20151124-16:22:54.783(0)? (STDERR)                         throw(ex);
W20151124-16:22:54.783(0)? (STDERR)                               ^
W20151124-16:22:54.785(0)? (STDERR) ReferenceError: module is not defined

Is this unexpected behavior or am I doing something wrong?

Error conflict: 2 packages handling *.html

An error is preventing startup on meteor run:
While determining active plugins: error: conflict: two packages included in the app (barbatus:angular2 and templating) are both trying to handle *.html

Using meteor v1.2.0.1 and meteor-angular2 v0.2.0

Import from relative path

Hi,

I've been trying incorporate Angular 2 in our system which is currently using blaze, step by step.

Doing the tutorial for Angular 2 And I've noticed that while in the tutorial, and in another "pure" Angular2 small prototype, the import {Something} from './some/relative/path' does not work the same way in when the system contains both Meteor-Angular2 and Blaze.

Instead, the path given in the statement must be of an 'absolute' path, /project/root/to/file (i.e the initial / stands for the project root, not the system root).

Any idea why this difference exist? is can be very confusing for a lot of "Tutorial Graduates".

Adding blaze template support

During socially tutorial, I have added meteor's accounts-ui package,
since html file passing barbatus:angular2 compiling only, the template {{> loginButtons}} wasn't compiled. I think Blaze templates should be supported

not working with meteor 1.3 beta

I just updated to meteor 1.3 beta, the tutorial project (meteor-angular2.0-socially) doesn't work any more
it says module is not defined in system.js
image

Component and View typings not working

Angular-meteor tutorial with angular2 is bugged from the first step. Component and View typings can't be imported from 'angular2/core' (I am including reference path="../typings/angular2-meteor.d.ts" / also import {bootstrap} from 'angular2/bootstrap'; works)

Problems with reactive updates of objects

I kinda finished the tutorial and found out that I can't make updates of objects working.

When I add new items to the collection or remove existing items, 2 tabs or windows are nicely in sync. But when I modify an object and save those change, I have to reload the page. I've checked out the tutorial code and saw the same issues there as well. Any ideas?

  • I'm getting the collection just via this.parties = Parties.find();
  • I'm getting the object via: this.party = Parties.findOne(partyId);
  • and I'm updating and object via:
    saveParty() {
      Parties.update(this.party._id, {
        $set: {
          name: this.party.name,
          description: this.party.description,
          location: this.party.location
        }
      });

angular2-meteor sample stopped working after meteor update

I'm just going through the Meteor Angular 2 Tutorial. Installed Meteor a while ago. At step 6 I just randomly tried 'meteor update' which crashed my sample. Update worked, created some new typings and server is starting. For me my local copy is identical to the sample in the git repository. However the browser screen stays now empty and in the console appears an error:

Uncaught SyntaxError: Unexpected token <

Uncaught (in promise) Uncaught SyntaxError: Unexpected token <
    Evaluating http://localhost:3000/client/app.js
    Error loading http://localhost:3000/client/app.js

Already posted question on http://stackoverflow.com/questions/34501079/angular2-meteor-sample-stopped-working-after-meteor-update, but no answer up to now. Just thought it may be better situated here.

Since I'm new to meteor I not able to figure out the reason why I'm getting this error?

Cannot find module "angular2/angular2"

I am working through the tutorial and running into this error when trying to start Meteor. I am using tsc 1.6.2 and Meteor 1.2.1 on OS X 10.11

=> Started proxy.
=> Started MongoDB.
app.ts (1, 42): Cannot find module 'angular2/angular2'
Linking

It hangs here. I also tried importing bootstrap from angular2-meteor and get the same error.

error: no such package

After running meteor add urigo:angular2-meteor I get the following error:

 => Errors while parsing arguments:

While adding package urigo:angular2-meteor:
error: no such package

I don't have trouble adding other packages, and I'm new to meteor, so I'm not quite sure how to proceed.
Any thoughts?

examples/parties throws errors

Steps to reproduce:
git clone https://github.com/Urigo/Meteor-Angular2
cd Meteor-Angular2 && git submodule init && git submodule update
meteor

=> Started proxy.                             
=> Started MongoDB.                                                                

Changes to your project's package version selections:

barbatus:angular2  upgraded from 0.4.2 to 0.4.3

collections/parties.ts (1, 26): Cannot find name 'Mongo'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
server/pubs.ts (3, 1): Cannot find name 'Meteor'.
server/pubs.ts (7, 1): Cannot find name 'Meteor'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
server/test_data.ts (27, 15): Cannot find name 'Fake'.
server/test_data.ts (29, 22): Cannot find name 'Fake'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
server/main.ts (4, 1): Cannot find name 'Meteor'.
server/pubs.ts (3, 1): Cannot find name 'Meteor'.
server/pubs.ts (7, 1): Cannot find name 'Meteor'.
server/test_data.ts (27, 15): Cannot find name 'Fake'.
server/test_data.ts (29, 22): Cannot find name 'Fake'.
client/parties/parties.ts (1, 47): Cannot find module 'angular2/angular2'.
client/parties/parties.ts (3, 33): Cannot find module 'angular2/router'.
client/parties/parties.ts (7, 31): Cannot find module 'angular2-meteor'.
client/parties/parties.ts (19, 12): Cannot find name 'IParty'.
client/parties/parties.ts (20, 13): Cannot find name 'ReactiveVar'.
client/parties/parties.ts (24, 10): Property 'subscribe' does not exist on type 'PartiesCmp'.
client/parties/parties.ts (25, 25): Cannot find name 'ReactiveVar'.
client/parties/parties.ts (27, 10): Property 'autorun' does not exist on type 'PartiesCmp'.
client/parties/parties.ts (33, 10): Property 'subscribe' does not exist on type 'PartiesCmp'.
client/party-form/party-form.ts (1, 31): Cannot find module 'angular2/angular2'.
client/party-form/party-form.ts (2, 66): Cannot find module 'angular2/angular2'.
client/party-form/party-form.ts (27, 16): Cannot find name 'IParty'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
client/party-details/party-details.ts (1, 39): Cannot find module 'angular2/angular2'.
client/party-details/party-details.ts (3, 46): Cannot find module 'angular2/router'.
client/party-details/party-details.ts (5, 31): Cannot find module 'angular2-meteor'.
client/party-details/party-details.ts (18, 10): Cannot find name 'IParty'.
client/party-details/party-details.ts (23, 10): Property 'subscribe' does not exist on type 'PartyDetailsCmp'.
client/party-details/party-details.ts (23, 38): Cannot find name 'zone'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
client/party-form/party-form.ts (1, 31): Cannot find module 'angular2/angular2'.
client/party-form/party-form.ts (2, 66): Cannot find module 'angular2/angular2'.
client/party-form/party-form.ts (27, 16): Cannot find name 'IParty'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
client/parties/parties.ts (1, 47): Cannot find module 'angular2/angular2'.
client/parties/parties.ts (3, 33): Cannot find module 'angular2/router'.
client/parties/parties.ts (7, 31): Cannot find module 'angular2-meteor'.
client/parties/parties.ts (19, 12): Cannot find name 'IParty'.
client/parties/parties.ts (20, 13): Cannot find name 'ReactiveVar'.
client/parties/parties.ts (24, 10): Property 'subscribe' does not exist on type 'PartiesCmp'.
client/parties/parties.ts (25, 25): Cannot find name 'ReactiveVar'.
client/parties/parties.ts (27, 10): Property 'autorun' does not exist on type 'PartiesCmp'.
client/parties/parties.ts (33, 10): Property 'subscribe' does not exist on type 'PartiesCmp'.
client/party-details/party-details.ts (1, 39): Cannot find module 'angular2/angular2'.
client/party-details/party-details.ts (3, 46): Cannot find module 'angular2/router'.
client/party-details/party-details.ts (5, 31): Cannot find module 'angular2-meteor'.
client/party-details/party-details.ts (18, 10): Cannot find name 'IParty'.
client/party-details/party-details.ts (23, 10): Property 'subscribe' does not exist on type 'PartyDetailsCmp'.
client/party-details/party-details.ts (23, 38): Cannot find name 'zone'.
client/party-form/party-form.ts (1, 31): Cannot find module 'angular2/angular2'.
client/party-form/party-form.ts (2, 66): Cannot find module 'angular2/angular2'.
client/party-form/party-form.ts (27, 16): Cannot find name 'IParty'.
client/socially.ts (1, 37): Cannot find module 'angular2/angular2'.
client/socially.ts (3, 85): Cannot find module 'angular2/router'.
client/socially.ts (5, 64): Cannot find module 'angular2/router'.
client/socially.ts (10, 25): Cannot find module 'angular2-meteor'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
collections/parties.ts (1, 26): Cannot find name 'Mongo'.
=> Started your app.                          

=> App running at: http://localhost:3000/
...SNIP...

Cannot use with blaze-html-templates?

While following the readme to use/try angular2 in a new/plain meteor app, meteor displayed the following error even without any html file in the project:

           While determining active plugins:
           error: conflict: two packages included in the app (templating and urigo:angular2-meteor) are both trying to handle
           *.html

Removing blaze-html-templates solved the issue, but I guess this will prevent me using accounts-ui and dump its view in an angular2 template, since it depends on blaze. Is there a way to use it or an alternative for accounts stuff?

Step0 in the tutorial

I got this error when I tried to run the app just before the Templates section:

/Users/*********/.meteor/packages/meteor-tool/.1.1.10.5z7f0t++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: Path reservation conflict: app/client/app.js
at Builder.reserve (/tools/isobuild/builder.js:297:15)
at /tools/isobuild/bundler.js:1111:15
at /tools/isobuild/bundler.js:1103:11
at Array.forEach (native)
at /tools/isobuild/bundler.js:1102:20
at Array.forEach (native)
at ClientTarget. (/tools/isobuild/bundler.js:1101:30)
at ClientTarget.write (/tools/isobuild/bundler.js:1110:5)
at /tools/isobuild/bundler.js:1847:30
at Object.keys.forEach.subBuilder (/tools/isobuild/bundler.js:1971:9)
at Array.forEach (native)
at /tools/isobuild/bundler.js:1963:26
at /tools/isobuild/bundler.js:2010:7
at /tools/isobuild/bundler.js:2287:22
at /tools/utils/buildmessage.js:268:13
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:261:29
at [object Object].
.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:259:18
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:250:23
at [object Object].
.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at Object.capture (/tools/utils/buildmessage.js:249:19)
at Object.exports.bundle (/tools/isobuild/bundler.js:2128:31)
at /tools/runners/run-app.js:551:36
at time (/tools/tool-env/profile.js:232:28)
at Function.run (/tools/tool-env/profile.js:377:12)
at bundleApp (/tools/runners/run-app.js:541:34)
at [object Object]._.extend.runOnce (/tools/runners/run-app.js:594:35)
at [object Object].
.extend._fiber (/tools/runners/run-app.js:858:28)
at /tools/runners/run-app.js:396:12

Disable <app></app> insertion

Hi,

I've been trying incorporate Angular 2 in our system which is currently using blaze, step by step.

The insertion of at the index.html by the package is causing me a lot of trouble, and I've currently have most of this file commented-out.

Assuming that I want to to incorporate Angular 2, at least for the time being, at a non-central point, can I disable this feature?

Timed out

Hey there, I was trying to do angular2 tutorial but I got this error:

`$ meteor add urigo:angular2-meteor

=> Errors while adding packages:

While downloading urigo:[email protected]...:
error: connect ETIMEDOUT
`

Anything wrong?
cheers

angular2-meteor & blaze-html-templates integration

Hi,

I've been trying incorporate Angular 2 in our system which is currently using blaze, step by step.

Since replacing the system front end must be an incremental process (and I assume there will be more projects like this after the blaze deprecation) there is a need for allowing both angular2-meteor and blaze-html-templates to work together.

In order to make it work for the time being I've cloned the repo, changed the plugin in registrator.js to handle 'ang.html' files instead of handling 'html' files (and renamed bootstub.html to bootstub.ang.html).

Is there a plan to support this kind of integration built in to the package?
I suspect stuff like Blaze html concatenation may cause a lot of trouble when things start to get complicated.

How to use methods ?

Hello,

I have some problems to use method in my own validator. How I can use meteor methods with meteor-ng2 ?

In Meteor/Ng1, we have promise but in ng2... ?

Thank you.

Quickstart App at Step https://github.com/Urigo/Meteor-Angular2#import-angular2-into-your-app crashes while processing files with barbatus:angular2

Followed the quick start to step https://github.com/Urigo/Meteor-Angular2#import-angular2-into-your-app

Launched meteor, browsed to localhost:3000, got this. Help?

Your app is crashing. Here's the latest log:

Errors prevented startup:

While processing files with barbatus:angular2 (for target os.osx.x86_64):
/tools/isobuild/compiler-plugin.js:418:13: Document sections can only be emitted to web targets
at [object Object]..extend.addHtml (/tools/isobuild/compiler-plugin.js:418:13)
at [object Object].
.extend.addHtml (/tools/isobuild/compiler-plugin.js:294:24)
at HtmlExtensionCompiler.addCompileResult (plugin/handlers/html_handler.js:60:10)
at caching-compiler.js:305:14
at /Users/womanpanzee/.meteor/packages/barbatus_angular2/.0.6.5.n1t2og++os+web.browser+web.cordova/plugin.HTMLBuilder.os/npm/caching-compiler/node_modules/async/lib/async.js:182:20
at replenish (/Users/womanpanzee/.meteor/packages/barbatus_angular2/.0.6.5.n1t2og++os+web.browser+web.cordova/plugin.HTMLBuilder.os/npm/caching-compiler/node_modules/async/lib/async.js:317:21)
at /Users/womanpanzee/.meteor/packages/barbatus_angular2/.0.6.5.n1t2og++os+web.browser+web.cordova/plugin.HTMLBuilder.os/npm/caching-compiler/node_modules/async/lib/async.js:328:15
at Object.async.forEachLimit.async.eachLimit (/Users/womanpanzee/.meteor/packages/barbatus_angular2/.0.6.5.n1t2og++os+web.browser+web.cordova/plugin.HTMLBuilder.os/npm/caching-compiler/node_modules/async/lib/async.js:221:35)
at HtmlExtensionCompiler.processFilesForTarget (caching-compiler.js:277:11)
at HtmlExtensionCompiler.processFilesForTarget (plugin/compilers/ng_caching_compiler.js:15:32)
at HtmlCompiler.processFilesForTarget (plugin/handlers/html_handler.js:34:33)

Your application has errors. Waiting for file change.

Routing problems with Angular2 and Meteor

I'm going through the tutorial and am currently at step 5 with the following problems:

  1. The url generated by my application has a /null as a prefix, such as: http://localhost:3000/null/party/aeb1bb088d277bad72a0a10b I get the same url when testing the tutorial code directly.
  2. When I click on it I see the correct url in the browser (http://localhost:3000/party/aeb1bb088d277bad72a0a10b) but I can't directly open either of those urls in a new tab / window
  3. So I switched temporarily to the HashLocationStrategy which works for both above described problems, but for some reason trying to open the link in a new tab with cmd+click (or ctrl+click on linux/window) again doesn't work. I tried Chrome, Firefox and Safari, neither worked.

I thought I was getting crazy, so I checked out the old tutorial with Angular1 which I made some time ago, and there everything worked:

  1. I had correct HTLM5 urls
  2. I could open a random url from that app in a new tab / window and it opened the correct view
  3. cmd+click (ctrl+click) worked like it does on any other website

I couldn't find anything on this topic, is this a known issue? Any idea how to fix it?

Why is the repo called Meteor-Angular2 instead of angular2-meteor?

Hi @Urigo,

This question may be justified, but it feels a bit confusing the fact that the repo is called Meteor-Angular2, while the previous repo was called angular-meteor.

I expect this repository to grow, so I though it might be interesting to keep consistency calling it angular2-meteor.

Carlos.

Errors after updating

Hi,

After updating plug-ins in my hobby project, I have errors. List updated plug-ins

  • barbatus:angular2 upgraded from 0.6.7_1 to 0.7.0
  • barbatus:ng2-meteor-accounts upgraded from 0.1.2 to 0.1.3_2
  • barbatus:ng2-meteor-accounts-ui upgraded from 0.1.1 to 0.1.2_1
  • barbatus:ts-compilers upgraded from 0.1.8_1 to 0.1.9_4
  • barbatus:typescript upgraded from 0.1.3_1 to 0.1.3_3
  • urigo:angular2-meteor upgraded from 0.2.7 to 0.3.1

In chrome console i have messages:

Uncaught SyntaxError: Unexpected token <
barbatus_angular2.js?f8d37519d7a440740ee9e03701ce42362f0c39f0:8559 Uncaught RangeError: Maximum call stack size exceeded

And in firefox console:

SyntaxError: syntax error
<!DOCTYPE html>

uncaught exception: SyntaxError: syntax error Evaluating http://localhost:3000/angular2/angular2 Error loading http://localhost:3000/client/app

Link to my project https://github.com/lukaszkukawski/projectManagement/tree/feature-refactor-1

Anyone can help?

tsconfig.json instead of reference directives in tutorial?

I encountered a little bit of friction running through the tutorial because I was using Atom and it's associated Typescript package. After reading up on latest developements with tsconfig.json I was able to get the example working in Atom with no errors or warnings, but it wasn't immediately obvious what was wrong (for a total beginner like myself). Since tsconfig.json seems to be the way to go moving forward, maybe it would be good to move the example over tsconfig.json so the tutorial will be quick and easy with any editor that supports tsconfig.json?

Support for Angular Beta.0?

Is this compatible with Angular Beta?

/// <reference path="../typings/angular2-meteor.d.ts" />
Is there a way to avoid this referencing in every single file?

Adding other ng2 modules

What is the recommended way of adding other ng2 modules that don't have a meteor package yet? For example, should I add the RouteConfig from 'angular2/router' and Http from 'angular2/http' to the NPM.depends and Npm.require settings?

project with no index.html doesn't add app component

I am currently going through the tutorial and I can't get it to work without the index.html. If I have an index.html file with:

<body>
  <app></app>
</body>

everything works fine. But when I remove the index.html I get errors about finding the app selector (it is indeed cannot be found in the create html.
I don't have any other html files in my project. A reproduction can be found here.

Missing ts sourcemap

Hi, I'm unable to debug .ts source files. I set compilerOptions.sourceMap true in .tsconfig file, but .ts files are still empty. (chrome developer tool) Can you help, what I'm missing?

Typescript compiler issue & conflict

Typescript is not running on the backend.

 - client
   \- app.ts  ✓
 - model
   \- parties.ts ✗

However, changing the backend to Javascript works.

 - client
   \- app.ts  ✓
 - model
   \- parties.js ✓

If another typescript compiler package is added, there is a conflict.

 While building the application:
   error: conflict: two packages included in the app, hansoft:typescript and barbatus:angular2, are both trying to handle .ts

A lot of the benefits of Typescript are lost when the same types can't be applied to the full application.

timeline

hi,

many thanks for the great work with angular2-meteor and meteor.
The roadmap looks great!

But how is the timeline for 1.0?

thanks and happy new year

Es6 demo or example instead of typescript

Readme.md says, Es6 modules are supported. Is there an example or demo that we can follow to use es6 with angular2

Will the ecmascript package in meteor handle client side angular2?

Using index.html and templateUrl path issue

Ok, keep in mind I am new to ng2 and meteor, but...

I have an index.html file, since I was converting an app, it has header information that I need in it.

Essentially:

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PM Toolbelt: Tools for Property Managers</title>
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link href="assets/css/carousel.css" rel="stylesheet" type="text/css">
<link href="assets/css/style.css" rel="stylesheet" type="text/css">
  <link href="assets/images/favicon.ico" rel="shortcut icon" type="image/x-icon">
  <base href="/">
</head>


<body>
    <app></app>
</body>

My app.ts uses a template called app.html

<header></header>
<router-outlet></router-outlet>
<footer></footer>

In my template files, if I paste all of the html inline using template: <b>All my happy html</b> it works just fine.

If I simply change it to templateUrl it will no longer compile.

EXCEPTION: Template parse errors:
Unexpected closing tag "head" ("
  <base href="/">

[ERROR ->]</head>
<body>

"): HeaderComponent@72:0
Unexpected closing tag "html" ("

</body>
[ERROR ->]</html>
"): HeaderComponent@91:0

Am I crazy? Am I going about this wrong? I tried to use some of the Angular 1 docs to get that far. So it works, but I can't stand the site of full html pages inline.

Weird problems when I subscribe twice to the same collection on the same page

Following application structure:

I have a menu on the left with a list of items which are links. This is filled by a component via

this.subscribe('subscription', () => this.items = Items.find(), true);

and in the view is a normal *ng-for loop.

Additionally, I have on one route another component which shows the exact same list of items, just with more details. Subscription is done the same way and loop as well.

Here are all the two errors I've noticed so far:

  1. TypeError: Cannot read property 'renderFragment' of undefined at AppViewManager_._attachRenderView

Supposedly, the local variable in the ng-for loop of the side list is null. However, sometimes the first item would show, before the exception throws.

This problem shows up when I use 2 separate publications, one which publishes only the name and the other which publishes the whole object. Also it showed up when I didn't wait for the subscription in the callback, but right away assigned the value this.items = Items.find()

2) When I use the same publication for both components, than it seems to work fine in the beginning. Later on, when I add new items and switch to a different view (the list in the menu stays, but the list of all items with more details is gone) Meteor starts sending delete commands for those newly created items.

Example: I start with a list of items 1-5. On the overview page, I add items 6-10. So far so good. Now I go away from the overview page and meteor sends to the client the command to delete items 6-10, even though my side list is still subscribed to it. And when I switch back to the overview page, the items 6-10 are downloaded again and everything seems fine, until I leave the overview page.

I'm currently trying to reproduce it with the parties example, but maybe you already have any idea why:

  1. the items in the cursor would be null sometimes (I do apply a transformation function, but that should work, as they are only null from time to time)

2) why Meteor commands the application to delete items, even though another subscription is still running? (maybe this isn't possible with meteor?)

Support for Babel instead of TypeScript

I'm on Step 0 of the Angular 2 Socially tutorial but am wanting to use Babel instead of TypeScript.

Thus far I've tried naming my file (app.js) with a .jsx extension like the readme suggests but I get an error stating that babel is not defined:

 While processing files with barbatus:angular2 (for target web.browser):
   compilers/jsx_compiler.js:19:14: Babel is not defined

I tried installing pbatowski:angular-babel and changing my file extension back too .js but I get an error in the browser saying require is not defined. I'm not actually using require anywhere in my code but I do see a require function defined in the meteor.d.tsbut I don't suspect it as the problem. Nonetheless, I removed thetypings` directory, rebuilt and not only did the typings get added right back but now I'm getting another error:

 While loading plugin `compileNGScript` from package `pbastowski:angular-babel`:
   native: Unexpected token '
   at Object.parse (native)
   at getCustomConfig (packages/compileNGScript/plugin/ng-script-compiler.js:147:1)

The entirety of my app.(js/jsx) file is:

import {Component, View} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';

@Component({
  selector: 'app'
})
@View({
  template: 'Hello World!'
})
class Socially { }

bootstrap(Socially);

My index.html file contains:

<body>
  <app></app>
  <script>System.import('client/app');</script>
</body>

When I was using the angular-meteor-babel package I had a babel.json config in the root with the following settings:

{
  "verbose": true,
  "debug": false,
  "modules": "system",
  "blacklist": ['useStrict'],
  "stage": 0,
  "extensions": ["js"]
}

Is Babel currently only supported for React and not actually in place of TypeScript? With the correct Babel plugins and presets I don't see any reason why I wouldn't be able to use Babel instead of TypeScript and forego the unwanted typing (sorry I prefer duck typing over cluttering up my source code with type definitions, interfaces, etc. -- personal preference, and reason I write JavaScript and not Java).

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.