0

Hey guys im mindf*cked,

i have an angular 1.4.7 project and want to use 'ui.select' but im getting always this errors:

Error: [$compile:tpload] http://errors.angularjs.org/1.4.7/$compile/tpload?p0=bootstrap%2Fmatch-multiple.tpl.html&p1=404&p2=Not%20Found
Error: [$compile:tpload] http://errors.angularjs.org/1.4.7/$compile/tpload?p0=bootstrap%2Fchoices.tpl.html&p1=404&p2=Not%20Found
Error: [$compile:tpload] http://errors.angularjs.org/1.4.7/$compile/tpload?p0=bootstrap%2Fselect-multiple.tpl.html&p1=404&p2=Not%20Found

I have tested everything :(

Here they are talking about the Problem but there is no Solution: Github Issue #992

My index.html js part (css is included in head):

<!-- BEGIN CORE ANGULARJS PLUGINS -->
    <script src="plugins/angularjs/angular.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-sanitize.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-touch.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-translate.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/angular-translate-loader-static-files.js" type="text/javascript"></script>
    <script src="plugins/angularjs/angular-cookies.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/angular-ui-router.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ocLazyLoad.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ui-bootstrap-tpls.min.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ng-country-select.js" type="text/javascript"></script>
    <script src="plugins/angularjs/plugins/ui-select/select.js" type="text/javascript"></script>
    <!-- END CORE ANGULARJS PLUGINS -->
    <!-- BEGIN JS PLUGINS -->
    <script id="ng_load_scripts_after"></script>
    <!-- END JS PLUGINS -->
    <!-- BEGIN APP LEVEL ANGULARJS SCRIPTS -->
    <script src="js/main.js" type="text/javascript"></script>
    <script src="js/directives.js" type="text/javascript"></script>
    <script src="js/filters.js" type="text/javascript"></script>
    <script src="js/services/AlertService.js" type="text/javascript"></script>
    <script src="js/services/ToastrService.js" type="text/javascript"></script>
    <script src="js/services/RequestService.js" type="text/javascript"></script>
    <!-- END APP LEVEL ANGULARJS SCRIPTS -->

My directive call:

<ui-select multiple ng-model="vm.legalbranches">
      <ui-select-match placeholder="Select legalbranch...">{{$item.label}}</ui-select-match>
      <ui-select-choices repeat="legalbranch in legalbranches | filter: {label: $select.search} track by legalbranch.id">
               <span ng-bind="legalbranch.label"></span>
                <!--{{legalbranch.label}}-->
      </ui-select-choices>
</ui-select>

vm.legalbranches and legalbranches are set in controller via resolve. Legalbranches is an array of objects.

I am using ui-select in version 0.14.8 and angular-ui-bootstrap in version 0.14.0 and angular in 1.4.7

Where the hack is the Problem???

EDIT: This is the result in the dom after loading the site:

<ui-select multiple="" ng-model="vm.legalbranches" class="ng-pristine ng-untouched ng-valid ng-scope"></ui-select>
2
  • I think from somewhere in your code you are doing $templateCache.removeAll() which removes up ui-select templates, which it then don't find while rendering. Commented Feb 25, 2016 at 14:02
  • i searched my whole project structure and did not found the "$templateCache.removeAll()" Commented Feb 25, 2016 at 14:33

1 Answer 1

0

i am using oclazyload and i did the following to get the ui select running:

                    {
                        name: 'ui.select',
                        insertBefore: '#ng_load_plugins_before', // load the above css files before '#ng_load_plugins_before'
                        files: [
                            'plugins/angularjs/plugins/ui-select/select.min.css',
                            'plugins/angularjs/plugins/ui-select/select.js' //use the non minify because we have custom edits in it
                        ]
                    },

i used in the name field my app name but i had to use ui.select

thx for the help

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.