These are chat archives for angular/angular-2-ionic-2

2nd
Sep 2016
Markus Werle
@daixtrose
Sep 02 2016 09:30
@robwormald I tried every variant of it that i could find in the internet. My impressionwas, that any explicit usage of zone made things worse. I am very curious to hear findings.
freshdev1
@freshdev1
Sep 02 2016 16:48
Hello Everybody.
I am facing a weird issue in Ionic 2.
I believe it's Angular's error, or some my understanding issue.
I have an array.
If I am writing all the code in ngOnInit directly. The values are seen on the screen.
But If I modularize it and populate the array in other functions, it does not show up on the screen.
:worried:
Let me paste some code for you people
This is my ngOnInit:
public ngOnInit() {
    //Create sync azure client
    this.CreateAzureClient().then((success) => {
      console.log("Successfully configured the platform: " + success);

      if(this._platform.is("cordova"))
      {
        this._azureClient = new WindowsAzure.MobileServiceClient("http://10.0.3.2:8090/FreemanAzureMobileServices");

        console.log("Successfully created Azure Client.");

        //Validate Sync store
        this.CreateAzureSyncStore();

        //Initialize db
        this.InitializeDB();
      }

    }, (error)=>{
      console.log("Error occured initializing platform: " + error);
    });
  }
The InitializeDB() method initializes plus populates the data in the array.
freshdev1
@freshdev1
Sep 02 2016 16:54
I can see values in the console.log() but not on the screen.
If I bring that code to the ngOnInit method. It works.
My template which renders the table:
<div *ngFor="let issue of issues">
    <p>Issue Text: {{issue.IssueText}}</p>
    <p>Contact Name: {{issue.ContactName}}</p>
  </div>
Denys Vuika
@DenysVuika
Sep 02 2016 17:09
Hello, is there any way creating external components for ionic? i.e. guides/articles on project structure and integration process?
blop.. blop..
@bluethefish
Sep 02 2016 17:43
how to use ionic 2 select options component drop down list with ng for
Abubaker Shekhani
@Abubaker87_twitter
Sep 02 2016 18:49
Thanks @ashhitch for the response.
Thai Huynh
@thuynh
Sep 02 2016 20:02
does anyone know why after building the android version ... I get this message in logcat:
AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/www/build/js/app.bundle.js
Sinan Bolel
@sbolel
Sep 02 2016 20:25
@DenisVuyka could you explain a bit more?
Denys Vuika
@DenysVuika
Sep 02 2016 20:30
@sbolel I'm trying to figure out how to create a redistributable component for Ionic. Is it possible at current stage creating something, building with tsc and linking js/.d.ts somehow with an ionic app?
Sinan Bolel
@sbolel
Sep 02 2016 20:31
@DenisVuyka you could make an account on npmjs and publish components as npm packages
That's what I did with an image upload plugin
Thats for ionic1 but the same principle applies
Denys Vuika
@DenysVuika
Sep 02 2016 20:40
@sbolel My problem is integration of TypeScript components with Ionic 2, it's not working. I've managed to build several services (Injectables), building the project with gulp-tslint, npm-linking with my ionic 2 app, copying .js file to "www/build/js" and referencing my .d.ts files via tsconfig.json. Everything works (and deploys). However as soon as I try using @Component decorator everything stops working. I keep getting something like "No directive annotation found..." exceptions. I cant find any articles or working solutions for ionic 2 so far.
Sinan Bolel
@sbolel
Sep 02 2016 20:42
Any code samples I could look at?
Denys Vuika
@DenysVuika
Sep 02 2016 20:45
All the code is private at this point but I could try making a dummy project to reproduce the issue. I suspect the problem is in the 'ionic-gulp-browserify-typescript' task and the use of browserify. Maybe moving to 'systemjs' will solve the problem.
Paulo Castellano
@paulocastellano
Sep 02 2016 20:54
Hi, any people know how import intercom in app.ts?
Sinan Bolel
@sbolel
Sep 02 2016 21:46
@DenisVuyka I've had a much better time after switching to webpack.
Here's an example repo using webpack: https://github.com/sbolel/todo-angular2-firebase
Denys Vuika
@DenysVuika
Sep 02 2016 21:53
Thanks a lot, I will try webpack
Sinan Bolel
@sbolel
Sep 02 2016 22:22
Great, let me know how it goes / if i can help