Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Why does $state change on $apply with Karma/Jasmine

$
0
0

hey there:

iam using this module to avoid that --> it converts html templates to js files and put them in the templateCache:
https://github.com/karma-runner/karma-ng-html2js-preprocessor

install it --> add it to you devDependencies in your package.json

after that pu the following in your karma.conf:

preprocessors: {
    'app/templates/**/*.html': ['ng-html2js'], // add your template paths
},

ngHtml2JsPreprocessor: { // this changes the name of the files --> e.g. stripping app and add/assets as new path
    stripPrefix: 'app',
    prependPrefix: '/assets'
}

Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>