Angular CLI with SPFx (SharePoint Framework)

  Рет қаралды 11,713

Sahil Malik

Sahil Malik

Күн бұрын

Use Angular CLI with SPFx (SharePoint Framework)
Blogpost: winsmarts.com/...
Github repo - github.com/mal...

Пікірлер: 29
@daneshwaranm5733
@daneshwaranm5733 6 жыл бұрын
its exciting to see how Angular CLI works with SPFx....
@SahilMalik
@SahilMalik 6 жыл бұрын
Yes - I will update this when v6 and elements are out, so we have a full working story. Currently the code I've published is a concept.
@daneshwaranm5733
@daneshwaranm5733 6 жыл бұрын
waiting eagerly for your next video....
@SahilMalik
@SahilMalik 6 жыл бұрын
Yeah .. :) .. I just haven't had time to attack this, perhaps this weekend, but lets see .. so much piled up already. I did publish this though winsmarts.com/getting-started-with-angular-elements-1bbdf2e748a6 ... addressing SPFx with Angular CLI is easy and trivial. I hope to blog about that soon.
@daneshwaranm5733
@daneshwaranm5733 6 жыл бұрын
Sahil Malik thank you for this link....waiting for your video tutorials...
@mayursorathiya6740
@mayursorathiya6740 5 жыл бұрын
How to implement SPFX custom property pane control with angular 2+ ?
@Tinnguyen_87
@Tinnguyen_87 6 жыл бұрын
So useful. Thanks you !
@rajkrishna1979
@rajkrishna1979 6 жыл бұрын
The property is updating through button event but updated value not render. Please let me know what I missed
@sujitdas5885
@sujitdas5885 4 жыл бұрын
Can you please tell us how to set up a spfx project with angular 10 apart from using angular element?
@jaafarfarissi6138
@jaafarfarissi6138 4 жыл бұрын
a receive this message Access to script at from origin has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
@DevarshiDavessj4
@DevarshiDavessj4 6 жыл бұрын
dynamically data binding not working (such as dynamically adding data to array or using ngIf statements)...only works when component is loaded for the first time.
@syam5850
@syam5850 5 жыл бұрын
Same for me, any solution ? please
@sureshvgknair3464
@sureshvgknair3464 5 жыл бұрын
Hi Sahil, Can I create a Angular application with all the features like SPA, routing etc and finally deploy it in SharePoint? Plz replay
@TheHappinessSquad
@TheHappinessSquad 5 жыл бұрын
Yes.. all the angular compiled files can be uploaded/saved in SiteAssets library
@RaghavendraC
@RaghavendraC 5 жыл бұрын
I am trying to implement the same steps with angular 7 and SPFX 1.7. But facing a lot of issues. so anyone has samples done for angular 7 and SPFX 1.7?
@SahilMalik
@SahilMalik 5 жыл бұрын
www.linkedin.com/learning/sharepoint-framework-for-developers-5-spfx-and-angular
@xRynee
@xRynee 6 жыл бұрын
Is there a way to get the context from appWebPart.ts to the components? I'd like to be able to use it to communicate with SharePoint lists. There doesn't seem to be a way to do this from the app.component.ts file.
@SahilMalik
@SahilMalik 6 жыл бұрын
I'd say abstract it out. It is a good design pattern to abstract it out - and it will make your move to elements easier in the future.
@mikeshupe1207
@mikeshupe1207 6 жыл бұрын
I'm working on this as well.... I'll post if I find a solution
@xRynee
@xRynee 6 жыл бұрын
Hey Mike, I had luck adding the following before the class definition in my appWebPart.ts: export var CONTEXT: any; Then, first thing in my render function, I set CONTEXT = this.context. From here, you can import it to your component or a service.
@mikeshupe1207
@mikeshupe1207 6 жыл бұрын
Hey Ryne - that works. I created a service that uses the context and gets list items - wish there was a better way of passing the object to the service but not too bad! import { CONTEXT } from '../webparts/appWebPart'; @Injectable() export class AssetService { ... public getItems(listTitle: string) : Promise { if (environment.production) { let url = environment.url + "/_api/web/lists/GetByTitle('" + listTitle + "')/Items"; return CONTEXT.spHttpClient.get(url, SPHttpClient.configurations.v1) .then((r: SPHttpClientResponse) => { r.json().then(rj => { console.log(rj); let items: any[] = rj.value; return items; }); }); } } ... } And in the App component, just use construct service like normal... export class AppComponent { @Input() description = 'Angular'; // title = 'Angular'; constructor(elm: ElementRef, private assetService:AssetService) { this.description = elm.nativeElement.getAttribute('description'); console.log('******COMPONENT******'); assetService.getItems(this.description).then(r => {console.log('Asset Types:');console.log(r);}); } }
@mikeshupe1207
@mikeshupe1207 6 жыл бұрын
Thanks Sahil!
@mahendrav9991
@mahendrav9991 5 жыл бұрын
How to use multiple component use in spfx webart using angular 6 if any one try this ???
@rainson12
@rainson12 6 жыл бұрын
this is by far not compareable to how you would write angular code. The whole css / scss stuff doesnt work. @import in scss doesnt work etc.
@SahilMalik
@SahilMalik 6 жыл бұрын
You can modify the gulpfile to support CSS/SCSS.
@El.Viejon.4x4
@El.Viejon.4x4 6 жыл бұрын
how can i modify the gulpfile or what i need to add to support scss and css????
VSCode + Mac tip
0:44
Sahil Malik
Рет қаралды 1 М.
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 47 МЛН
Cute
00:16
Oyuncak Avı
Рет қаралды 11 МЛН
PnP Webcast - CRUD operations with SharePoint Framework client-side web parts
44:22
Microsoft Community Learning
Рет қаралды 18 М.
SharePoint Framework SPFx Webinar by Andrew Connell
1:11:21
Lightning Tools
Рет қаралды 17 М.
SharePoint Framework Training - Developing with the SharePoint Framework: Web Parts
50:52
Microsoft Community Learning
Рет қаралды 15 М.
SPFx Tutorial Part 6 : SharePoint Framework Development With React
54:56
Getting Started with SharePoint Framework (SPFx)
1:37:37
Nanddeep Nachan
Рет қаралды 36 М.
Best Budget Weather Stations Under $200 And They're Accurate
2:57
The Weather Station Experts
Рет қаралды 39
SharePoint Framework Webinar Series:  SPFx with React
1:21:43
Nanddeep Nachan
Рет қаралды 8 М.
SharePoint Framework or SPFx and how to setup
24:39
helpmecoder
Рет қаралды 9 М.