Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Version } from '@microsoft/sp-core-library';
- import {
- BaseClientSideWebPart,
- IPropertyPaneConfiguration,
- PropertyPaneTextField
- } from '@microsoft/sp-webpart-base';
- import { escape } from '@microsoft/sp-lodash-subset';
- import styles from './AngularAppWebPart.module.scss';
- import * as strings from 'AngularAppWebPartStrings';
- //Angular deps
- import 'reflect-metadata';
- import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
- import {AppModule} from './app/app.module';
- require('zone.js');
- export interface IAngularAppWebPartProps {
- description: string;
- }
- export default class AngularAppWebPart extends BaseClientSideWebPart<IAngularAppWebPartProps> {
- public render(): void {
- window['webPartContext']=this.context;
- this.domElement.innerHTML = `<app-root></app-root>`;
- platformBrowserDynamic().bootstrapModule(AppModule);
- }
- protected get dataVersion(): Version {
- return Version.parse('1.0');
- }
- protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
- return {
- pages: [
- {
- header: {
- description: strings.PropertyPaneDescription
- },
- groups: [
- {
- groupName: strings.BasicGroupName,
- groupFields: [
- PropertyPaneTextField('description', {
- label: strings.DescriptionFieldLabel
- })
- ]
- }
- ]
- }
- ]
- };
- }
- }
Add Comment
Please, Sign In to add comment