Comments (7)
I wrote an actual app, in production. I use index.html and template files. Clearly i was crazy before so closing.
from angular2-meteor.
Good to know) We are actually quite busy now, so issues like this are not of first priority, apologies
from angular2-meteor.
@TrikinCurt , could you please explain what you actually changed? Having the same issue here. Thanks in advance.
from angular2-meteor.
+1 having same issue .. here is my code in 4 files:
//filereader.ts
import {Component, ElementRef, EventEmitter, Output} from 'angular2/core';
@Component({
selector: 'filereader',
templateUrl: './commons/inputfilereader/filereader.html',
styleUrls: ['./commons/inputfilereader/filereader.css'],
providers: [ElementRef]
})
export class InputFileReader {
@Output() complete :any = new EventEmitter();
resultSet:Array<Array<string>>=[];
changeListener($event: any) {
var self = this;
var file:File = $event.target.files[0];
var myReader:FileReader = new FileReader();
myReader.readAsText(file);
let resultSet: Array<any> = [];
myReader.onloadend = function(e){
// you can perform an action with readed data here
var columns = myReader.result.split(/\r\n|\r|\n/g);
for (var i = 0; i < columns.length; i++) {
resultSet.push(columns[i].split(' '));
}
self.resultSet=resultSet;
self.complete.next(self.resultSet);
};
}
}
// filereader.html'
<input type="file" (change)="changeListener($event)"/>
Usage: in dfs.ts
import {Component, ElementRef} from 'angular2/core';
import {InputFileReader} from '../../commons/inputfilereader/inputfilereader';
@Component({
selector: 'dfs',
templateUrl: './components/dfs/dfs.html',
styleUrls: ['./components/dfs/dfs.css'],
providers: [ElementRef],
directives:[InputFileReader],
events:['complete']
})
export class DfsCmp {
render(): void {
// some logic here
}
}
//dfs.html
<filereader (complete)="render($event)"></filereader>
from angular2-meteor.
I encountered the same issue. It was caused by a wrong templateUrl.
I've changed the url and everything was working again.
Anyway....odd error message.
from angular2-meteor.
Sorry i didn’t respond back, but following along with the 15 step example,
I have built very basic marketing sites, using template in one, templateUrl
in the other. I use an index.html page that looks like:
and the rest is typical. Works fine.
Curt Fluegel
Trikin Properties - Your Twin Cities Landlord
Broker/Owner
2015 MHA Independent Owners Chair
2014 NARPM® MN Chapter President
Serving the Twin Cities Metro and Western Wisconsin
[email protected]
TwinCitiesLandlord.com
651.964.3812 x101
651.964.3814 fax
On Thu, Jan 21, 2016 at 5:09 AM, steven166 [email protected] wrote:
I encountered the same issue. It was caused by a wrong templateUrl.
I've changed the url and everything was working again.Anyway....odd error message.
—
Reply to this email directly or view it on GitHub
#51 (comment)
.
from angular2-meteor.
Actualy, it does make sense to send a variable with a base path (think if you want diferent css files for diferent looks).
From ng2 'hero' example
dashboard.component.ts:
@Component({ selector: 'my-dashboard', templateUrl: baseURL+'app/dashboard.component.html', styleUrls: [baseURL+'app/dashboard.component.css'] })
Would be nice to be able to do something like this 'baseURL', or to provide it from the System.config({paths:{}}) ??
Perhaps this is easy to do, but I am just begining on ng2 (second day).
from angular2-meteor.
Related Issues (20)
- Upgrading to latest Angular 2.0.0, getting Unhandled Promise rejection - ZoneAwarePromise overwritten HOT 2
- I didn't ask for coffee HOT 1
- ._ensureIndex(..) is no longer working, is there a new API for this? HOT 3
- route component not loading HOT 4
- Is there a way to support typescript without using angular 2? HOT 1
- Is this repo abandoned? HOT 1
- angular2-compilers 0.6.3 style compiler deployment to Heroku HOT 8
- How to use assets in html template?
- angular2-compilers stylesheets problem HOT 1
- 0.6.5 compilers error Cordova iOS HOT 11
- Error regarding login-button scss not found. HOT 1
- Error: (SystemJS) Template parse errors:(…) ==> Angular 2 HOT 1
- Not able to add barbatus:ng2-meteor-accounts
- meteorhacks:aggregate does not have work with angular2-compilers
- Relax/update package requirements
- Relax/update package requirements
- Sidebar and navbar are not rendering if the page is not refreshed angular2
- Can't install angular2-compiler in Windows 10 HOT 4
- r
- Windows 10, Meteor 1.6, angular-2 compilers node-sass error HOT 1
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 angular2-meteor.