Typescript Directives error "Property IScope dont exist on type 'IAngularStatic"

danywalls

I'm writing a Angular Directive with typescript to able share a scope item, i create a interface that inherits from ng.IScope, but Visual Studio Code show this warning: "Property IScope dont exist on type IAngularStatic', I am using the angular.d.ts type definition file from definitelytyped.org.

Property IScope dont exist on type 'IAngularStatic'Property IScope dont exist on type 'IAngularStatic'

module kingApp.Directives {

export interface IMenuDirective: ng.IScope {

}

export function MenuDirective(): ng.IDirective
{

    return {
        templateUrl: 'shared/menu/menu.html',
        controller: Controllers.Home.HomeController              
    }
}
angular.module("kingApp").directive('menu',MenuDirective);

}

How i can share data from scope to my current directive ?

basarat

You wrote export interface IMenuDirective: ng.IScope {. It should be export interface IMenuDirective extends ng.IScope {. The compiler error is misleading.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Extending angularjs directives with Typescript

From Dev

Object 'directives' not defined error

From Dev

Error regarding angular directives

From Dev

Error regarding angular directives

From Dev

Implementing angularjs directives as classes in Typescript

From Dev

Issue angular directives using Typescript

From Dev

Error: [$compile:multidir] Multiple directives

From Dev

Error preprocessor directives when building

From Dev

Error preprocessor directives when building

From Dev

Registering AngularJs directives implemented as Typescript classes

From Dev

AngularJS error - [$compile:multidir] Multiple directives error

From Dev

Thymeleaf + Boot + AngularJS directives parser error

From Java

How to pass multiple parameter to @Directives (@Components) in Angular with TypeScript?

From Java

How to create global custom directives in Vue 3 with Typescript

From Dev

Sharing data from asynchronous calls amongst directives in AngularJS with TypeScript

From Dev

Angular gives @angular/core 404 not found error when using directives

From Dev

AngularJS multiple directives on same element, $compile:multidir ERROR

From Dev

Angular itkn error caused by directives defined with function outside array

From Dev

Basic AngularJS NVD3 Directives will not work and no error

From Dev

Angular error in Firefox only "Multiple directives asking for isolated scope"

From Dev

Delphi - Compiler Directives multi lines effects selected IDE error line

From Dev

Parse:syntax error running angular code inside directives

From Dev

Parse:syntax error running angular code inside directives

From Dev

Incompatible pointer type error while setting directives in Apache server

From Dev

angular 2 testing componnet with directives and got error router loading

From Dev

Typescript install error Permission

From Dev

Ignore typescript definition error

From Dev

Typescript getter and setter error

From Dev

TypeScript 1.3 protected error

Related Related

  1. 1

    Extending angularjs directives with Typescript

  2. 2

    Object 'directives' not defined error

  3. 3

    Error regarding angular directives

  4. 4

    Error regarding angular directives

  5. 5

    Implementing angularjs directives as classes in Typescript

  6. 6

    Issue angular directives using Typescript

  7. 7

    Error: [$compile:multidir] Multiple directives

  8. 8

    Error preprocessor directives when building

  9. 9

    Error preprocessor directives when building

  10. 10

    Registering AngularJs directives implemented as Typescript classes

  11. 11

    AngularJS error - [$compile:multidir] Multiple directives error

  12. 12

    Thymeleaf + Boot + AngularJS directives parser error

  13. 13

    How to pass multiple parameter to @Directives (@Components) in Angular with TypeScript?

  14. 14

    How to create global custom directives in Vue 3 with Typescript

  15. 15

    Sharing data from asynchronous calls amongst directives in AngularJS with TypeScript

  16. 16

    Angular gives @angular/core 404 not found error when using directives

  17. 17

    AngularJS multiple directives on same element, $compile:multidir ERROR

  18. 18

    Angular itkn error caused by directives defined with function outside array

  19. 19

    Basic AngularJS NVD3 Directives will not work and no error

  20. 20

    Angular error in Firefox only "Multiple directives asking for isolated scope"

  21. 21

    Delphi - Compiler Directives multi lines effects selected IDE error line

  22. 22

    Parse:syntax error running angular code inside directives

  23. 23

    Parse:syntax error running angular code inside directives

  24. 24

    Incompatible pointer type error while setting directives in Apache server

  25. 25

    angular 2 testing componnet with directives and got error router loading

  26. 26

    Typescript install error Permission

  27. 27

    Ignore typescript definition error

  28. 28

    Typescript getter and setter error

  29. 29

    TypeScript 1.3 protected error

HotTag

Archive