How to include "angular.module"?

I wanted to use ng-modules in my home.html when adding this code line to my home.ts angular.module(‘starter.homeside’, [])

But I got this error:
TS2686: ‘angular’ refers to a UMD global, but the current file is a module. Consider adding an import instead.

So I added import * as _angular from “angular”;

declare global {
const angular: typeof _angular;

to my home.ts

But when running ionic serve I always get this error: Uncaught (in promise): ReferenceError: angular is not defined
I tried adding angular dependencies to my .json file and running npm install angular whatever but the error won’t disapear.

Has anyone faced the same problem and has tips what I could try to solve the problem?

What module from angular do you want to use? Common and Core are already imported by IonicModule, so you don’t need to import them manually. If you want to learn more about how to import or create modules read this guide:

I used this tutorial but the angular.module- part won’t work with my code…

there’s always the problem “angular is not defined”. What am I supposed to define???

That is for ionic.js (ionic v1). You marked this thread with the category ionic (ionic v2+). These versions are very different. You cannot use v1 code in v2+ that easy.

Maybe this fits your use case: How to enlarge font size of text on button click

oh noooooooooooooo, I hoped to have found a solution. Unfortunately the other link does not work as I tried to apply it the past two days…
thank you anyways! At least I know why it didn’t work out… :slight_smile: