Coder Social home page Coder Social logo

Angular is undefined about angular-winjs HOT 4 CLOSED

winjs avatar winjs commented on June 17, 2024
Angular is undefined

from angular-winjs.

Comments (4)

AmazingJaze avatar AmazingJaze commented on June 17, 2024

Hi @jolleman, the problem may be that the version of WinJS UI you are using doesn't align to the version of WinJS that angular-winjs expects. Currently the angular-winjs project is aligned to WinJS 4.0 Preview, which you can also get from trywinjs. The version of WinJS 4.0 that your build of visual studio is using may be a newer point-in-time version of WinJS 4.0.

The first thing I would try is downloading WinJs 4.0 Preview from the trysite, adding it locally to you project, and replace the references to

<link rel="stylesheet" href="lib/Microsoft.WinJS.4.0/css/ui-light.css" />
<script src="lib/Microsoft.WinJS.4.0/js/WinJS.min.js"></script>

with the src to your local copy of WinJS 4.0 preview, and see if that doesn't resolve your issue.

We plan to update angular-winjs and all the samples on the try site to use WinJS 4.0, shortly after the upcoming release of WinJS 4.0 itself.

from angular-winjs.

jolleman avatar jolleman commented on June 17, 2024

Hi!

ive tried that. I get an angular undefined at line 363 in angular-winjs. Does angular-winjs require the angularjs library?

var module = angular.module("winjs", []);

Regards Joel

from angular-winjs.

AmazingJaze avatar AmazingJaze commented on June 17, 2024

The angularjs library does need to be loaded, but it looks like you are already doing that correctly in the code snippet you pasted above.

Can you provide a page/app which repros this behavior as described on our wiki. So we can take a look at it?

from angular-winjs.

AmazingJaze avatar AmazingJaze commented on June 17, 2024

@jolleman, Thinking about this some more, it might be a conflict with Universal App script loading policies. I assume you are seeing this issue when you try to run as a Win 10 app in visual studio?

If you are not able to get us a repro page/app to investigate, I would try running the same HTML file on a website, or copy the Angular library locally to your Visual Studio project and reference it from there.

from angular-winjs.

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.