Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. btx
    B
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    btx

    @btx

    0
    Reputation
    2
    Posts
    974
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    btx Follow

    Posts made by btx

    • RE: Integrate OnsenUI in Angular 2

      That solved the issue. Thank you!

      posted in Onsen UI
      B
      btx
    • Integrate OnsenUI in Angular 2

      I’m really struggling with integrating OnsenUI in my Angular 2 (version 4) App. The project was generated using the latest Angular CLI.

      So if add in app.module.ts

      import {OnsenModule} from 'angular2-onsenui';
      import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
      .
      .
      .
      @NgModule({
      imports: [
          OnsenModule,
          BrowserModule
      ],
      schemas: [CUSTOM_ELEMENTS_SCHEMA]
      

      as it is described in the docs: https://onsen.io/v2/docs/guide/angular2/

      I’m getting the following error:

      Uncaught ReferenceError: ons is not defined
      at Object../node_modules/angular2-onsenui/dist/src/ons/notification.js (notification.js:5)
      at __webpack_require__ (bootstrap 43794b3…:54)
      at Object../node_modules/angular2-onsenui/dist/src/angular2-onsenui.js (angular2-onsenui.js:16)
      at __webpack_require__ (bootstrap 43794b3…:54)
      at Object../src/app/app.module.ts (app.component.ts:12)
      at __webpack_require__ (bootstrap 43794b3…:54)
      at Object../src/main.ts (environment.ts:8)
      at __webpack_require__ (bootstrap 43794b3…:54)
      at Object.2 (main.ts:12)
      at __webpack_require__ (bootstrap 43794b3…:54)
      ./node_modules/angular2-onsenui/dist/src/ons/notification.js @ 
      notification.js:5
      __webpack_require__ @ bootstrap 43794b3…:54
      ./node_modules/angular2-onsenui/dist/src/angular2-onsenui.js @     angular2-onsenui.js:16
      __webpack_require__ @ bootstrap 43794b3…:54
      ./src/app/app.module.ts @ app.component.ts:12
      __webpack_require__ @ bootstrap 43794b3…:54
      ./src/main.ts @ environment.ts:8
      __webpack_require__ @ bootstrap 43794b3…:54
      2 @ main.ts:12
      __webpack_require__ @ bootstrap 43794b3…:54
      webpackJsonpCallback @ bootstrap 43794b3…:25
      (anonymous) @ main.bundle.js:1
      

      I don’t want to use the monaca template, this will not solve the problem.

      posted in Onsen UI
      B
      btx