Git Product home page Git Product logo

Comments (7)

TrikinCurt avatar TrikinCurt commented on May 18, 2024

I wrote an actual app, in production. I use index.html and template files. Clearly i was crazy before so closing.

from angular2-meteor.

barbatus avatar barbatus commented on May 18, 2024

Good to know) We are actually quite busy now, so issues like this are not of first priority, apologies

from angular2-meteor.

swunderlich avatar swunderlich commented on May 18, 2024

@TrikinCurt , could you please explain what you actually changed? Having the same issue here. Thanks in advance.

from angular2-meteor.

nodeEnthu avatar nodeEnthu commented on May 18, 2024

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

steven166 avatar steven166 commented on May 18, 2024

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.

TrikinCurt avatar TrikinCurt commented on May 18, 2024

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:

<script>System.import('client/app');</script> <script src=" https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js "></script> <script src="js/bootstrap.min.js" type="text/javascript" language="javascript"></script>

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.

tachyon-ops avatar tachyon-ops commented on May 18, 2024

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)

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.