Step 3: The above command will provide interactive input. Choose the below options.
```js
Choose a project type: (Use arrow keys)
// choose (2) Office Add-in Task Pane project using Angular framework
Choose a script type: (Use arrow keys)
// choose (1) Typescript
What do you want to name your add-in? (My Office Add-in)
//Give any name you want. for this tutorial, I would keep demo-addin
Which Office client application would you like to support?
//choose (3) Outlook
```
Step 4: Our additional Outlook project structure has been created using the Yeoman generator. The structure of the resultant project would look like this.
.
+-- assets
¦ +-- icon-16.png
¦ +-- icon-32.png
¦ +-- icon-80.png
¦ +-- logo-filled.png
+-- CONTRIBUTING.md
+-- LICENSE
+-- manifest.xml
+-- package.json
+-- package-lock.json
+-- README.md
+-- src
¦ +-- commands
¦ +-- taskpane
+-- tsconfig.json
+-- webpack.config.js
Step 5: Using the Angular CLI to build an Angular application
npm install -g @angular/cli
ng new demo-angular-addin
- Run ng serve to make sure the app works
The structure of our Angular app would look like this:
+-- angular.json
+-- e2e
+-- node_modules
+-- package.json
+-- package-lock.json
+-- README.md
+-- src
+-- tsconfig.json
+-- tslint.json
Step 6: Copy the Add-in manifest to our Angular application
Copy the demo plugin manifest.xml file we generated using the Yeomen generator and paste it into the root folder of the angular app.
Step 7: Change the Angular application’s default port number
Note that manifest.xml contains all mappings for port 3000, e.g. localhost:3000. Also, the default port of the angular app is 4200. We must alter the port in the manifest or the port of the Angular server. It should work either way.
Let's change the angular application's default port (4200) to 3000. Open the angular.json file, find the server key and change the default port. Here is an example.
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "demo-angular-addin:build",
"port": 3000
},
"configurations": {
"production": {
"browserTarget": "demo-angular-addin:build:production",
"port": 3000
}
}
},
Step 8: Copy the default icons from the generated Office Add-in into the Angle app
The default icons provided are set in the add-in manifest. These icons are displayed when the plugin loads.
In case both of these projects are in the same folder, perform the following command or run it manually.
cp -r demo-addin/assets/* demo-angular-addin/src/assets/