Guest User

Untitled

a guest
Jan 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. import { Version } from '@microsoft/sp-core-library';
  2. import {
  3. BaseClientSideWebPart,
  4. IPropertyPaneConfiguration,
  5. PropertyPaneTextField
  6. } from '@microsoft/sp-webpart-base';
  7. import { escape } from '@microsoft/sp-lodash-subset';
  8.  
  9. import styles from './AngularAppWebPart.module.scss';
  10. import * as strings from 'AngularAppWebPartStrings';
  11.  
  12. //Angular deps
  13. import 'reflect-metadata';
  14. import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
  15. import {AppModule} from './app/app.module';
  16. require('zone.js');
  17.  
  18. export interface IAngularAppWebPartProps {
  19. description: string;
  20. }
  21.  
  22. export default class AngularAppWebPart extends BaseClientSideWebPart<IAngularAppWebPartProps> {
  23.  
  24. public render(): void {
  25. window['webPartContext']=this.context;
  26. this.domElement.innerHTML = `<app-root></app-root>`;
  27. platformBrowserDynamic().bootstrapModule(AppModule);
  28. }
  29.  
  30. protected get dataVersion(): Version {
  31. return Version.parse('1.0');
  32. }
  33.  
  34. protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
  35. return {
  36. pages: [
  37. {
  38. header: {
  39. description: strings.PropertyPaneDescription
  40. },
  41. groups: [
  42. {
  43. groupName: strings.BasicGroupName,
  44. groupFields: [
  45. PropertyPaneTextField('description', {
  46. label: strings.DescriptionFieldLabel
  47. })
  48. ]
  49. }
  50. ]
  51. }
  52. ]
  53. };
  54. }
  55. }
Add Comment
Please, Sign In to add comment