Angular2 in Google Apps Script Web App
Asked Answered
L

1

6

Is it possible to use Angular2 in Google Apps Script Web App? I searched enough, but there is no documentation/ article on the web which touches this topic.

If it is possible, can anyone give me a sample working Google Apps Script web app using Angular2?

More specifically, I am not sure how to make System.import('app') work in Google Apps script as Google apps does not allow reference to file this way.

Thanks

Ligurian answered 13/2, 2017 at 16:25 Comment(4)
Apps Script doesn't have a file system that has folders and sub-folders that can be referenced to load resources. But you can put client code into an HTML file, and then inject that code into a script tag with templated HTML. You should probably look at the scriptlets example. Apps Script documentation - Templated HTML You should probably use a printing scriptlet. There are 3 types of scriptlets. So, put the code for "app" in an HTML file, and name it "JS_app", and then "include" that "JS_app" file with templated HTML.Rale
I have been using this template feature for Angular 1.x, however for Angular 2+, the approach of loading/bootstrapping does not seem work with template. System.import refers to the actual file rather than template injection. Do you have any working reference for Angular2 with Google Apps Script?Ligurian
Sorry, I don't use Angular, so I don't have any info. Hopefully someone else will be able to help.Rale
@Jasperin, were you able to use angular in google apps script?Oina
L
0

Actually i did integrate Vuejs with Google Apps Script / HtmlService class

U have to use vue as cdn and write all ur page in a single file.

But the HtmlService is not designed for building web pages in production.

It is useful in building sidebars in google sheets.

I recommend to use Google apps script as web application / api it is so powerful and stable

U can check my tutorials playlist.mashoun.com

Lanny answered 12/5, 2023 at 19:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.