GithubHelp home page GithubHelp logo

Comments (14)

sprider avatar sprider commented on August 26, 2024 1

That fixed the problem. Thank you Waldek.

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

Which version of the SharePoint Framework are you using?

from sp-dev-fx-webparts.

sprider avatar sprider commented on August 26, 2024

Drop 6

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

Could you update Angular to 1.5.x and install its typings using:

$ npm install @types/angular -D

from sp-dev-fx-webparts.

sprider avatar sprider commented on August 26, 2024

getting this error now

error

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

Have you removed the old typings from the project? What version of Angular and Angular typings are you using?

from sp-dev-fx-webparts.

sprider avatar sprider commented on August 26, 2024

Could you please share the commands you are using after running yo @microsoft/sharepoint?

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

Install Angular:

npm i angular -S

Install Angular TS Typings:

npm i @types/angular -D

from sp-dev-fx-webparts.

sprider avatar sprider commented on August 26, 2024

I have executed the same commands but getting the same error. Please refer the code from the temporary location https://github.com/sprider/wordpress/tree/master/Temp/angular-web-tree

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

I have an idea: could you change ng.auto.IInjectorService in here https://github.com/sprider/wordpress/blob/af442f80b51b23f323038971397687c095121ee5/Temp/angular-web-tree/src/webparts/webTree/WebTreeWebPart.ts#L21 to angular.auto.IInjectorService and see if it helps?

from sp-dev-fx-webparts.

sprider avatar sprider commented on August 26, 2024

That resolved the second error and opened the first issue(Property '$broadcast' does not exist on type '{}') again.

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

OK, so the error is caused by the old Angular typings. Remove the ./typings/angular folder and from the ./typings/tsd.d.ts remove the reference to Angular typings and you will be able to build the project as expected.

from sp-dev-fx-webparts.

sprider avatar sprider commented on August 26, 2024

Any idea on the error "Parameter '$rootScope' of constructor from exported class has or is using private name 'ng'."

i am trying my own sample from this https://github.com/waldekmastykarz/spfx-angular-ts-todo/blob/master/src/webparts/toDoWebPart/app/HomeController.ts

from sp-dev-fx-webparts.

waldekmastykarz avatar waldekmastykarz commented on August 26, 2024

This sample is relatively old and based on TypeScript v1.x so it could be that the way TypeScript v2.x handles types and private names is different.

from sp-dev-fx-webparts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.