Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. charlitos
    3. Posts
    C
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by charlitos

    • Monaca project and Angular2-token authentication library.

      I’m using the Angular2-token authentication library and whenever I inject the Angular2TokenService and my AuthenticationService into the provider array in the @ngModule function inside my main.ts file, I get the following error in the chrome console:

      Uncaught SyntaxError: Unexpected token import
      

      When I click on the app.js file in the console, I’m taken to the sources tab and I see the @angular/core, @angular/router, and rxjs/Observable import statements underlined:

      import { Injectable, Optional } from '@angular/core';
      	import { ActivatedRoute, Router } from '@angular/router';
      	import { Http, Headers, Request, RequestMethod, RequestOptions } from '@angular/http';
      	import { Observable } from 'rxjs/Observable';
      	import 'rxjs/add/operator/share';
      	import 'rxjs/add/observable/interval';
      	import 'rxjs/add/observable/fromEvent';
      	import 'rxjs/add/operator/pluck';
      	import 'rxjs/add/operator/filter';
      	var Angular2TokenService = (function () {
      	    function Angular2TokenService(_http, _activatedRoute, _router) {
      	        this._http = _http;
      	        this._activatedRoute = _activatedRoute;
      	        this._router = _router;
      	    }
      

      It seems like webpack is not transpiling the Angular2TokenService code. Please let me know how I can get pass the “unexpected token import” problem.

      posted in Monaca Tools
      C
      charlitos
    • Monaca project and Angular cli and routing

      I’m new to Unsen UI and monaca. I would like to know the steps I would need to take in order to incorporate and generate components, services, etc with angular cli. In other words, once I generate a monaca project with “monaca create myApp” and choose Angular 2 as a framework with the “minimum” template, do I run the command “ng init” and then modify some other file that monaca generated? Could please lay out step by step the things I have to do? And also the step I would have to take to incorporate Angular 2 routing as well? It would be greatly appreciated.

      posted in Onsen UI
      C
      charlitos
    • RE: Monaca CLI 2.3.0 Released with Onsen UI 2.4.0 Compatibility and More!

      Yes!!!

      posted in News & Announcements
      C
      charlitos