2

I am following the Onsen UI 2 guide for angular 2: https://onsen.io/v2/docs/guide/angular2/index.html#loading-onsen-ui-in-angular-2. But I don't know where I should put this code:

 window['ons'] = require('onsenui/js/onsenui');
 import { ONS_DIRECTIVES, OnsNavigator } from 'angular2-onsenui';

I've tried putting it in my app.component.ts and also in app.module.ts. But my browser console throws me an error:

ReferenceError: Ons is not defined

0 Answers0